diff --git a/data/scenarios/Testing/00-ORDER.txt b/data/scenarios/Testing/00-ORDER.txt index e7edbda40..c662b7c16 100644 --- a/data/scenarios/Testing/00-ORDER.txt +++ b/data/scenarios/Testing/00-ORDER.txt @@ -36,6 +36,7 @@ Achievements 1218-stride-command.yaml 1234-push-command.yaml 1256-halt-command.yaml +1271-wall-boundaries.yaml 1262-display-device-commands.yaml 1295-density-command.yaml 1138-structures diff --git a/data/scenarios/Testing/1271-wall-boundaries.yaml b/data/scenarios/Testing/1271-wall-boundaries.yaml new file mode 100644 index 000000000..824421317 --- /dev/null +++ b/data/scenarios/Testing/1271-wall-boundaries.yaml @@ -0,0 +1,48 @@ +version: 1 +name: Wall boundaries +creative: false +description: Stop a robot using halt +objectives: + - goal: + - Just be. + condition: | + return false; +solution: | + noop; +robots: + - name: base + dir: [0,-1] + display: + char: Ω + attr: robot + devices: + - compass + - dictionary + - grabber + - toolkit + - logger + - tank treads + - antenna + - ADT calculator +entities: + - name: wall + display: + char: 'x' + description: + - A wall + properties: [known, boundary] +world: + default: [blank] + palette: + 'Ω': [grass, null, base] + '.': [grass] + '#': [grass, wall] + upperleft: [0, 0] + map: | + Ω....... + ....#... + ..####.. + ..#.##.. + ..#..#.. + ..####.. + ........ diff --git a/src/swarm-scenario/Swarm/Game/Entity.hs b/src/swarm-scenario/Swarm/Game/Entity.hs index be48eb57a..b187f6ff7 100644 --- a/src/swarm-scenario/Swarm/Game/Entity.hs +++ b/src/swarm-scenario/Swarm/Game/Entity.hs @@ -157,6 +157,8 @@ data EntityProperty Pushable | -- | Obstructs the view of robots that attempt to "scout" Opaque + | -- | Is automatically rendered as a contiguous border + Boundary | -- | Regrows from a seed after it is harvested. Growable | -- | Can burn when ignited (either via 'Swarm.Language.Syntax.Ignite' or by diff --git a/src/swarm-tui/Swarm/TUI/View.hs b/src/swarm-tui/Swarm/TUI/View.hs index b5df6bb24..f9d55d28d 100644 --- a/src/swarm-tui/Swarm/TUI/View.hs +++ b/src/swarm-tui/Swarm/TUI/View.hs @@ -1103,6 +1103,7 @@ displayProperties = displayList . mapMaybe showProperty showProperty Liquid = Just "liquid" showProperty Unwalkable = Just "blocking" showProperty Opaque = Just "opaque" + showProperty Boundary = Just "boundary" -- Most things are pickable so we don't show that. showProperty Pickable = Nothing -- 'Known' is just a technical detail of how we handle some entities