Test fixes
This commit is contained in:
@@ -77,7 +77,7 @@ public class FileMapGenerator implements WorldGenerator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(tile.isCenter() && tile.block() instanceof CoreBlock && tile.team() == state.rules.defaultTeam && !anyCores){
|
if(tile.isCenter() && tile.block() instanceof CoreBlock && tile.team() == state.rules.defaultTeam && !anyCores){
|
||||||
if(sector != null && sector.allowLaunchLoadout()){
|
if(state.rules.sector != null && state.rules.sector.allowLaunchLoadout()){
|
||||||
Schematics.placeLaunchLoadout(tile.x, tile.y);
|
Schematics.placeLaunchLoadout(tile.x, tile.y);
|
||||||
}
|
}
|
||||||
anyCores = true;
|
anyCores = true;
|
||||||
|
|||||||
@@ -44,6 +44,17 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
|
|
||||||
ItemSeq sitems = sector.items();
|
ItemSeq sitems = sector.items();
|
||||||
|
|
||||||
|
//hide nonsensical items
|
||||||
|
ItemSeq launch = universe.getLaunchResources();
|
||||||
|
if(sector.planet.allowLaunchLoadout){
|
||||||
|
for(var item : content.items()){
|
||||||
|
if(sector.planet.hiddenItems.contains(item)){
|
||||||
|
launch.set(item, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
universe.updateLaunchResources(launch);
|
||||||
|
}
|
||||||
|
|
||||||
//updates sum requirements
|
//updates sum requirements
|
||||||
Runnable update = () -> {
|
Runnable update = () -> {
|
||||||
int cap = lastCapacity = (int)(sector.planet.launchCapacityMultiplier * selected.findCore().itemCapacity);
|
int cap = lastCapacity = (int)(sector.planet.launchCapacityMultiplier * selected.findCore().itemCapacity);
|
||||||
|
|||||||
@@ -873,6 +873,7 @@ public class ApplicationTests{
|
|||||||
Time.setDeltaProvider(() -> 1f);
|
Time.setDeltaProvider(() -> 1f);
|
||||||
|
|
||||||
logic.reset();
|
logic.reset();
|
||||||
|
state.rules.sector = zone.sector;
|
||||||
try{
|
try{
|
||||||
world.loadGenerator(zone.generator.map.width, zone.generator.map.height, zone.generator::generate);
|
world.loadGenerator(zone.generator.map.width, zone.generator.map.height, zone.generator::generate);
|
||||||
}catch(SaveException e){
|
}catch(SaveException e){
|
||||||
|
|||||||
Reference in New Issue
Block a user