fixed various quirks and removed dirty hacks on quickslot bar/pie

This commit is contained in:
minjaesong
2019-01-12 22:56:48 +09:00
parent 7900628d9e
commit 822b9bf4fd
17 changed files with 207 additions and 175 deletions

View File

@@ -589,7 +589,7 @@ open class ActorHumanoid(
// quickslot implementation
if (key == AVKey.__PLAYER_QUICKSLOTSEL && value != null) {
// ONLY FOR HAND_GRIPs!!
val quickBarItem = inventory.getQuickBar(actorValue.getAsInt(key)!!)?.item
val quickBarItem = inventory.getQuickslot(actorValue.getAsInt(key)!!)?.item
if (quickBarItem != null && quickBarItem.equipPosition == GameItem.EquipPosition.HAND_GRIP) {
equipItem(quickBarItem)

View File

@@ -130,7 +130,7 @@ class ActorInventory(val actor: Pocketed, var maxCapacity: Int, var capacityMode
quickBar[slot] = dynamicID
}
fun getQuickBar(slot: Int): InventoryPair? = getByDynamicID(quickBar[slot])
fun getQuickslot(slot: Int): InventoryPair? = getByDynamicID(quickBar[slot])
/**
* HashMap<GameItem, Amounts>

View File

@@ -31,6 +31,8 @@ object PlayerBuilderTestSubject1 {
PlayerBuilderSigrid.fillTestInventory(p.inventory)
p.isNoClip = true
return p
}