unit payload improvements
This commit is contained in:
@@ -234,6 +234,18 @@ public class PayloadConveyor extends Block{
|
||||
updatePayload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyed() {
|
||||
super.onDestroyed();
|
||||
if (item != null) item.dump();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoved() {
|
||||
super.onRemoved();
|
||||
if (item != null) item.dump();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
super.write(write);
|
||||
|
||||
@@ -82,6 +82,18 @@ public class PayloadAcceptor extends Block{
|
||||
return t;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyed() {
|
||||
super.onDestroyed();
|
||||
if (payload != null) payload.dump();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoved() {
|
||||
super.onRemoved();
|
||||
if (payload != null) payload.dump();
|
||||
}
|
||||
|
||||
public boolean blends(int direction){
|
||||
return PayloadAcceptor.blends(this, direction);
|
||||
}
|
||||
@@ -126,6 +138,7 @@ public class PayloadAcceptor extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void dumpPayload(){
|
||||
if(payload.dump()){
|
||||
payload = null;
|
||||
|
||||
Reference in New Issue
Block a user