Cleanup Action datatypes, clear sel set if scroll different section

This commit is contained in:
2026-05-10 23:32:59 +01:00
parent dfb451c450
commit b213525c21
11 changed files with 276 additions and 206 deletions
+8 -6
View File
@@ -62,7 +62,7 @@ infixr 9 `WaitThen`
infixr 9 `DoActionThen`
infixr 9 `DoActionWhile`
--infixr 9 `DoActionWhile`
infixr 9 `DoReplicate`
@@ -74,6 +74,7 @@ data Action
, _targetSeenAt :: Point2
}
| PathTo { _pathToPoint :: Point2, _pathFailAction :: Action }
| Eat {_targetID :: Int, _acTimer :: Int}
| EvadeAim
| TurnToPoint { _turnToPoint :: Point2 }
| ImpulsesList { _impulsesListList :: [[Impulse]], _acAction :: Action }
@@ -82,10 +83,10 @@ data Action
{ _waitThenTimer :: Int
, _waitThenAction :: Action
}
| DoActionWhile
{ _doActionWhileCondition :: WdCrBl
, _doActionWhileAction :: Action
}
-- | DoActionWhile
-- { _doActionWhileCondition :: WdCrBl
-- , _doActionWhileAction :: Action
-- }
| DoActionWhilePartial
{ _doActionWhilePartial :: Action
, _doActionWhileCondition :: WdCrBl
@@ -146,7 +147,6 @@ data Strategy
| Wander
| CloseToMelee {_meleeTarget :: Int}
| GetTo Point2
| Flee
| Search
| SearchTimed {_searchTimer :: Int}
| ReturnToHive
@@ -157,6 +157,8 @@ data Strategy
data Goal
= LiveLongAndProsper
| SearchForFood
| Flee
| Kill {_killTarget :: Int}
| SentinelAt {_sentinelPos :: Point2, _sentinelDir :: Float}
deriving (Eq, Ord, Show) --Generic, Flat)