mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-31 15:09:07 +07:00
Block flag documentation & cleanup
This commit is contained in:
@ -1587,6 +1587,14 @@ lenum.building = Building in a specific group.
|
||||
|
||||
lenum.core = Any core.
|
||||
lenum.storage = Storage building, e.g. Vault.
|
||||
lenum.generator = Buildings that generate power.
|
||||
lenum.factory = Buildings that transform resources.
|
||||
lenum.repair = Repair points.
|
||||
lenum.rally = Command center.
|
||||
lenum.battery = Any battery.
|
||||
lenum.resupply = Resupply points.\nOnly relevant when [accent]"Unit Ammo"[] is enabled.
|
||||
lenum.reactor = Impact/Thorium reactor.
|
||||
lenum.turret = Any turret.
|
||||
|
||||
sensor.in = The building/unit to sense.
|
||||
|
||||
|
@ -917,7 +917,7 @@ public class LStatements{
|
||||
table.add(" group ").left().self(this::param);;
|
||||
table.button(b -> {
|
||||
b.label(() -> flag.name());
|
||||
b.clicked(() -> showSelect(b, BlockFlag.all, flag, t -> flag = t, 2, cell -> cell.size(110, 50)));
|
||||
b.clicked(() -> showSelect(b, BlockFlag.allLogic, flag, t -> flag = t, 2, cell -> cell.size(110, 50)));
|
||||
}, Styles.logict, () -> {}).size(110, 40).color(table.color).left().padLeft(2);
|
||||
row(table);
|
||||
|
||||
|
@ -4,6 +4,7 @@ import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
@ -38,6 +39,7 @@ public class ImpactReactor extends PowerGenerator{
|
||||
liquidCapacity = 30f;
|
||||
hasItems = true;
|
||||
outputsPower = consumesPower = true;
|
||||
flags = EnumSet.of(BlockFlag.reactor, BlockFlag.generator);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,7 +48,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
hasItems = true;
|
||||
hasLiquids = true;
|
||||
rebuildable = false;
|
||||
flags = EnumSet.of(BlockFlag.reactor);
|
||||
flags = EnumSet.of(BlockFlag.reactor, BlockFlag.generator);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,4 +28,7 @@ public enum BlockFlag{
|
||||
extinguisher;
|
||||
|
||||
public final static BlockFlag[] all = values();
|
||||
|
||||
/** Values for logic only. Filters out some internal flags. */
|
||||
public final static BlockFlag[] allLogic = {core, storage, generator, turret, factory, repair, rally, battery, resupply, reactor};
|
||||
}
|
||||
|
Reference in New Issue
Block a user