mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Changed order or operations so Buildheight event can override max/min height of tiles
This commit is contained in:
parent
96b5b29bed
commit
631dbe9d38
@ -4732,6 +4732,9 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(height > MAXIMUM_FURNI_HEIGHT) return FurnitureMovementError.CANT_STACK;
|
||||||
|
if(height < this.getLayout().getHeightAtSquare(tile.x, tile.y)) return FurnitureMovementError.CANT_STACK; //prevent furni going under the floor
|
||||||
|
|
||||||
if (Emulator.getPluginManager().isRegistered(FurnitureBuildheightEvent.class, true)) {
|
if (Emulator.getPluginManager().isRegistered(FurnitureBuildheightEvent.class, true)) {
|
||||||
FurnitureBuildheightEvent event = Emulator.getPluginManager().fireEvent(new FurnitureBuildheightEvent(item, actor, 0.00, height));
|
FurnitureBuildheightEvent event = Emulator.getPluginManager().fireEvent(new FurnitureBuildheightEvent(item, actor, 0.00, height));
|
||||||
if (event.hasChangedHeight()) {
|
if (event.hasChangedHeight()) {
|
||||||
@ -4739,9 +4742,6 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(height > MAXIMUM_FURNI_HEIGHT) return FurnitureMovementError.CANT_STACK;
|
|
||||||
if(height < this.getLayout().getHeightAtSquare(tile.x, tile.y)) return FurnitureMovementError.CANT_STACK; //prevent furni going under the floor
|
|
||||||
|
|
||||||
item.setX(tile.x);
|
item.setX(tile.x);
|
||||||
item.setY(tile.y);
|
item.setY(tile.y);
|
||||||
item.setZ(height);
|
item.setZ(height);
|
||||||
|
Loading…
Reference in New Issue
Block a user