mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
code cleanup, shortening things
Former-commit-id: d1c81cf3207fff4dd311e9b6c3beb04c194aebc5 Former-commit-id: 26f5042ba41cd577e681a22465435945434c864b
This commit is contained in:
@@ -5,7 +5,7 @@ import net.torvald.terrarum.gameactors.ActorInventory
|
||||
import net.torvald.terrarum.gameactors.Player
|
||||
import net.torvald.terrarum.gameactors.Pocketed
|
||||
import net.torvald.terrarum.gameitem.EquipPosition
|
||||
import net.torvald.terrarum.itemproperties.ItemPropCodex
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
|
||||
/**
|
||||
* Created by SKYHi14 on 2016-12-12.
|
||||
@@ -55,11 +55,11 @@ internal object Inventory : ConsoleCommand {
|
||||
}
|
||||
|
||||
private fun addItem(refId: Int, amount: Int = 1) {
|
||||
target.inventory.add(ItemPropCodex[refId], amount)
|
||||
target.inventory.add(ItemCodex[refId], amount)
|
||||
}
|
||||
|
||||
private fun equipItem(refId: Int) {
|
||||
val item = ItemPropCodex[refId]
|
||||
val item = ItemCodex[refId]
|
||||
|
||||
// if the item does not exist, add it first
|
||||
if (!target.inventory.contains(item)) {
|
||||
|
||||
Reference in New Issue
Block a user