This commit is contained in:
Anuken
2021-09-11 13:30:10 -04:00
parent bdcfb7ab45
commit 2664bb84be
2 changed files with 3 additions and 2 deletions

View File

@@ -291,11 +291,12 @@ public class Schematics implements Loadable{
/** Checks a schematic for deployment validity and adds it to the cache. */
private void checkLoadout(Schematic s, boolean validate){
Stile core = s.tiles.find(t -> t.block instanceof CoreBlock);
if(core == null) return;
int cores = s.tiles.count(t -> t.block instanceof CoreBlock);
int maxSize = getMaxLaunchSize(core.block);
//make sure a core exists, and that the schematic is small enough.
if(core == null || (validate && (s.width > maxSize || s.height > maxSize
if((validate && (s.width > maxSize || s.height > maxSize
|| s.tiles.contains(t -> t.block.buildVisibility == BuildVisibility.sandboxOnly || !t.block.unlocked()) || cores > 1))) return;
//place in the cache