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
@@ -1,6 +1,6 @@
package content.global.skill.farming
import core.api.toIntArray
import core.api.*
import core.game.node.item.Item
import core.game.system.task.Pulse
import core.game.world.update.flag.context.Animation
@@ -65,7 +65,7 @@ class UseWithBinHandler : InteractionListener {
if(bin.isFull()){
player.sendMessage("This compost bin is already full.")
return@onUseWith true
} else {
} else if (!bin.isFinished) {
player.pulseManager.run(object : Pulse(fillAnim.duration){
override fun pulse(): Boolean {
player.animator.animate(fillAnim)
@@ -75,6 +75,8 @@ class UseWithBinHandler : InteractionListener {
return bin.isFull() || player.inventory.getAmount(usedNode.asItem()) == 0
}
})
} else {
sendMessage (player, "You should empty the remaining compost first.")
}
}
return@onUseWith true
@@ -100,4 +102,4 @@ class UseWithBinHandler : InteractionListener {
if(this != 6476) return this + 2
else return Items.VIAL_229
}
}
}