mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
sound effects for tile placing and breaking
This commit is contained in:
@@ -105,6 +105,7 @@ object PickaxeCore {
|
||||
dropItem(drop, x, y)
|
||||
}
|
||||
makeDust(tile, x, y, 9)
|
||||
makeNoise(actor, tile)
|
||||
}
|
||||
}
|
||||
// tile not busted
|
||||
@@ -166,6 +167,12 @@ object PickaxeCore {
|
||||
}
|
||||
}
|
||||
|
||||
fun makeNoise(actor: ActorWithBody, tile: ItemID) {
|
||||
Terrarum.audioCodex.getRandomFootstep(BlockCodex[tile].material)?.let {
|
||||
actor.startAudio(it, 2.0)
|
||||
}
|
||||
}
|
||||
|
||||
fun endPrimaryUse(actor: ActorWithBody, item: GameItem?): Boolean {
|
||||
item?.using = false
|
||||
// reset action timer to zero
|
||||
|
||||
Reference in New Issue
Block a user