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
+2 -2
View File
@@ -21,11 +21,11 @@ data ItInvEffect
| ChargeIfEquipped
| ChargeIfInInventory
| SetCharge Int
| EffectIfHeld ItInvEffect ItInvEffect
| EffectRootNotroot ItInvEffect ItInvEffect
| CreateHeldLight
| CreateShieldWall
| RemoveShieldWall
| EffectWhileHeld ItInvEffect
| EffectWhileRoot ItInvEffect
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data ItFloorEffect = NoFloorEffect
+7 -1
View File
@@ -23,7 +23,13 @@ data CrInt = CrInt
deriving (Eq,Ord,Show,Read)
data ItemLocation
= InInv {_ilCrID :: Int, _ilInvID :: Int, _ilIsRoot :: Bool, _ilIsSelected :: Bool}
= InInv
{ _ilCrID :: Int
, _ilInvID :: Int
, _ilIsRoot :: Bool
, _ilIsSelected :: Bool
, _ilIsAttached :: Bool
}
| OnTurret {_ilTuID :: Int}
| OnFloor {_ilFlID :: NewInt FloorInt}
| InVoid
@@ -5,6 +5,7 @@
module Dodge.Data.Item.Use.Consumption.LoadAction where
import qualified Data.IntSet as IS
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -30,7 +31,11 @@ data NearbyManipulation
data InventoryManipulation
= SortInventory
| SelectedItem { _imSelectedItem :: Int, _imRootItem :: Int}
| SelectedItem
{ _imSelectedItem :: Int
, _imRootItem :: Int
, _imAttachedItems :: IS.IntSet
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data InvSelAction