License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Landmarks that are used to specify portal locations
and can serve as navigation aids via the waypoint
command.
Waypoint ordering
The sequence of waypoints of a given name is dictated by criteria in the following order:
- Ordering of structure placements
(see implementation of
mergeStructures
); later placements are ordered first. - Placement of cells within a map. Map locations go by row-major order
(compare to docs for
genRobotTemplates
).
TODO (#1366): May be useful to have a mechanism for more precise control of ordering.
Synopsis
- data Originated a = Originated {}
- newtype WaypointName = WaypointName Text
- data WaypointConfig = WaypointConfig {
- wpName :: WaypointName
- wpUnique :: Bool
- parseWaypointConfig :: Object -> Parser WaypointConfig
- data Waypoint = Waypoint {}
- modifyLocation :: (Location -> Location) -> Waypoint -> Waypoint
- offsetWaypoint :: V2 Int32 -> Waypoint -> Waypoint
Documentation
data Originated a Source #
Indicates which structure something came from for debugging purposes.
Instances
Functor Originated Source # | |
Defined in Swarm.Game.Scenario.Topography.Navigation.Waypoint fmap :: (a -> b) -> Originated a -> Originated b # (<$) :: a -> Originated b -> Originated a # | |
Show a => Show (Originated a) Source # | |
Defined in Swarm.Game.Scenario.Topography.Navigation.Waypoint showsPrec :: Int -> Originated a -> ShowS # show :: Originated a -> String # showList :: [Originated a] -> ShowS # | |
Eq a => Eq (Originated a) Source # | |
Defined in Swarm.Game.Scenario.Topography.Navigation.Waypoint (==) :: Originated a -> Originated a -> Bool # (/=) :: Originated a -> Originated a -> Bool # |
newtype WaypointName Source #
Instances
data WaypointConfig Source #
Metadata about a waypoint
WaypointConfig | |
|
Instances
FromJSON WaypointConfig Source # | |
Defined in Swarm.Game.Scenario.Topography.Navigation.Waypoint parseJSON :: Value -> Parser WaypointConfig # parseJSONList :: Value -> Parser [WaypointConfig] # | |
Show WaypointConfig Source # | |
Defined in Swarm.Game.Scenario.Topography.Navigation.Waypoint showsPrec :: Int -> WaypointConfig -> ShowS # show :: WaypointConfig -> String # showList :: [WaypointConfig] -> ShowS # | |
Eq WaypointConfig Source # | |
Defined in Swarm.Game.Scenario.Topography.Navigation.Waypoint (==) :: WaypointConfig -> WaypointConfig -> Bool # (/=) :: WaypointConfig -> WaypointConfig -> Bool # |
A parent world shouldn't have to know the exact layout of a subworld to specify where exactly a portal will deliver a robot to within the subworld. Therefore, we define named waypoints in the subworld and the parent world must reference them by name, rather than by coordinate.