Extend inv item location information to include "attached" items

This commit is contained in:
2024-09-24 21:26:26 +01:00
parent fbb60bf358
commit fe00af0e73
17 changed files with 184 additions and 131 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ followImpulse cr w imp = case imp of
TurnTo p -> crup $ creatureTurnTo p cr
ChangePosture post -> crup $ cr & crStance . posture .~ post
UseItem -> (useRootItem $ _crID cr, cr)
SwitchToItem i -> crup $ cr & crManipulation . manObject .~ InInventory (SelectedItem i i)
SwitchToItem i -> crup $ cr & crManipulation . manObject .~ InInventory (SelectedItem i i mempty)
Melee cid' ->
( hitCr cid'
, crMvAbsolute (10 *.* normalizeV (posFromID cid' -.- cpos)) $ cr & crMeleeCooldown .~ 20