From 22aeddc655468ccf1f7fc2c90c5073603a9e9e20 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 28 Nov 2018 20:30:34 -0500 Subject: [PATCH] Fixed screenshot key firing when chat open --- core/src/io/anuke/mindustry/core/Control.java | 2 +- core/src/io/anuke/mindustry/game/Unlocks.java | 21 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 84991cacce..465015f230 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -372,7 +372,7 @@ public class Control extends Module{ } } - if(Inputs.keyTap("screenshot")){ + if(Inputs.keyTap("screenshot") && !ui.chatfrag.chatOpen()){ renderer.takeMapScreenshot(); } diff --git a/core/src/io/anuke/mindustry/game/Unlocks.java b/core/src/io/anuke/mindustry/game/Unlocks.java index ff2853f59b..7b624263b9 100644 --- a/core/src/io/anuke/mindustry/game/Unlocks.java +++ b/core/src/io/anuke/mindustry/game/Unlocks.java @@ -1,8 +1,6 @@ package io.anuke.mindustry.game; -import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.ObjectMap; -import com.badlogic.gdx.utils.ObjectMap.Entry; import com.badlogic.gdx.utils.ObjectSet; import io.anuke.mindustry.game.EventType.UnlockEvent; import io.anuke.mindustry.type.ContentType; @@ -67,27 +65,8 @@ public class Unlocks{ save(); } - /**Loads 'legacy' unlocks. Will be removed in final release.*/ - public void tryLoadLegacy(){ - try{ - ObjectMap>> sets = Settings.getObject("content-sets", ObjectMap.class, ObjectMap::new); - for(Entry> entry : sets.get("root").entries()){ - unlocked.put(entry.key, new ObjectSet<>()); - unlocked.get(entry.key).addAll(entry.value); - } - }catch(Throwable t){ - t.printStackTrace(); - } - Settings.prefs().remove("content-sets"); - Settings.save(); - } - public void load(){ unlocked = Settings.getObject("unlockset", ObjectMap.class, ObjectMap::new); - - if(Settings.has("content-sets")){ - tryLoadLegacy(); - } } public void save(){