fix gates having a shared set of expansion trigger/actions
This commit is contained in:
parent
50160ee54c
commit
58c230f248
2 changed files with 7 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue