Make examine inventory controlled by item, perhaps still buggy
This commit is contained in:
@@ -3,6 +3,8 @@ module Dodge.ItEffect (
|
||||
doInvEffect,
|
||||
) where
|
||||
|
||||
import Dodge.BlBl
|
||||
import Dodge.Item.Location
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
import Dodge.Euse
|
||||
@@ -15,6 +17,15 @@ doInvEffect = \case
|
||||
RemoveShieldWall -> removeShieldWall
|
||||
EffectWhileRoot f -> rootNotrootEff f NoInvEffect
|
||||
EffectWhileAttached f -> effectWhileAttached f
|
||||
ItemUseToggle f -> \itm _
|
||||
-> pointerToItemID (itm ^. itID) . itUse . useToggle %~ doBlBl f
|
||||
ItemCancelExamineInventory -> \_ _ -> cancelExamineInventory
|
||||
|
||||
cancelExamineInventory :: World -> World
|
||||
cancelExamineInventory = hud . hudElement . subInventory %~ f
|
||||
where
|
||||
f ExamineInventory = NoSubInventory
|
||||
f x = x
|
||||
|
||||
rootNotrootEff :: ItInvEffect -> ItInvEffect -> Item -> Creature -> World -> World
|
||||
rootNotrootEff f g it
|
||||
|
||||
Reference in New Issue
Block a user