No more free core upgrades (#6936)

This commit is contained in:
buthed010203 2022-06-08 08:24:22 -04:00 committed by GitHub
parent 1c0eff0871
commit d6acfadab9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,15 +130,16 @@ public class CoreBlock extends StorageBlock{
//in the editor, you can place them anywhere for convenience
if(state.isEditor()) return true;
CoreBuild core = team.core();
//must have all requirements
if(core == null || (!state.rules.infiniteResources && !core.items.has(requirements, state.rules.buildCostMultiplier))) return false;
//special floor upon which cores can be placed
tile.getLinkedTilesAs(this, tempTiles);
if(!tempTiles.contains(o -> !o.floor().allowCorePlacement)){
return true;
}
CoreBuild core = team.core();
//must have all requirements
if(core == null || (!state.rules.infiniteResources && !core.items.has(requirements, state.rules.buildCostMultiplier))) return false;
return tile.block() instanceof CoreBlock && size > tile.block().size;
}