Defunction-ify item modules, requires more cleanup
This commit is contained in:
+5
-16
@@ -487,11 +487,10 @@ data ItemConsumption
|
||||
}
|
||||
| NoConsumption
|
||||
data Item = Item
|
||||
{ _itName :: String
|
||||
, _itConsumption :: ItemConsumption
|
||||
{ _itConsumption :: ItemConsumption
|
||||
, _itUse :: ItemUse
|
||||
, _itEquipPict :: Creature -> Item -> SPic
|
||||
, _itType :: CombineType
|
||||
, _itType :: ItemType
|
||||
, _itAttachment :: ItAttachment
|
||||
, _itID :: Maybe Int
|
||||
, _itInvPos :: Maybe Int
|
||||
@@ -504,7 +503,6 @@ data Item = Item
|
||||
, _itDimension :: ItemDimension
|
||||
, _itCurseStatus :: CurseStatus
|
||||
, _itTweaks :: ItemTweaks
|
||||
, _itModules :: M.Map ModuleSlot ItemModule
|
||||
, _itScope :: Scope
|
||||
, _itValue :: ItemValue
|
||||
, _itParams :: ItemParams
|
||||
@@ -523,17 +521,6 @@ data Targeting
|
||||
, _tgID :: Maybe Int
|
||||
, _tgActive :: Bool
|
||||
}
|
||||
data ModuleSlot
|
||||
= ModBullet
|
||||
| ModRifleMag
|
||||
| ModAutoMag
|
||||
| ModTarget
|
||||
| ModBulletTrajectory
|
||||
| ModLauncherHoming
|
||||
| ModBattery
|
||||
| ModTeleport
|
||||
| ModDualBeam
|
||||
deriving (Eq,Ord)
|
||||
|
||||
data ItemModule
|
||||
= DefaultModule
|
||||
@@ -555,6 +542,7 @@ data ItemPortage
|
||||
, _muzPos :: Float
|
||||
}
|
||||
| WornItem
|
||||
| NoPortage
|
||||
|
||||
data ReloadType
|
||||
= ActiveClear
|
||||
@@ -600,6 +588,7 @@ data WorldBeams = WorldBeams
|
||||
}
|
||||
{- | Linear beams. Last only one frame.
|
||||
- Can interact with one another in a limited manner
|
||||
- can probably be moved to a separate file
|
||||
-}
|
||||
data Beam = Beam
|
||||
{ _bmDraw :: Beam -> Picture
|
||||
@@ -1000,7 +989,7 @@ data Sensor = NoSensor
|
||||
deriving (Eq,Ord)
|
||||
data ProximityRequirement
|
||||
= RequireHealth {_proxReqMinHealth :: Int}
|
||||
| RequireEquipment {_proxReqEquipment :: CombineType}
|
||||
| RequireEquipment {_proxReqEquipment :: ItemBaseType}
|
||||
| RequireImpossible
|
||||
deriving (Eq,Ord,Show)
|
||||
data CloseToggle = NotClose | IsClose
|
||||
|
||||
Reference in New Issue
Block a user