Package mindustry.type
Class Item
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.type.Item
- All Implemented Interfaces:
Comparable<Content>,Senseable
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true, this material is used by buildings.floathow electrically potent this item is.arc.graphics.Colorfloatbase material cost of this item, used for calculating place times 1 cost = 1 tick added to build timefloathow explosive this item is.floatflammability above 0.3 makes this eligible for item burners.intIf >0, this item is animated.floatTicks in-between animation frames.intdrill hardness of the itemfloatWhen this item is present in the build cost, a block's default health is multiplied by 1 + scaling, where 'scaling' is summed together for all item requirement types.booleanbooleanif true, this item is of the lowest priority to drills.floathow radioactive this item is.intNumber of generated transition frames between each frameFields 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 TypeMethodDescriptionvoidcreateIcons(MultiPacker packer) Generate any special icons for this content.static arc.struct.Seq<Item>Allocates a new array containing all items that generate ores.Returns the type name of this piece of content.booleanisHidden()Whether this content is always hidden in the content database dialog.booleanisOnPlanet(Planet planet) voidloadIcon()Called right before load().doublesenseObject(LAccess sensor) voidsetStats()Initializes stats on demand.toString()Methods inherited from class mindustry.ctype.UnlockableContent
afterPatch, checkStats, clearUnlock, displayDescription, displayExtra, emoji, emojiChar, getDependencies, getLogicId, hasEmoji, isBanned, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, postInit, quietUnlock, researchRequirements, showUnlock, unlock, unlocked, unlockedHost, unlockedNow, unlockedNowHostMethods inherited from class mindustry.ctype.Content
compareTo, hasErrored, init, isModded, isVanilla, load
-
Field Details
-
color
public arc.graphics.Color color -
explosiveness
public float explosivenesshow explosive this item is. -
flammability
public float flammabilityflammability above 0.3 makes this eligible for item burners. -
radioactivity
public float radioactivityhow radioactive this item is. -
charge
public float chargehow electrically potent this item is. -
hardness
public int hardnessdrill hardness of the item -
cost
public float costbase material cost of this item, used for calculating place times 1 cost = 1 tick added to build time -
healthScaling
public float healthScalingWhen this item is present in the build cost, a block's default health is multiplied by 1 + scaling, where 'scaling' is summed together for all item requirement types. -
lowPriority
public boolean lowPriorityif true, this item is of the lowest priority to drills. -
frames
public int framesIf >0, this item is animated. -
transitionFrames
public int transitionFramesNumber of generated transition frames between each frame -
frameTime
public float frameTimeTicks in-between animation frames. -
buildable
public boolean buildableIf true, this material is used by buildings. If false, this material will be incinerated in certain cores.
-
-
Constructor Details
-
Item
-
Item
-
-
Method Details
-
isOnPlanet
- Overrides:
isOnPlanetin classUnlockableContent
-
isHidden
public boolean isHidden()Description copied from class:UnlockableContentWhether this content is always hidden in the content database dialog.- Overrides:
isHiddenin classUnlockableContent
-
loadIcon
public void loadIcon()Description copied from class:ContentCalled right before load().- Overrides:
loadIconin classUnlockableContent
-
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
-
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
-
createIcons
Description copied from class:UnlockableContentGenerate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.- Overrides:
createIconsin classUnlockableContent
-
sense
-
senseObject
- Specified by:
senseObjectin interfaceSenseable
-
getAllOres
Allocates a new array containing all items that generate ores.
-