mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
World Click events
let's hope it works w/o tests as I can't get to the Ingame now
This commit is contained in:
@@ -50,7 +50,7 @@ open class HumanoidNPC(
|
||||
override val isDynamic = false
|
||||
override val material = Material(0,0,0,0,0,0,0,0,0,0.0)
|
||||
|
||||
override fun secondaryUse(delta: Float): Boolean {
|
||||
override fun startSecondaryUse(delta: Float): Boolean {
|
||||
try {
|
||||
// place the actor to the world
|
||||
this@HumanoidNPC.setPosition(Terrarum.mouseX, Terrarum.mouseY)
|
||||
|
||||
@@ -69,13 +69,13 @@ interface Pocketed {
|
||||
|
||||
|
||||
fun consumePrimary(item: GameItem) {
|
||||
if (item.primaryUse(Terrarum.deltaTime)) {
|
||||
if (item.startPrimaryUse(Terrarum.deltaTime)) {
|
||||
inventory.consumeItem(this as Actor, item) // consume on successful
|
||||
}
|
||||
}
|
||||
|
||||
fun consumeSecondary(item: GameItem) {
|
||||
if (item.secondaryUse(Terrarum.deltaTime))
|
||||
if (item.startSecondaryUse(Terrarum.deltaTime))
|
||||
inventory.consumeItem(this as Actor, item) // consume on successful
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user