Separate out creature data
This commit is contained in:
+68
-47
@@ -2,53 +2,74 @@
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Creature
|
||||
( module Dodge.Data.Creature
|
||||
, module Dodge.Data.CamouflageStatus
|
||||
, module Dodge.Data.Creature.Misc
|
||||
, module Dodge.Data.Creature.State
|
||||
) where
|
||||
import Dodge.Data.CamouflageStatus
|
||||
import Sound.Data
|
||||
import Dodge.Data.Creature.Misc
|
||||
import Dodge.Data.Creature.State
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Data.LoadAction
|
||||
import Dodge.Data.Material
|
||||
import Dodge.Data.ActionPlan
|
||||
import Dodge.Data.Hammer
|
||||
import Dodge.Creature.Perception.Data
|
||||
import Dodge.Creature.Memory.Data
|
||||
import Dodge.Creature.Stance.Data
|
||||
import Dodge.Creature.State.Data
|
||||
import Dodge.Equipment.Data
|
||||
import ShapePicture
|
||||
import Geometry.Data
|
||||
import Color
|
||||
import Control.Lens
|
||||
data CreatureStatistics = CreatureStatistics
|
||||
{ _strength :: Int
|
||||
, _dexterity :: Int
|
||||
, _intelligence :: Int
|
||||
import qualified IntMapHelp as IM
|
||||
import qualified Data.Map.Strict as M
|
||||
data Creature = Creature
|
||||
{ _crPos :: Point2
|
||||
, _crOldPos :: Point2
|
||||
, _crVel :: Point2
|
||||
, _crDir :: Float
|
||||
, _crOldDir :: Float
|
||||
, _crMvDir :: Float
|
||||
, _crTwist :: Float
|
||||
, _crType :: CreatureType
|
||||
, _crID :: Int
|
||||
, _crRad :: Float
|
||||
, _crMass :: Float
|
||||
, _crHP :: Int
|
||||
, _crMaxHP :: Int
|
||||
, _crInv :: IM.IntMap Item
|
||||
, _crInvSel :: InvSel
|
||||
, _crInvCapacity :: Int
|
||||
, _crInvLock :: Bool
|
||||
, _crInvEquipped :: IM.IntMap EquipPosition
|
||||
, _crEquipment :: M.Map EquipPosition Int
|
||||
, _crLeftInvSel :: Maybe Int
|
||||
, _crState :: CreatureState
|
||||
, _crCorpse :: Creature -> Corpse -> SPic
|
||||
, _crMaterial :: Material
|
||||
, _crPastDamage :: Int
|
||||
, _crStance :: Stance
|
||||
, _crActionPlan :: ActionPlan
|
||||
, _crMeleeCooldown :: Int
|
||||
, _crPerception :: Perception
|
||||
, _crMemory :: Memory
|
||||
, _crVocalization :: Vocalization
|
||||
, _crFaction :: Faction
|
||||
, _crGroup :: CrGroup
|
||||
, _crIntention :: Intention
|
||||
, _crMvType :: CrMvType
|
||||
, _crHammerPosition :: HammerPosition
|
||||
, _crName :: String
|
||||
, _crStatistics :: CreatureStatistics
|
||||
, _crCamouflage :: CamouflageStatus
|
||||
}
|
||||
data Corpse = Corpse
|
||||
{ _cpID :: Int
|
||||
, _cpPos :: Point2
|
||||
, _cpDir :: Float
|
||||
, _cpPict :: Corpse -> SPic
|
||||
, _cpRes :: Maybe Creature
|
||||
}
|
||||
data Intention = Intention
|
||||
{ _targetCr :: Maybe Creature
|
||||
, _mvToPoint :: Maybe Point2
|
||||
, _viewPoint :: Maybe Point2
|
||||
}
|
||||
deriving (Eq,Ord,Show)
|
||||
data Vocalization
|
||||
= Mute
|
||||
| Vocalization
|
||||
{_vcSound :: SoundID
|
||||
,_vcWarnings :: [SoundID]
|
||||
,_vcMaxCoolDown :: Int
|
||||
,_vcCoolDown :: Int
|
||||
}
|
||||
deriving (Eq,Ord,Show)
|
||||
data CrMvType
|
||||
= NoMvType
|
||||
| MvWalking { _mvSpeed :: Float }
|
||||
| CrMvType
|
||||
{ _mvSpeed :: Float
|
||||
, _mvTurnRad :: Float -> Float
|
||||
, _mvTurnJit :: Float
|
||||
, _mvAimSpeed :: Float -> Float
|
||||
}
|
||||
data HumanoidAI = YourAI | ChaseAI | InanimateAI | SpreadGunAI | PistolAI
|
||||
| LtAutoAI | LauncherAI | SwarmAI | AutoAI | FlockArmourChaseAI | MiniGunAI
|
||||
| LongAI | MultGunAI
|
||||
data CreatureType
|
||||
= Humanoid
|
||||
{ _skinHead :: Color
|
||||
, _skinUpper :: Color
|
||||
, _skinLower :: Color
|
||||
, _humanoidAI :: HumanoidAI
|
||||
}
|
||||
| Barreloid {_barrelType :: BarrelType}
|
||||
| Lampoid {_lampHeight :: Float, _lampColor :: Point3, _lampLSID :: Maybe Int}
|
||||
| Turretoid
|
||||
| NonDrawnCreature
|
||||
data BarrelType = PlainBarrel | ExplosiveBarrel
|
||||
makeLenses ''CreatureStatistics
|
||||
makeLenses ''Vocalization
|
||||
makeLenses ''CrMvType
|
||||
makeLenses ''CreatureType
|
||||
|
||||
Reference in New Issue
Block a user