mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
axe wip
This commit is contained in:
@@ -57,7 +57,6 @@ object PickaxeCore {
|
||||
val x = mx + xoff + ox
|
||||
val y = my + yoff + oy
|
||||
|
||||
val mousePoint = Point2d(x.toDouble(), y.toDouble())
|
||||
val actorvalue = actor.actorValue
|
||||
val tile = INGAME.world.getTileFromTerrain(x, y)
|
||||
|
||||
@@ -78,6 +77,12 @@ object PickaxeCore {
|
||||
usageStatus = usageStatus or false
|
||||
continue
|
||||
}
|
||||
// return false for punchable trees
|
||||
// non-punchable trees (= "log" tile placed by log item) must be mineable in order to make them useful as decor tiles
|
||||
if (BlockCodex[tile].hasAllTagOf("TREE", "TREETRUNK", "TREESMALL")) {
|
||||
usageStatus = usageStatus or false
|
||||
continue
|
||||
}
|
||||
|
||||
// filter passed, do the job
|
||||
val actionInterval = actorvalue.getAsDouble(AVKey.ACTION_INTERVAL)!!
|
||||
|
||||
Reference in New Issue
Block a user