mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 14:04:05 +09:00
inventory UI: quickslot designation
Former-commit-id: b2bddf7c271c678213f8f346d1de4b5c1dc27f60
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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()
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ object PlayerBuilder {
|
||||
// attach sprite
|
||||
|
||||
// do etc.
|
||||
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
|
||||
p.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] = 0
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user