Fixed deconstructor not accepting direct unit payloads
This commit is contained in:
@@ -70,7 +70,6 @@ public class LogicDialog extends BaseDialog{
|
||||
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 class LogicDialog extends BaseDialog{
|
||||
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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -85,6 +85,11 @@ public class PayloadDeconstructor extends PayloadBlock{
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user