Parse singular consumes (#8466)
* Parse singular `Consume`s * Proper coolant parsing * Temporary manual update of ClassMap Does not include all consume types. I don't know what gradle command to run to update `ClassMap`. I've tried `tools:updateScripts` but that just cleared everything.
This commit is contained in:
@@ -925,6 +925,10 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
return consumers.length == 0 ? (T)consumeBuilder.find(filter) : (T)Structs.find(consumers, filter);
|
||||
}
|
||||
|
||||
public boolean hasConsumer(Consume cons){
|
||||
return consumeBuilder.contains(cons);
|
||||
}
|
||||
|
||||
public void removeConsumer(Consume cons){
|
||||
if(consumers.length > 0){
|
||||
throw new IllegalStateException("You can only remove consumers before init(). After init(), all consumers have already been initialized.");
|
||||
|
||||
@@ -51,6 +51,9 @@ public class BaseTurret extends Block{
|
||||
coolant.update = false;
|
||||
coolant.booster = true;
|
||||
coolant.optional = true;
|
||||
|
||||
//json parsing does not add to consumes
|
||||
if(!hasConsumer(coolant)) consume(coolant);
|
||||
}
|
||||
|
||||
placeOverlapRange = Math.max(placeOverlapRange, range + placeOverlapMargin);
|
||||
|
||||
Reference in New Issue
Block a user