This commit is contained in:
Anuken
2019-09-21 16:44:47 -04:00
parent 5955ecefd3
commit d062d8081a
9 changed files with 30 additions and 14 deletions

View File

@@ -156,7 +156,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
return;
}
if(!Gamemode.survival.valid(map)){
if(!Structs.contains(Gamemode.all, g -> g.valid(map))){
ui.showErrorMessage("$map.nospawn");
return;
}
@@ -260,6 +260,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
state.teams = new Teams();
player.reset();
state.rules = Gamemode.editor.apply(lastSavedRules.copy());
state.rules.zone = null;
world.setMap(new Map(StringMap.of(
"name", "Editor Playtesting",
"width", editor.width(),

View File

@@ -195,6 +195,7 @@ public class LoadDialog extends FloatingDialog{
try{
net.reset();
slot.load();
state.rules.zone = null;
state.set(State.playing);
}catch(SaveException e){
Log.err(e);

View File

@@ -73,7 +73,7 @@ public class LaunchPad extends StorageBlock{
public void update(Tile tile){
TileEntity entity = tile.entity;
if(entity.cons.valid() && world.isZone() && entity.items.total() >= itemCapacity && entity.timer.get(timerLaunch, launchTime / entity.timeScale)){
if(world.isZone() && entity.cons.valid() && world.isZone() && entity.items.total() >= itemCapacity && entity.timer.get(timerLaunch, launchTime / entity.timeScale)){
for(Item item : Vars.content.items()){
Events.fire(Trigger.itemLaunch);
Effects.effect(Fx.padlaunch, tile);