From 290450de5bf762e2507a2dae3160edd364e93354 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 16 Oct 2021 13:01:03 -0400 Subject: [PATCH] Fixed deconstructor not accepting direct unit payloads --- core/src/mindustry/logic/LogicDialog.java | 6 ++---- .../world/blocks/payloads/PayloadDeconstructor.java | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/logic/LogicDialog.java b/core/src/mindustry/logic/LogicDialog.java index 17a2ff880e55..115526d70f19 100644 --- a/core/src/mindustry/logic/LogicDialog.java +++ b/core/src/mindustry/logic/LogicDialog.java @@ -70,7 +70,6 @@ public LogicDialog(){ p.margin(10f).marginRight(16f); p.table(Tex.button, t -> { t.defaults().fillX().height(45f); - int i = 0; for(var s : executor.vars){ if(s.constant) continue; @@ -122,14 +121,13 @@ public LogicDialog(){ label.act(1f); }).padRight(pad); + //TODO type name does not update, is this important? t.add(new Image(Tex.whiteui, color.cpy().mul(mul))).width(stub); t.stack(new Image(Tex.whiteui, color), new Label(" " + typeName + " ", Styles.outlineLabel)); t.row(); - t.add().growX().colspan(6).height(4); - - t.row(); + t.add().growX().colspan(6).height(4).row(); } }); }); diff --git a/core/src/mindustry/world/blocks/payloads/PayloadDeconstructor.java b/core/src/mindustry/world/blocks/payloads/PayloadDeconstructor.java index 328549f0a4a9..e94d59fc80cf 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadDeconstructor.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadDeconstructor.java @@ -85,6 +85,11 @@ public void draw(){ Draw.rect(topRegion, x, y); } + @Override + public boolean acceptUnitPayload(Unit unit){ + return payload == null && !unit.spawnedByCore; + } + @Override public void handlePayload(Building source, Payload payload){ super.handlePayload(source, payload);