No more free core upgrades (#6936)
This commit is contained in:
@@ -130,15 +130,16 @@ public class CoreBlock extends StorageBlock{
|
|||||||
//in the editor, you can place them anywhere for convenience
|
//in the editor, you can place them anywhere for convenience
|
||||||
if(state.isEditor()) return true;
|
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
|
//special floor upon which cores can be placed
|
||||||
tile.getLinkedTilesAs(this, tempTiles);
|
tile.getLinkedTilesAs(this, tempTiles);
|
||||||
if(!tempTiles.contains(o -> !o.floor().allowCorePlacement)){
|
if(!tempTiles.contains(o -> !o.floor().allowCorePlacement)){
|
||||||
return true;
|
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;
|
return tile.block() instanceof CoreBlock && size > tile.block().size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user