Rethink damage data type, work on damage sensors

This commit is contained in:
2022-03-13 09:27:35 +00:00
parent d340fd73c3
commit 06a501ff88
30 changed files with 356 additions and 240 deletions
+5 -4
View File
@@ -259,7 +259,7 @@ data Creature = Creature
, _crLeftInvSel :: Maybe Int
, _crState :: CreatureState
, _crCorpse :: Picture
, _crApplyDamage :: [DamageType] -> Creature -> (World -> World,Creature)
, _crApplyDamage :: [Damage] -> Creature -> (World -> World,Creature)
, _crStance :: Stance
, _crActionPlan :: ActionPlan
, _crMeleeCooldown :: Int
@@ -720,8 +720,9 @@ data Machine = Machine
, _mcPos :: Point2
, _mcDir :: Float
, _mcHP :: Int
, _mcSensor :: Int
, _mcDamage :: [DamageType]
, _mcSensorAmount :: Int
, _mcSensorToggle :: Bool
, _mcDamage :: [Damage]
, _mcLSs :: [Int]
, _mcType :: MachineType
}
@@ -772,7 +773,7 @@ data WallStructure
| BlockPart { _wlStBlock :: Int }
| CreaturePart
{ _wlStCreature :: Int
, _wlStDamCreature :: DamageType -> Wall -> Int -> World -> World
, _wlStDamCreature :: Damage -> Wall -> Int -> World -> World
}
-- | Strict maybe
data Maybe' a = Just' {__Just' :: a} | Nothing'