Fixed infinite fire / Command center logic control

This commit is contained in:
Anuken
2021-06-05 15:10:34 -04:00
parent d0da46e715
commit ade313fc1b
7 changed files with 31 additions and 7 deletions

View File

@@ -1399,7 +1399,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return switch(sensor){
case type -> block;
case firstItem -> items == null ? null : items.first();
case config -> block.configurations.containsKey(Item.class) || block.configurations.containsKey(Liquid.class) ? config() : null;
case config -> block.configSenseable() ? config() : null;
case payloadType -> getPayload() instanceof UnitPayload p1 ? p1.unit.type : getPayload() instanceof BuildPayload p2 ? p2.block() : null;
default -> noSensed;
};

View File

@@ -56,7 +56,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
return;
}
if(time >= lifetime || tile == null){
if(time >= lifetime || tile == null || Float.isNaN(lifetime)){
remove();
return;
}