From 29fe5dab0686b522af9c30f3cfa38074ce94f571 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 5 Dec 2020 21:24:27 -0500 Subject: [PATCH] Allow client research --- .../mindustry/ui/dialogs/ResearchDialog.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/core/src/mindustry/ui/dialogs/ResearchDialog.java b/core/src/mindustry/ui/dialogs/ResearchDialog.java index 49701dbe76..f78d98e77b 100644 --- a/core/src/mindustry/ui/dialogs/ResearchDialog.java +++ b/core/src/mindustry/ui/dialogs/ResearchDialog.java @@ -172,16 +172,6 @@ public class ResearchDialog extends BaseDialog{ }); } - @Override - public Dialog show(){ - if(net.client()){ - ui.showInfo("@research.multiplayer"); - return this; - } - - return super.show(); - } - void treeLayout(){ float spacing = 20f; LayoutNode node = new LayoutNode(root, null); @@ -439,6 +429,14 @@ public class ResearchDialog extends BaseDialog{ void unlock(TechNode node){ node.content.unlock(); + + //unlock parent nodes in multiplayer. + TechNode parent = node.parent; + while(parent != null){ + parent.content.unlock(); + parent = parent.parent; + } + checkNodes(root); hoverNode = null; treeLayout();