From af0d0be294b2348111c157e96223e70ac3acc864 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 9 May 2025 13:23:33 -0400 Subject: [PATCH] Fixed #10785 --- core/src/mindustry/core/Logic.java | 4 ++-- core/src/mindustry/ui/dialogs/PlanetDialog.java | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 7246fcc43d..6a0dd376ba 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -66,9 +66,8 @@ public class Logic implements ApplicationListener{ Events.on(SaveLoadEvent.class, e -> { if(state.isCampaign()){ state.rules.coreIncinerates = true; - - //TODO why is this even a thing? state.rules.canGameOver = true; + state.rules.allowEditRules = false; //fresh map has no sector info if(!e.isMap){ @@ -132,6 +131,7 @@ public class Logic implements ApplicationListener{ //enable building AI on campaign unless the preset disables it state.rules.coreIncinerates = true; + state.rules.allowEditRules = false; state.rules.allowEditWorldProcessors = false; state.rules.waveTeam.rules().infiniteResources = true; state.rules.waveTeam.rules().fillItems = true; diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 892315a2be..ce23e66abc 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -633,6 +633,11 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ public void act(float delta){ if(scene.getDialog() == PlanetDialog.this && (scene.getHoverElement() == null || !scene.getHoverElement().isDescendantOf(e -> e instanceof ScrollPane))){ scene.setScrollFocus(PlanetDialog.this); + + if(debugSectorAttackEdit && input.ctrl() && input.keyTap(KeyCode.c)){ + Core.app.setClipboardText(state.planet.writeAttackSectorBits()); + Vars.ui.showInfoFade("@copied"); + } } super.act(delta);