fix gates having a shared set of expansion trigger/actions

This commit is contained in:
asiekierka 2015-04-28 18:41:55 +02:00
parent 50160ee54c
commit 58c230f248
2 changed files with 7 additions and 11 deletions

View file

@ -18,6 +18,10 @@ public class PipeActionProvider implements IActionProvider {
Pipe<?> pipe = null;
if (container instanceof IGate) {
pipe = (Pipe<?>) ((IGate) container).getPipe();
if (container instanceof Gate) {
((Gate) container).addActions(result);
}
}
if (pipe == null) {
@ -26,12 +30,6 @@ public class PipeActionProvider implements IActionProvider {
result.addAll(pipe.getActions());
for (Gate gate : pipe.gates) {
if (gate != null) {
gate.addActions(result);
}
}
return result;
}

View file

@ -34,11 +34,9 @@ public class PipeTriggerProvider implements ITriggerProvider {
boolean containsGate = false;
for (Gate gate : pipe.gates) {
if (gate != null) {
if (container instanceof Gate) {
containsGate = true;
gate.addTriggers(result);
}
((Gate) container).addTriggers(result);
}
switch (((TileGenericPipe) tile).getPipeType()) {