mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Fix WiredEffectTriggerStacks NPE.
This commit is contained in:
parent
f261e8c10c
commit
fc6dd9790d
@ -102,7 +102,7 @@ public class WiredEffectTriggerStacks extends InteractionWiredEffect {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(RoomUnit roomUnit, Room room, Object[] stuff) {
|
public boolean execute(RoomUnit roomUnit, Room room, Object[] stuff) {
|
||||||
if (stuff != null && stuff.length >= 1 && stuff[stuff.length - 1] instanceof WiredEffectTriggerStacks) {
|
if (stuff == null && stuff.length >= 1 && stuff[stuff.length - 1] instanceof WiredEffectTriggerStacks) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,14 +126,14 @@ public class WiredEffectTriggerStacks extends InteractionWiredEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Object[] newStuff = new Object[stuff.length + 1];
|
||||||
|
System.arraycopy(stuff, 0, newStuff, 0, stuff.length);
|
||||||
|
newStuff[newStuff.length - 1] = this;
|
||||||
|
WiredHandler.executeEffectsAtTiles(usedTiles, roomUnit, room, stuff);
|
||||||
|
|
||||||
Object[] newStuff = new Object[stuff.length + 1];
|
return true;
|
||||||
System.arraycopy(stuff, 0, newStuff, 0, stuff.length);
|
}
|
||||||
newStuff[newStuff.length - 1] = this;
|
|
||||||
WiredHandler.executeEffectsAtTiles(usedTiles, roomUnit, room, stuff);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getWiredData() {
|
public String getWiredData() {
|
||||||
|
Loading…
Reference in New Issue
Block a user