Package mindustry.type
Class StatusEffect
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.type.StatusEffect
- All Implemented Interfaces:
Comparable<Content>
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo
-
Field Summary
Modifier and TypeFieldDescriptionAffinity & opposite values for stat displays.Tint color of apply effect.Effect that is displayed once when applied to a unit.boolean
Whether the apply effect should display even if effect is already on the unit.float
Unit build speed multiplier.Tint color of effect.float
Damage per frame.float
Damage dealt by the unit with the effect.boolean
Unit weapon(s) disabled.float
Unit drag multiplier.Effect that happens randomly on top of the affected unit.float
Chance of effect appearing.float
Unit health multiplier.protected Runnable
Called on init.Affinity & opposite values for stat displays.boolean
Set to false to disable outline generation.boolean
Should the apply effect be given a parent.boolean
Should the effect be given a parent.boolean
If true, the effect never disappears.boolean
If true, this effect will only react with other effects and cannot be applied.float
Unit reload multiplier.boolean
Whether to show this effect in the database.float
Unit speed multiplier.float
Damage dealt upon transition to an affinity.protected ObjectMap<StatusEffect,
StatusEffect.TransitionHandler> Transition handler map.Fields inherited from class mindustry.ctype.UnlockableContent
alwaysUnlocked, description, details, fullIcon, generateIcons, hideDetails, iconId, inlineDescription, localizedName, selectionSize, stats, techNode, techNodes, uiIcon, unlocked
Fields inherited from class mindustry.ctype.MappableContent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
affinity
(StatusEffect effect, StatusEffect.TransitionHandler handler) void
applied
(mindustry.gen.Unit unit, float time, boolean extend) boolean
applyTransition
(mindustry.gen.Unit unit, StatusEffect to, StatusEntry entry, float time) Called when transitioning between two status effects.void
createIcons
(MultiPacker packer) Generate any special icons for this content.void
draw
(mindustry.gen.Unit unit) void
draw
(mindustry.gen.Unit unit, float time) Returns the type name of this piece of content.protected void
handleOpposite
(StatusEffect other) void
init()
Called after all content and modules are created.void
boolean
isHidden()
Whether this content is always hidden in the content database dialog.protected void
opposite
(StatusEffect... effect) boolean
reactsWith
(StatusEffect effect) void
setStats()
Initializes stats on demand.boolean
toString()
protected void
trans
(StatusEffect effect, StatusEffect.TransitionHandler handler) void
update
(mindustry.gen.Unit unit, float time) Runs every tick on the affected unit while time is greater than 0.Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, displayDescription, displayExtra, emoji, getDependencies, getLogicId, hasEmoji, loadIcon, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, quietUnlock, researchRequirements, unlock, unlocked, unlockedNow, unlockedNowHost
-
Field Details
-
damageMultiplier
public float damageMultiplierDamage dealt by the unit with the effect. -
healthMultiplier
public float healthMultiplierUnit health multiplier. -
speedMultiplier
public float speedMultiplierUnit speed multiplier. -
reloadMultiplier
public float reloadMultiplierUnit reload multiplier. -
buildSpeedMultiplier
public float buildSpeedMultiplierUnit build speed multiplier. -
dragMultiplier
public float dragMultiplierUnit drag multiplier. -
transitionDamage
public float transitionDamageDamage dealt upon transition to an affinity. -
disarm
public boolean disarmUnit weapon(s) disabled. -
damage
public float damageDamage per frame. -
effectChance
public float effectChanceChance of effect appearing. -
parentizeEffect
public boolean parentizeEffectShould the effect be given a parent. -
permanent
public boolean permanentIf true, the effect never disappears. -
reactive
public boolean reactiveIf true, this effect will only react with other effects and cannot be applied. -
show
public boolean showWhether to show this effect in the database. -
color
Tint color of effect. -
effect
Effect that happens randomly on top of the affected unit. -
applyEffect
Effect that is displayed once when applied to a unit. -
applyExtend
public boolean applyExtendWhether the apply effect should display even if effect is already on the unit. -
applyColor
Tint color of apply effect. -
parentizeApplyEffect
public boolean parentizeApplyEffectShould the apply effect be given a parent. -
affinities
Affinity & opposite values for stat displays. -
opposites
Affinity & opposite values for stat displays. -
outline
public boolean outlineSet to false to disable outline generation. -
transitions
Transition handler map. -
initblock
Called on init.
-
-
Constructor Details
-
StatusEffect
-
-
Method Details
-
init
public void init()Description copied from class:Content
Called after all content and modules are created. Do not use to load regions or texture data! -
init
-
isHidden
public boolean isHidden()Description copied from class:UnlockableContent
Whether this content is always hidden in the content database dialog.- Overrides:
isHidden
in classUnlockableContent
-
setStats
public void setStats()Description copied from class:UnlockableContent
Initializes stats on demand. Should only be called once. Only called before something is displayed.- Overrides:
setStats
in classUnlockableContent
-
showUnlock
public boolean showUnlock()- Overrides:
showUnlock
in classUnlockableContent
- Returns:
- whether to show a notification toast when this is unlocked
-
update
public void update(mindustry.gen.Unit unit, float time) Runs every tick on the affected unit while time is greater than 0. -
trans
-
affinity
-
opposite
-
handleOpposite
-
draw
public void draw(mindustry.gen.Unit unit, float time) -
draw
public void draw(mindustry.gen.Unit unit) -
reactsWith
-
applyTransition
public boolean applyTransition(mindustry.gen.Unit unit, StatusEffect to, StatusEntry entry, float time) Called when transitioning between two status effects.- Parameters:
to
- The state to transition totime
- The applies status effect time- Returns:
- whether a reaction occurred
-
applied
public void applied(mindustry.gen.Unit unit, float time, boolean extend) -
createIcons
Description copied from class:UnlockableContent
Generate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.- Overrides:
createIcons
in classUnlockableContent
-
toString
- Overrides:
toString
in classMappableContent
-
getContentType
Description copied from class:Content
Returns the type name of this piece of content. This should return the same value for all instances of this content type.- Specified by:
getContentType
in classContent
-