Skip to content

Commit

Permalink
Fixed deconstructor not accepting direct unit payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Oct 16, 2021
1 parent b7f030e commit 290450d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/mindustry/logic/LogicDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
}
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 290450d

Please sign in to comment.