Remove some Aeson processing

This commit is contained in:
2025-06-05 13:24:43 +01:00
parent 7f1b790688
commit 1293aa0fdf
3 changed files with 13 additions and 16 deletions
+8 -8
View File
@@ -8,7 +8,7 @@ module Dodge.WorldEffect (
import Dodge.Item.Grammar
import Dodge.Creature.Impulse.UseItem
import Dodge.BlBl
import Dodge.Data.Input
--import Dodge.Data.Input
import Dodge.HeldUse
import Dodge.Data.ComposedItem
import Dodge.Data.DoubleTree
@@ -38,9 +38,9 @@ doWdWd we = case we of
TorqueCr x cid -> torqueCr x cid
SoundStart so p sid mi -> soundStart so p sid mi
WdWdNegateTrig trid -> cWorld . lWorld . triggers . ix trid %~ not
WdWdFromItCrixWdWd it crid f -> \w -> fromMaybe w $ do
cr <- w ^? cWorld . lWorld . creatures . ix crid
return $ doItCrWdWd f it cr w
-- WdWdFromItCrixWdWd it crid f -> \w -> fromMaybe w $ do
-- cr <- w ^? cWorld . lWorld . creatures . ix crid
-- return $ doItCrWdWd f it cr w
MakeTempLight _ 0 -> id
MakeTempLight x t -> (cWorld . lWorld . lights .:~ x)
. (cWorld . lWorld . worldEvents .:~ MakeTempLight x (t-1))
@@ -51,10 +51,10 @@ doWdWd we = case we of
allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
return $ heldEffectMuzzles itree cr w
doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
doItCrWdWd icww = case icww of
ItCrWdItemHeldEffect -> heldEffect InitialPress
ItCrWdItemHeldEffectNoHammer -> heldEffectNoHammerCheck
--doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
--doItCrWdWd icww = case icww of
-- ItCrWdItemHeldEffect -> heldEffect InitialPress
-- ItCrWdItemHeldEffectNoHammer -> heldEffectNoHammerCheck
accessTerminal :: Maybe Int -> World -> World
accessTerminal mtmid w = fromMaybe w $ do