door and its ghost now spawns at the right position in the world

This commit is contained in:
minjaesong
2022-07-19 21:46:59 +09:00
parent 06ef46d369
commit 78d249cb6e
6 changed files with 83 additions and 77 deletions

View File

@@ -36,7 +36,7 @@ class ItemHomeComputer(originalID: ItemID) : GameItem(originalID) {
override fun startPrimaryUse(actor: ActorWithBody, delta: Float) = mouseInInteractableRange(actor) {
val item = FixtureHomeComputer()
if (item.spawn(Terrarum.mouseTileX, Terrarum.mouseTileY - item.blockBox.height + 1)) 1L else -1L
if (item.spawn(Terrarum.mouseTileX, Terrarum.mouseTileY)) 1L else -1L
// return true when placed, false when cannot be placed
}
}