fixed a bug where wall item can be consumend indefinitely because checking for what's already there was not working

This commit is contained in:
minjaesong
2021-07-29 16:23:18 +09:00
parent 47e6ac6572
commit 0e3bfbb782
6 changed files with 956 additions and 1690 deletions

View File

@@ -50,7 +50,7 @@ object BlockBase {
if (gameItem.inventoryCategory == GameItem.Category.BLOCK &&
gameItem.dynamicID == ingame.world.getTileFromTerrain(mouseTile.x, mouseTile.y) ||
gameItem.inventoryCategory == GameItem.Category.WALL &&
gameItem.dynamicID == ingame.world.getTileFromWall(mouseTile.x, mouseTile.y)
gameItem.dynamicID == "wall@"+ingame.world.getTileFromWall(mouseTile.x, mouseTile.y)
)
return false

View File

@@ -378,7 +378,7 @@ class UIItemInventoryItemGrid(
if (isCompactMode && it.item != null && it.mouseUp && !tooltipSet) {
(Terrarum.ingame as? TerrarumIngame)?.setTooltipMessage(
if (INVEN_DEBUG_MODE) {
it.item?.name + "/Mat: ${it.item?.material?.identifier}"
it.item?.name + " (${it.item?.originalID}${if (it.item?.originalID == it.item?.dynamicID) "" else "/${it.item?.dynamicID}"})"
}
else {
it.item?.name