inventory UI: quickslot designation

Former-commit-id: b2bddf7c271c678213f8f346d1de4b5c1dc27f60
This commit is contained in:
Song Minjae
2017-03-26 00:42:41 +09:00
parent 27a91a55fd
commit e47ffff126
29 changed files with 137 additions and 93 deletions

View File

@@ -87,5 +87,7 @@ object AVKey {
const val __PLAYER_QUICKBARSEL = "__quickbarselection"
const val __PLAYER_QUICKSLOTSEL = "__quickslotselection"
/** Item ID; they are supposed to be unique */
const val __PLAYER_QSPREFIX = "__qsitem" // __qsitem1 .. __qsitem10
}

View File

@@ -7,8 +7,6 @@ import net.torvald.terrarum.gamecontroller.EnumKeyFunc
import net.torvald.terrarum.gamecontroller.KeyMap
import net.torvald.terrarum.gameitem.InventoryItem
import net.torvald.terrarum.realestate.RealEstateUtility
import org.dyn4j.geometry.Vector2
import org.lwjgl.input.Controller
import org.newdawn.slick.GameContainer
import org.newdawn.slick.Input
import java.util.*
@@ -24,9 +22,9 @@ open class ActorHumanoid(birth: GameDate, death: GameDate? = null)
/** Must be set by PlayerFactory */
override var inventory: ActorInventory = ActorInventory()
override val itemEquipped = Array<InventoryItem?>(InventoryItem.EquipPosition.INDEX_MAX + 1, { null })
/** Must be set by PlayerFactory */
override var faction: HashSet<Faction> = HashSet()
/**

View File

@@ -18,7 +18,7 @@ object PlayerBuilder {
// attach sprite
// do etc.
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
p.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] = 0
return p
}

View File

@@ -18,7 +18,7 @@ object PlayerBuilderCynthia {
InjectCreatureRaw(p.actorValue, "CreatureHuman.json")
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
p.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] = 0
p.actorValue[AVKey.NAME] = "Cynthia"

View File

@@ -60,7 +60,7 @@ object PlayerBuilderSigrid {
p.actorValue[AVKey.BASEDEFENCE] = 141
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
p.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] = 0
//p.actorValue["__selectedtile"] = 147 // test code; replace with <tile_item>.primaryUse(gc, delta)
p.actorValue["__aimhelper"] = true // TODO when you'll gonna implement it?

View File

@@ -12,7 +12,7 @@ object PlayerBuilderTestSubject1 {
InjectCreatureRaw(p.actorValue, "CreatureHuman.json")
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
p.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] = 0
p.actorValue[AVKey.NAME] = "Test Subject 1"