Package mindustry.type
Class Liquid
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.type.Liquid
- All Implemented Interfaces:
Comparable<Content>,Senseable
- Direct Known Subclasses:
CellLiquid
A better name for this class would be "fluid", but it's too late for that.
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic floatstatic floatarc.graphics.ColorColor used in bars.booleanwhether this fluid reacts in blocks at all (e.g.floatTemperature at which this liquid vaporizes.arc.struct.ObjectSet<Liquid>Liquids this puddle can stay on, e.g.booleanIf true, puddle size is capped.arc.graphics.ColorColor used in pipes and on the ground.booleanif false, this liquid cannot be a coolantThe associated status effect.floathow prone to exploding this liquid is, when heated.float0-1, 0 is completely not flammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable.booleanIf true, this fluid is treated as a gas (and does not create puddles)arc.graphics.ColorColor of this liquid in gas form.floathow much heat this liquid can store.booleanIf true, this liquid is hidden in most UI.booleanif true, this liquid can be incinerated in the incinerator block.arc.graphics.ColorColor used to draw lights.booleanif true, this liquid can move through blocks as a puddle.Effect shown in puddles.floatParticle effect rate spacing in ticks.protected static final arc.math.Randfloattemperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hotEffect when this liquid vaporizes.floathow thick this liquid is.Fields inherited from class mindustry.ctype.UnlockableContent
allDatabaseTabs, alwaysUnlocked, databaseTabs, description, details, fullIcon, fullOverride, generateIcons, hideDatabase, hideDetails, inlineDescription, localizedName, selectionSize, shownPlanets, stats, techNode, techNodes, uiIcon, unlockedFields inherited from class mindustry.ctype.MappableContent
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarc.graphics.ColorbarColor()booleanvoiddrawPuddle(mindustry.gen.Puddle puddle) Draws a puddle of this liquid on the floor.intReturns the type name of this piece of content.voidinit()Called after all content and modules are created.booleanisHidden()Whether this content is always hidden in the content database dialog.floatdoublesenseObject(LAccess sensor) voidsetStats()Initializes stats on demand.toString()voidupdate(mindustry.gen.Puddle puddle) Runs when puddles update.booleanwillBoil()Methods inherited from class mindustry.ctype.UnlockableContent
afterPatch, checkStats, clearUnlock, createIcons, displayDescription, displayExtra, emoji, emojiChar, getDependencies, getLogicId, hasEmoji, isBanned, isOnPlanet, loadIcon, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, postInit, quietUnlock, researchRequirements, showUnlock, unlock, unlocked, unlockedHost, unlockedNow, unlockedNowHostMethods inherited from class mindustry.ctype.Content
compareTo, hasErrored, isModded, isVanilla, load
-
Field Details
-
animationFrames
public static final int animationFrames- See Also:
-
animationScaleGas
public static float animationScaleGas -
animationScaleLiquid
public static float animationScaleLiquid -
rand
protected static final arc.math.Rand rand -
gas
public boolean gasIf true, this fluid is treated as a gas (and does not create puddles) -
color
public arc.graphics.Color colorColor used in pipes and on the ground. -
gasColor
public arc.graphics.Color gasColorColor of this liquid in gas form. -
barColor
@Nullable public arc.graphics.Color barColorColor used in bars. -
lightColor
public arc.graphics.Color lightColorColor used to draw lights. Note that the alpha channel is used to dictate brightness. -
flammability
public float flammability0-1, 0 is completely not flammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable. -
temperature
public float temperaturetemperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hot -
heatCapacity
public float heatCapacityhow much heat this liquid can store. 0.4=water (decent), anything lower is probably less dense and bad at cooling. -
viscosity
public float viscosityhow thick this liquid is. 0.5=water (relatively viscous), 1 would be something like tar (very slow). -
explosiveness
public float explosivenesshow prone to exploding this liquid is, when heated. 0 = nothing, 1 = nuke -
blockReactive
public boolean blockReactivewhether this fluid reacts in blocks at all (e.g. slag with water) -
coolant
public boolean coolantif false, this liquid cannot be a coolant -
moveThroughBlocks
public boolean moveThroughBlocksif true, this liquid can move through blocks as a puddle. -
incinerable
public boolean incinerableif true, this liquid can be incinerated in the incinerator block. -
effect
The associated status effect. -
particleEffect
Effect shown in puddles. -
particleSpacing
public float particleSpacingParticle effect rate spacing in ticks. -
boilPoint
public float boilPointTemperature at which this liquid vaporizes. This isn't just boiling. -
capPuddles
public boolean capPuddlesIf true, puddle size is capped. -
vaporEffect
Effect when this liquid vaporizes. -
canStayOn
Liquids this puddle can stay on, e.g. oil on water.
-
-
Constructor Details
-
Liquid
-
Liquid
For modding only.
-
-
Method Details
-
init
public void init()Description copied from class:ContentCalled after all content and modules are created. Do not use to load regions or texture data! -
isHidden
public boolean isHidden()Description copied from class:UnlockableContentWhether this content is always hidden in the content database dialog.- Overrides:
isHiddenin classUnlockableContent
-
getAnimationFrame
public int getAnimationFrame() -
willBoil
public boolean willBoil()- Returns:
- true if this liquid will boil in this global environment.
-
canExtinguish
public boolean canExtinguish() -
barColor
public arc.graphics.Color barColor() -
drawPuddle
public void drawPuddle(mindustry.gen.Puddle puddle) Draws a puddle of this liquid on the floor. -
update
public void update(mindustry.gen.Puddle puddle) Runs when puddles update. -
react
-
setStats
public void setStats()Description copied from class:UnlockableContentInitializes stats on demand. Should only be called once. Only called before something is displayed.- Overrides:
setStatsin classUnlockableContent
-
sense
-
senseObject
- Specified by:
senseObjectin interfaceSenseable
-
toString
- Overrides:
toStringin classMappableContent
-
getContentType
Description copied from class:ContentReturns the type name of this piece of content. This should return the same value for all instances of this content type.- Specified by:
getContentTypein classContent
-