mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
dump (another useless message)
This commit is contained in:
@@ -137,7 +137,7 @@ class UIItemInventoryElem(
|
||||
|
||||
override fun keyDown(keycode: Int): Boolean {
|
||||
if (item != null && Terrarum.ingame != null && keycode in Input.Keys.NUM_1..Input.Keys.NUM_0) {
|
||||
val inventory = (Terrarum.ingame!! as Ingame).player.inventory
|
||||
val inventory = (Terrarum.ingame!! as Ingame).playableActor.inventory
|
||||
val slot = if (keycode == Input.Keys.NUM_0) 9 else keycode - Input.Keys.NUM_1
|
||||
val currentSlotItem = inventory?.getQuickBar(slot)
|
||||
|
||||
@@ -167,7 +167,7 @@ class UIItemInventoryElem(
|
||||
|
||||
// equip da shit
|
||||
val itemEquipSlot = item!!.equipPosition
|
||||
val player = (Terrarum.ingame!! as Ingame).player
|
||||
val player = (Terrarum.ingame!! as Ingame).playableActor
|
||||
|
||||
if (item != player.inventory.itemEquipped.get(itemEquipSlot)) { // if this item is unequipped, equip it
|
||||
player.equipItem(item!!)
|
||||
|
||||
Reference in New Issue
Block a user