Package mindustry.world.meta
Class Stats
java.lang.Object
mindustry.world.meta.Stats
Hold and organizes a list of block stats.
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Whether these stats are initialized yet.float
Production time period in ticks.boolean
Whether to display stats with categories. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a single y/n boolean value.void
Adds a single float value with this stat and no unit.void
Adds a single float value with this stat, formatted to 2 decimal places.void
Adds a single string value with this stat.void
Adds an item value.void
Adds an item value.void
Adds an item value.void
void
void
void
void
Adds a stat value.void
addPercent
(Stat stat, float value) Adds an integer percent stat value.void
Removes a stat, if it exists.toMap()
-
Field Details
-
useCategories
public boolean useCategoriesWhether to display stats with categories. If false, categories are completely ignored during display. -
intialized
public boolean intializedWhether these stats are initialized yet. -
timePeriod
public float timePeriodProduction time period in ticks. Used for crafters.
-
-
Constructor Details
-
Stats
public Stats()
-
-
Method Details
-
add
Adds a single float value with this stat, formatted to 2 decimal places. -
add
Adds a single float value with this stat and no unit. -
addPercent
Adds an integer percent stat value. Value is assumed to be in the 0-1 range. -
add
Adds a single y/n boolean value. -
add
Adds an item value. -
add
Adds an item value. -
add
Adds an item value. -
add
-
add
-
add
-
add
-
add
Adds a single string value with this stat. -
add
Adds a stat value. -
remove
Removes a stat, if it exists. -
toMap
-