This commit is contained in:
minjaesong
2023-11-13 13:55:32 +09:00
parent 662a265ea6
commit 60e8aa45cd
4 changed files with 176 additions and 10 deletions

View File

@@ -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)!!