Make torch use battery power

This commit is contained in:
2024-10-02 23:53:38 +01:00
parent 49ffbfafc2
commit 844bb486e6
13 changed files with 72 additions and 76 deletions
+3 -9
View File
@@ -1,4 +1,6 @@
module Dodge.ItEffect where
module Dodge.ItEffect
( doInvEffect
) where
import qualified IntMapHelp as IM
import Control.Lens
@@ -12,15 +14,11 @@ doInvEffect iie = case iie of
ChargeIfInInventory -> chargeIfInInventory
SetCharge i -> setItemCharge i
EffectRootNotroot f g -> rootNotrootEff f g
CreateHeldLight -> createHeldLight
CreateShieldWall -> createShieldWall
RemoveShieldWall -> removeShieldWall
EffectWhileRoot f -> rootNotrootEff f NoInvEffect
EffectWhileAttached f -> effectWhileAttached f
doFloorEffect :: ItFloorEffect -> Int -> World -> World
doFloorEffect NoFloorEffect = const id
rootNotrootEff :: ItInvEffect -> ItInvEffect -> Item -> Creature -> World -> World
rootNotrootEff f g it
| it ^? itLocation . ilIsRoot == Just True = doInvEffect f it
@@ -62,7 +60,3 @@ chargeIfEquipped itm cr
invid = _ilInvID $ _itLocation itm
ptrWpCharge = cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid . itUse . leftConsumption . wpCharge
maxcharge = itm ^?! itUse . leftConsumption . wpMaxCharge
createHeldLight :: Item -> Creature -> World -> World
createHeldLight itm cr = id
--createHeldLight itm cr = createTorchLightOffset cr itm 0