always sorting arraylist; more wire stuffs

This commit is contained in:
minjaesong
2019-03-12 19:50:28 +09:00
parent 0563ef0940
commit 08aa0e8f34
30 changed files with 288 additions and 115 deletions

View File

@@ -588,7 +588,7 @@ open class ActorHumanoid(
}
override fun onActorValueChange(key: String, value: Any?) {
// quickslot implementation
// make quickslot work
if (key == AVKey.__PLAYER_QUICKSLOTSEL && value != null) {
// ONLY FOR HAND_GRIPs!!
val quickBarItem = ItemCodex[inventory.getQuickslot(actorValue.getAsInt(key)!!)?.item]
@@ -596,6 +596,9 @@ open class ActorHumanoid(
if (quickBarItem != null && quickBarItem.equipPosition == GameItem.EquipPosition.HAND_GRIP) {
equipItem(quickBarItem)
}
else {
unequipSlot(GameItem.EquipPosition.HAND_GRIP)
}
// force update inventory UI
try {