Remove _crInvEquipped

This commit is contained in:
2024-12-19 12:44:34 +00:00
parent 80b03e6544
commit 11b5ef74c5
8 changed files with 21 additions and 17 deletions
+7 -7
View File
@@ -50,7 +50,7 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation w of
PutOnEquipment{_allocNewPos = newp} ->
w
& crpoint . crEquipment . at newp ?~ invid
& crpoint . crInvEquipped . at invid ?~ newp
-- & crpoint . crInvEquipped . at invid ?~ newp
& crpoint . crInv . ix invid . itLocation . ilEquipPosition ?~ newp
& onequip itm cr
& crpoint %~ assignNewHotkey invid
@@ -58,22 +58,22 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation w of
w
& crpoint . crEquipment . at newp ?~ invid
& crpoint . crEquipment . at oldp .~ Nothing
& crpoint . crInvEquipped . at invid ?~ newp
-- & crpoint . crInvEquipped . at invid ?~ newp
& crpoint . crInv . ix invid . itLocation . ilEquipPosition ?~ newp
SwapEquipment{_allocNewPos = newp, _allocOldPos = oldp, _allocSwapID = sid} ->
w
& crpoint . crEquipment . at newp ?~ invid
& crpoint . crEquipment . at oldp ?~ sid
& crpoint . crInvEquipped . at invid ?~ newp
-- & crpoint . crInvEquipped . at invid ?~ newp
& crpoint . crInv . ix invid . itLocation . ilEquipPosition ?~ newp
& crpoint . crInvEquipped . at sid ?~ oldp
-- & crpoint . crInvEquipped . at sid ?~ oldp
& crpoint . crInv . ix sid . itLocation . ilEquipPosition ?~ oldp
ReplaceEquipment{_allocNewPos = newp, _allocRemoveID = rid} ->
w
& crpoint . crEquipment . at newp ?~ invid
& crpoint . crInvEquipped . at invid ?~ newp
-- & crpoint . crInvEquipped . at invid ?~ newp
& crpoint . crInv . ix invid . itLocation . ilEquipPosition ?~ newp
& crpoint . crInvEquipped . at rid .~ Nothing
-- & crpoint . crInvEquipped . at rid .~ Nothing
& crpoint . crInv . ix rid . itLocation . ilEquipPosition .~ Nothing
& onremove (itmat rid) cr
& onequip itm cr
@@ -82,7 +82,7 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation w of
RemoveEquipment{_allocOldPos = oldp} ->
w
& crpoint . crEquipment . at oldp .~ Nothing
& crpoint . crInvEquipped . at invid .~ Nothing
-- & crpoint . crInvEquipped . at invid .~ Nothing
& crpoint . crInv . ix invid . itLocation . ilEquipPosition .~ Nothing
& onremove itm cr
& crpoint %~ removeHotkey invid