mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
Loading item from module using Groovy
This commit is contained in:
@@ -230,7 +230,8 @@ class GameWorld(val width: Int, val height: Int) {
|
||||
/**
|
||||
* @return true if block is broken
|
||||
*/
|
||||
fun inflctTerrainDamage(x: Int, y: Int, damage: Float): Boolean {
|
||||
fun inflictTerrainDamage(x: Int, y: Int, damage: Double): Boolean {
|
||||
val damage = damage.toFloat()
|
||||
val addr = LandUtil.getTileAddr(x, y)
|
||||
|
||||
//println("[GameWorld] ($x, $y) Damage: $damage")
|
||||
@@ -261,7 +262,8 @@ class GameWorld(val width: Int, val height: Int) {
|
||||
/**
|
||||
* @return true if block is broken
|
||||
*/
|
||||
fun inflctWallDamage(x: Int, y: Int, damage: Float): Boolean {
|
||||
fun inflictWallDamage(x: Int, y: Int, damage: Double): Boolean {
|
||||
val damage = damage.toFloat()
|
||||
val addr = LandUtil.getTileAddr(x, y)
|
||||
|
||||
if (wallDamages[addr] == null) { // add new
|
||||
|
||||
Reference in New Issue
Block a user