Attempt to simplify text positioning
This commit is contained in:
@@ -77,7 +77,7 @@ toggleEquipmentAt rbops invid cr w = case rbops ^? opAllocateEquipment of
|
||||
& crpoint . crEquipment . at newp ?~ invid
|
||||
& crpoint . crInvEquipped . at invid ?~ newp
|
||||
& onequip itm cr
|
||||
& assignNewHotkey invid
|
||||
& crpoint %~ assignNewHotkey invid
|
||||
Just MoveEquipment{_allocNewPos = newp, _allocOldPos = oldp} ->
|
||||
w
|
||||
& crpoint . crEquipment . at newp ?~ invid
|
||||
@@ -97,7 +97,7 @@ toggleEquipmentAt rbops invid cr w = case rbops ^? opAllocateEquipment of
|
||||
& onremove (itmat rid) cr
|
||||
& onequip itm cr
|
||||
& crpoint %~ removeHotkey rid
|
||||
& assignNewHotkey invid
|
||||
& crpoint %~ assignNewHotkey invid
|
||||
Just RemoveEquipment{_allocOldPos = oldp} ->
|
||||
w
|
||||
& crpoint . crEquipment . at oldp .~ Nothing
|
||||
|
||||
@@ -90,7 +90,7 @@ tryAssignHotkey w sc = fromMaybe w $ do
|
||||
guard (pt == InitialPress)
|
||||
cr <- w ^? cWorld . lWorld . creatures . ix 0
|
||||
itid <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
return $ assignHotkey itid (scancodeToHotkey sc) w
|
||||
return $ w & cWorld . lWorld . creatures . ix 0 %~ assignHotkey itid (scancodeToHotkey sc)
|
||||
|
||||
-- | Turn key presses into creature movement.
|
||||
-- | note the order of operation, setting the posture first--this prevents the twist fire bug
|
||||
|
||||
Reference in New Issue
Block a user