EnhancedItems/EnhancedMutator
This class is part of the EnhancedItems package by Wormbo.
EnhancedMutator is an abstract base class for non-Arena mutators in EnhancedItems-based mods.
Features
- can handle /MultiPickupPlus replacement
- new RegisterHUDMutator function
- can draw on HUD before and after weapon is drawn (only if an /EnhancedWeapon is selected)
- unregisters from all mutator chains when destroyed
- activates the enhanced death messages of /EnhancedWeapon and /EnhancedProjectile
Properties
- bool bAllowOnlyOnce
- This mutator class should only exist once in a game. Any additional mutator of this class will be destroyed when it tries to add itself to the linked list of mutators.
- bool bAlwaysCreateMPP (globalconfig)
- The mutator should always create a /MultiPickupPlus when replacing pickups, even if there is no need to do so.
This can solve problems with other EnhancedMutators but can also produce new ones with non-EnhancedItems mutator. (Behavior must be implemented in CheckReplacement() of child classes.) - string MultiPickupBaseClass
- The default /MultiPickupPlus class to use when creating MPPs.
Internal Variables
- bool bMIConverterSpawned
- Tells, whether the /MIConverter was already spawned.
- bool bPendingHUDRegistration
- Set to True when the RegisterHUDMutator() function has failed. The mutator will try to register again in the next Tick. You can set this to True in default properties to automatically let the mutator register itself as HUD mutator. (See function RegisterHUDMutator() below.)
- /EIDeathMessageMutator EIDMM
- A reference to the EIDeathMessageMutator that enables the enhanced death messages.
- ChallengeHUD MyChallengeHUD
- Reference to the local HUD, typecasted to ChallengeHUD, for HUD mutators.
- HUD (UT) MyHUD
- Reference to the local HUD for HUD mutators.
- PlayerPawn PlayerOwner
- Reference to the local PlayerPawn for HUD mutators.
Methods
General
- AddMutator(Mutator (UT) M)
- Makes sure the mutator isn't re-added to the mutators list if it's already there.
- bool ClassIsA(class aClass, coerce string DesiredType) [static, final]
- Returns, whether a class is of a specific type or identical to that type. (see IdenticalTo property of many EnhancedItems classes)
- Destroyed( ) [simulated]
- Unregisters the mutator from all of the four linked lists of mutators: mutators list, message mutators list, damage mutators list and HUD mutators list.
- /EIDMMutator GetDMMutator( )
- Returns a reference to the /EIDMMutator. It will be created using ReplaceDMMutator() if it doesn't yet exist.
- Weapon (UT) GiveWeapon(Pawn (UT) PlayerPawn, string aClassName, optional bool bBringUp)
- Gives the specified weapon to a player.
- bool OtherIsA(Actor (UT) Other, name DesiredType) [static, final]
- Returns, whether an actor is of a specific type or identical to that type. (see IdenticalTo property of many EnhancedItems classes)
- PreBeginPlay( )
- Spawns the /MIConverter, the EIChallengeHUD mutator (if desired) and the /EIDeathMessageMutator. (if it doesn't exist yet)
- ReplaceDMMutator( )
- Replaces the base mutator with the /EIDMMutator if it's a DMMutator.
- Inventory (UT) ReplaceWithItem(Inventory (UT) Other, coerce string aClassName) [final]
- Replacement for the Mutator.ReplaceWith() function with better handling for Inventory (UT) classes.
- RestoreKillType( ) [final]
- Reverts the effect of SetKillType(). Call this exactly as often as SetKillType() after doing damage or directly killing players.
- SetKillType(bool bSplashHit, bool bHeadHit, class<Actor (UT)> DamageProjectileClass) [final]
- Prepares the specified /EnhancedWeapon or /EnhancedProjectile class' death messages to be used when a player is killed. Call this function before you damage or kill a player and revert its effect after you're done.
- SpawnEIChallengeHUD( )
- Tries to spawn the EIChallengeHUD HUD mutator, which modifies the player status icon.
- SpawnMIConverter( )
- Spawns the /MIConverter if it doesn't already exist.
- string StaticGetItemName(string FullName) [static]
- Actor.GetItemName() as static function.
HUD Mutator Related
- Tick(float DeltaTime) [simulated]
- Tries to register this mutator as HUD mutator if bPendingHUDRegistration=True.
- PostRender(Canvas (UT) Canvas) [simulated]
- Fixed version of ]Mutator].PostRender(), which properly calls the next HUD mutator's PostRender().
- PostRenderOverlaysFor(Weapon (UT) W, Canvas (UT) C) [simulated]
- Called for all EnhancedMutators after an /EnhancedWeapon's RenderOverlays() and before calling the PostRenderOverlaysFor() function for any /PickupPlus? registered as that weapon's affector.
- bool PreRenderOverlaysFor(Weapon (UT) W, Canvas (UT) C) [simulated]
- Called for all EnhancedMutators before an /EnhancedWeapon's RenderOverlays() and before calling the PreRenderOverlaysFor() function for any /PickupPlus? registered as that weapon's affector.
If this function returns true, the mutator will handle drawing the /EnhancedWeapon and the weapon's OldRenderOverlays() function and all PostRenderOverlaysFor() functions will be skipped. PreRenderOverlaysFor() calls for other EnhancedMutators or /PickupPlus? affectors will not be skipped. - RegisterHUDMutator( ) [simulated]
- Registers the mutator as HUD mutator. This modified version not only registers the mutator, but also sets the PlayerOwner, MyHUD and MyChallengeHUD variables to the local PlayerPawn and HUD (UT) respectively. Note that if the mutator's Owner is a PlayerPawn it will only register as that player's HUD mutator.
/MultiPickupPlus Related
- bool AlwaysKeepInMPP(/MultiPickupPlus Other, class<Inventory (UT)> ItemClass)
- Returns, whether an inventory class should not be reomved from a /MultiPickupPlus.
- bool CheckMPP(/MultiPickupPlus Other)
- Allowes the mutator to modify a newly spawned /MultiPickupPlus before it starts spawning items.
- /MultiPickupPlus ConvertToMPP(Inventory (UT) Other, optional string MPPClass) [final]
- Converts a pickup to a /MultiPickupPlus and adds the item class to it.
- /MultiPickupPlus ReplaceWithItemAsMPP(Inventory (UT) Other, coerce string aClassName, optional vector NewItemOffset, optional float NewInitTime, optional float NewChance, optional float NDuration) [final]
- Replaces an item with a /MultiPickupPlus and adds an item of the specified class to it.
- /MultiPickupPlus ReplaceWithMPP(Inventory (UT) Other, optional string MPPClass) [final]
- Replaces an item with an empty /MultiPickupPlus.
Known Subclasses
- EIChallengeHUD – draws the enhanced player status icon
- /EIDeathMessageMutator
- EIUseHoldable – utility class for /HoldablePickup?s
- /MIConverter
- NoAlwaysAutoActivate – resets the bAutoActivate values of all Pickups to their default values after DMMutator set all of them to True
...in other mods (only some)
- ArenaPhysicsMutator – the mutator responsible for the non-Arena changes in [Arena Match]
- ERelicHUDMutator – the HUD mutator of [EnhancedRelics]