From 66f4118896f95439cba20965f4f9ab2c83246c81 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 15 Jan 2023 15:19:13 -0500 Subject: [PATCH] Fixed #8184 --- core/src/mindustry/core/Logic.java | 5 +++++ core/src/mindustry/ui/dialogs/ResearchDialog.java | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index ac9c33b986..20deb9b6da 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -383,7 +383,12 @@ public class Logic implements ApplicationListener{ public static void researched(Content content){ if(!(content instanceof UnlockableContent u)) return; + boolean was = !u.unlockedNow(); state.rules.researched.add(u.name); + + if(!was){ + Events.fire(new UnlockEvent(u)); + } } @Override diff --git a/core/src/mindustry/ui/dialogs/ResearchDialog.java b/core/src/mindustry/ui/dialogs/ResearchDialog.java index 1915bcd974..e0812796a5 100644 --- a/core/src/mindustry/ui/dialogs/ResearchDialog.java +++ b/core/src/mindustry/ui/dialogs/ResearchDialog.java @@ -177,6 +177,15 @@ public class ResearchDialog extends BaseDialog{ }); } + @Override + public Dialog show(){ + if(net.client()){ + ui.showInfo("@research.multiplayer"); + return this; + } + return show(Core.scene); + } + void checkMargin(){ if(Core.graphics.isPortrait() && showTechSelect){ itemDisplay.marginTop(60f);