more cleanup + fixes

Harvesters and house terminal work now
This commit is contained in:
Light2
2014-04-12 18:31:37 +02:00
parent c5520abff8
commit e144118364
8 changed files with 116 additions and 128 deletions
@@ -150,7 +150,10 @@ public class BuildingObject extends TangibleObject implements IPersistent {
public Vector<TangibleObject> getItemsList() {
Vector<TangibleObject> items = new Vector<TangibleObject>();
getCells().forEach(c -> c.viewChildren(c, true, false, (item) -> items.add((TangibleObject) item)));
getCells().forEach(c -> c.viewChildren(c, true, false, (item) -> {
if(!(item instanceof CreatureObject))
items.add((TangibleObject) item);
}));
return items;
}
@@ -237,8 +240,11 @@ public class BuildingObject extends TangibleObject implements IPersistent {
}
public Vector<CellObject> getCells() {
Vector<CellObject> cells = new Vector<CellObject>();
this.viewChildren(this, true, false, (cell) -> cells.add((CellObject) cell));
final Vector<CellObject> cells = new Vector<CellObject>();
this.viewChildren(this, true, false, (obj) -> {
if(obj instanceof CellObject)
cells.add((CellObject) obj);
});
return cells;
}