Fixed #4474 / Fixed #4475 / Fixed #4476 / Fixed #4483

This commit is contained in:
Anuken
2021-01-31 15:51:42 -05:00
parent f1a5aae30a
commit 3d201f7042
5 changed files with 31 additions and 20 deletions

View File

@@ -123,6 +123,7 @@ public class Universe{
}
/** @return the last selected loadout for this specific core type. */
@Nullable
public Schematic getLoadout(CoreBlock core){
//for tools - schem
if(schematics == null) return Loadouts.basicShard;
@@ -134,7 +135,7 @@ public class Universe{
Seq<Schematic> all = schematics.getLoadouts(core);
Schematic schem = all.find(s -> s.file != null && s.file.nameWithoutExtension().equals(file));
return schem == null ? all.first() : schem;
return schem == null ? all.any() ? all.first() : null : schem;
}
/** Runs possible events. Resets event counter. */