Introduce idea of world event flags

This commit is contained in:
2023-02-23 11:46:45 +00:00
parent da49d7003e
commit fc0fd5fa37
7 changed files with 87 additions and 60 deletions
+1
View File
@@ -26,6 +26,7 @@ useItem cr' w = fromMaybe (f w) $ do
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
it <- cr ^? crInv . ix itRef
return $ itemEffect cr it w
& worldEventFlags . at InventoryChange ?~ ()
where
f = cWorld . lWorld . creatures . ix (_crID cr') . crHammerPosition .~ HammerDown