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.margin(10f).marginRight(16f);
|
||||||
p.table(Tex.button, t -> {
|
p.table(Tex.button, t -> {
|
||||||
t.defaults().fillX().height(45f);
|
t.defaults().fillX().height(45f);
|
||||||
int i = 0;
|
|
||||||
for(var s : executor.vars){
|
for(var s : executor.vars){
|
||||||
if(s.constant) continue;
|
if(s.constant) continue;
|
||||||
|
|
||||||
@@ -122,14 +121,13 @@ public class LogicDialog extends BaseDialog{
|
|||||||
label.act(1f);
|
label.act(1f);
|
||||||
}).padRight(pad);
|
}).padRight(pad);
|
||||||
|
|
||||||
|
//TODO type name does not update, is this important?
|
||||||
t.add(new Image(Tex.whiteui, color.cpy().mul(mul))).width(stub);
|
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.stack(new Image(Tex.whiteui, color), new Label(" " + typeName + " ", Styles.outlineLabel));
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.add().growX().colspan(6).height(4);
|
t.add().growX().colspan(6).height(4).row();
|
||||||
|
|
||||||
t.row();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -85,6 +85,11 @@ public class PayloadDeconstructor extends PayloadBlock{
|
|||||||
Draw.rect(topRegion, x, y);
|
Draw.rect(topRegion, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean acceptUnitPayload(Unit unit){
|
||||||
|
return payload == null && !unit.spawnedByCore;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlePayload(Building source, Payload payload){
|
public void handlePayload(Building source, Payload payload){
|
||||||
super.handlePayload(source, payload);
|
super.handlePayload(source, payload);
|
||||||
|
|||||||
Reference in New Issue
Block a user