Package mindustry.world.consumers
Class ConsumeItemFilter
java.lang.Object
mindustry.world.consumers.Consume
mindustry.world.consumers.ConsumeItemFilter
- Direct Known Subclasses:
ConsumeItemCharged
,ConsumeItemExplode
,ConsumeItemExplosive
,ConsumeItemFlammable
,ConsumeItemRadioactive
-
Field Summary
Fields inherited from class mindustry.world.consumers.Consume
booster, multiplier, optional, update
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply extra filters to a block.void
void
float
efficiency
(mindustry.gen.Building build) getConsumed
(mindustry.gen.Building build) void
trigger
(mindustry.gen.Building build) Called when a consumption is triggered manually.void
update
(mindustry.gen.Building build)
-
Field Details
-
filter
-
-
Constructor Details
-
ConsumeItemFilter
-
ConsumeItemFilter
public ConsumeItemFilter()
-
-
Method Details
-
apply
Description copied from class:Consume
Apply extra filters to a block. -
build
-
update
public void update(mindustry.gen.Building build) -
trigger
public void trigger(mindustry.gen.Building build) Description copied from class:Consume
Called when a consumption is triggered manually. -
efficiency
public float efficiency(mindustry.gen.Building build) - Overrides:
efficiency
in classConsume
- Returns:
- [0, 1] efficiency multiplier based on input. Returns 0 if not valid in subclasses. Should return fraction if needs are partially met.
-
getConsumed
-
display
-