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
Modifier and TypeFieldDescriptionstatic final int
static float
static float
Color used in bars.boolean
whether this fluid reacts in blocks at all (e.g.float
Temperature at which this liquid vaporizes.Liquids this puddle can stay on, e.g.boolean
If true, puddle size is capped.Color used in pipes and on the ground.boolean
if false, this liquid cannot be a coolantThe associated status effect.float
how prone to exploding this liquid is, when heated.float
0-1, 0 is completely not flammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable.boolean
If true, this fluid is treated as a gas (and does not create puddles)Color of this liquid in gas form.float
how much heat this liquid can store.boolean
If true, this liquid is hidden in most UI.boolean
if true, this liquid can be incinerated in the incinerator block.Color used to draw lights.boolean
if true, this liquid can move through blocks as a puddle.Effect shown in puddles.float
Particle effect rate spacing in ticks.protected static final Rand
float
temperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hotEffect when this liquid vaporizes.float
how thick this liquid is.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 TypeMethodDescriptionbarColor()
boolean
void
drawPuddle
(mindustry.gen.Puddle puddle) Draws a puddle of this liquid on the floor.int
Returns the type name of this piece of content.void
init()
Called after all content and modules are created.boolean
isHidden()
Whether this content is always hidden in the content database dialog.float
double
senseObject
(LAccess sensor) void
setStats()
Initializes stats on demand.toString()
void
update
(mindustry.gen.Puddle puddle) Runs when puddles update.boolean
willBoil()
Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, createIcons, displayDescription, displayExtra, emoji, getDependencies, getLogicId, hasEmoji, loadIcon, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, quietUnlock, researchRequirements, showUnlock, unlock, unlocked, unlockedNow, unlockedNowHost
Methods 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
-
gas
public boolean gasIf true, this fluid is treated as a gas (and does not create puddles) -
color
Color used in pipes and on the ground. -
gasColor
Color of this liquid in gas form. -
barColor
Color used in bars. -
lightColor
Color 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:Content
Called after all content and modules are created. Do not use to load regions or texture data! -
isHidden
public boolean isHidden()Description copied from class:UnlockableContent
Whether this content is always hidden in the content database dialog.- Overrides:
isHidden
in 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
-
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:UnlockableContent
Initializes stats on demand. Should only be called once. Only called before something is displayed.- Overrides:
setStats
in classUnlockableContent
-
sense
-
senseObject
- Specified by:
senseObject
in interfaceSenseable
-
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
-