Assorted changes, cleanup menu selection text
This commit is contained in:
+23
-25
@@ -21,6 +21,7 @@ module Dodge.Data
|
||||
, module Dodge.Item.Data
|
||||
, module Dodge.Config.Data
|
||||
) where
|
||||
import Dodge.ShortShow
|
||||
import Dodge.Creature.State.Data
|
||||
import Dodge.Creature.Stance.Data
|
||||
import Dodge.Creature.Perception.Data
|
||||
@@ -100,6 +101,7 @@ data World = World
|
||||
, _floorTiles :: [(Point3,Point3)]
|
||||
, _randGen :: StdGen
|
||||
, _testString :: World -> [String]
|
||||
, _debugPicture :: Picture
|
||||
, _modifications :: IM.IntMap Modification
|
||||
, _yourID :: Int
|
||||
, _worldEvents :: World -> World
|
||||
@@ -197,14 +199,14 @@ data MenuOption
|
||||
= Toggle
|
||||
{ _moKey :: Scancode
|
||||
, _moEff :: Universe -> IO (Maybe Universe)
|
||||
, _moString :: Universe -> String
|
||||
, _moString :: Universe -> Either String (String,String)
|
||||
}
|
||||
| Toggle2
|
||||
{ _moKey1 :: Scancode
|
||||
, _moEff1 :: Universe -> IO (Maybe Universe)
|
||||
, _moKey2 :: Scancode
|
||||
, _moEff2 :: Universe -> IO (Maybe Universe)
|
||||
, _moString :: Universe -> String
|
||||
, _moString :: Universe -> Either String (String,String)
|
||||
}
|
||||
| InvisibleToggle
|
||||
{ _moKey :: Scancode
|
||||
@@ -308,12 +310,7 @@ data Intention = Intention
|
||||
data CrMvType
|
||||
= NoMvType
|
||||
| MvWalking { _mvSpeed :: Float }
|
||||
| ChaseMvType
|
||||
{ _mvSpeed :: Float
|
||||
, _mvTurnRad :: Float -> Float
|
||||
, _mvTurnJit :: Float
|
||||
}
|
||||
| AimMvType
|
||||
| CrMvType
|
||||
{ _mvSpeed :: Float
|
||||
, _mvTurnRad :: Float -> Float
|
||||
, _mvTurnJit :: Float
|
||||
@@ -478,27 +475,24 @@ data ReloadType
|
||||
-- I believe this is called every frame, not sure when though
|
||||
data ItEffect
|
||||
= NoItEffect
|
||||
| ItSimpleInvEffect
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
-- the Int is the items inventory position
|
||||
}
|
||||
-- | ItSimpleInvEffect
|
||||
-- {_itInvEffect :: Item -> Creature -> World -> World
|
||||
-- }
|
||||
| ItInvEffect
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
-- the Int is the items inventory position
|
||||
{_itInvEffect :: Item -> Creature -> World -> World
|
||||
,_itEffectCounter :: Int
|
||||
}
|
||||
| ItRewindEffect
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
{_itInvEffect :: Item -> Creature -> World -> World
|
||||
,_itStoredWorlds :: [World]
|
||||
}
|
||||
| ItEffect
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
{_itInvEffect :: Item -> Creature -> World -> World
|
||||
,_itFloorEffect :: Int -> World -> World
|
||||
,_itEffectCounter :: Int
|
||||
}
|
||||
| ItInvEffectID
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
-- the Int is the items inventory position
|
||||
{_itInvEffect :: Item -> Creature -> World -> World
|
||||
,_itEffectID :: Maybe Int
|
||||
}
|
||||
data IntID a = IntID Int a
|
||||
@@ -932,6 +926,7 @@ data Impulse
|
||||
| AddGoal Goal
|
||||
| ArbitraryImpulseFunction (World -> Creature -> Creature)
|
||||
| ArbitraryImpulse (Creature -> World -> Impulse)
|
||||
| ArbitraryImpulseEffect (Creature -> World -> World)
|
||||
| ImpulseUseTargetCID
|
||||
{_impulseUseTargetCID :: Int -> Impulse
|
||||
}
|
||||
@@ -943,14 +938,14 @@ data Impulse
|
||||
}
|
||||
instance Show Impulse where
|
||||
show imp = case imp of
|
||||
Move p -> "Move "++show p
|
||||
Move p -> "Move "++shortPoint2 p
|
||||
MoveForward f -> "MoveForward "++ show f
|
||||
Turn f -> "Turn "++show f
|
||||
RandomTurn f -> "RandomTurn "++show f
|
||||
TurnToward p f -> "TurnToward "++show p++show f
|
||||
MvTurnToward p -> "MvTurnToward "++show p
|
||||
TurnToward p f -> "TurnToward "++shortPoint2 p++show f
|
||||
MvTurnToward p -> "MvTurnToward "++shortPoint2 p
|
||||
MvForward -> "MvForward"
|
||||
TurnTo p -> "TurnTo "++show p
|
||||
TurnTo p -> "TurnTo "++shortPoint2 p
|
||||
UseItem -> "UseItem"
|
||||
SwitchToItem i -> "SwitchToItem "++show i
|
||||
DropItem -> "DropItem"
|
||||
@@ -962,6 +957,7 @@ instance Show Impulse where
|
||||
AddGoal g -> "AddGoal " ++ show g
|
||||
ArbitraryImpulseFunction {} -> "ArbitraryImpulseFunction"
|
||||
ArbitraryImpulse {} -> "ArbitraryImpulse"
|
||||
ArbitraryImpulseEffect {} -> "ArbitraryImpulseEffect"
|
||||
ImpulseUseTargetCID {} -> "ImpulseUseTargetCID"
|
||||
ImpulseUseTarget {} -> "ImpulseUseTarget"
|
||||
ImpulseUseAheadPos {} -> "ImpulseUseAheadPos"
|
||||
@@ -1067,13 +1063,13 @@ instance Show Action where
|
||||
AimAt
|
||||
{_targetID = tid
|
||||
,_targetSeenAt = p
|
||||
} -> "AimAt tid:"++show tid++" seenAt:"++show p
|
||||
} -> "AimAt tid:"++show tid++" seenAt:"++shortPoint2 p
|
||||
PathTo
|
||||
{_pathToPoint = p
|
||||
} -> "PathTo:"++show p
|
||||
} -> "PathTo:"++shortPoint2 p
|
||||
TurnToA
|
||||
{_turnToAPoint = p
|
||||
} -> "TurnToA:"++show p
|
||||
} -> "TurnToA:"++shortPoint2 p
|
||||
---- | PickupItem
|
||||
---- {_pickupItemID :: Int
|
||||
---- }
|
||||
@@ -1161,6 +1157,8 @@ data Strategy
|
||||
| ShootAt Int
|
||||
| FollowImpulses
|
||||
| WatchAndWait
|
||||
| WarningCry
|
||||
| CloseToMelee Int
|
||||
| StrategyActions Strategy [Action]
|
||||
| GetTo Point2
|
||||
| Reload
|
||||
|
||||
Reference in New Issue
Block a user