Rewrote impling system

Fixed static impling spawns
Fixed impling spawn ratio
Reworked Puro-Puro, much more authentic
Imp defenders now work properly
Crop circles now appear
Added admin command ::implings to list active implings (excludes implings from Puro-Puro)
Fixed bug where you could add to a finished compost bin
This commit is contained in:
Ceikry
2023-04-20 12:16:21 +00:00
committed by Ryan
parent 41c970efd4
commit f6096e3020
24 changed files with 915 additions and 457 deletions
+31
View File
@@ -427,6 +427,28 @@ fun replaceScenery(toReplace: Scenery, with: Int, forTicks: Int, loc: Location?
toReplace.isActive = false
}
/**
* Add a scenery to the world
* @param sceneryId the ID of the scenery to add
* @param location the location to place it at
* @param rotation the rotation of the scenery (default 0)
* @param type the type of the scenery (default 22)
* @return the created scenery
*/
fun addScenery (sceneryId: Int, location: Location, rotation: Int = 0, type: Int = 22) : Scenery {
val scenery = Scenery(sceneryId, location, type, rotation)
SceneryBuilder.add(scenery)
return scenery
}
/**
* Remove a scenery from the world
* @param scenery the Scenery object to remove.
*/
fun removeScenery (scenery: Scenery) {
SceneryBuilder.remove(scenery)
}
/**
* Replace an object with the given revert timer with the given rotation
* @param toReplace the Scenery instance we are replacing
@@ -642,6 +664,15 @@ fun face(entity: Entity, toFace: Node, duration: Int = -1) {
}
}
/**
* Causes the given entity to reset its face direction.
* @param entity the entity to reset.
*/
fun resetFace (entity: Entity) {
entity.face(null)
entity.faceLocation(entity.location)
}
/**
* Opens the given interface for the given player
* @param player the player to open the interface for