-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
130 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
data/scenarios/Testing/1780-structure-merge-expansion/00-ORDER.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
nonoverlapping-structure-merge.yaml | ||
root-map-expansion.yaml | ||
structure-composition.yaml | ||
sequential-placement.yaml | ||
sequential-placement.yaml | ||
coordinate-offset-propagation.yaml |
66 changes: 66 additions & 0 deletions
66
data/scenarios/Testing/1780-structure-merge-expansion/coordinate-offset-propagation.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
version: 1 | ||
name: Structure coordinate offset propagation | ||
author: Karl Ostmo | ||
description: | | ||
If a structure incorporates subplacements | ||
entailing negative offsets, its coordinate origin must be shifted. | ||
The updated coordinate origin should be propagated to parent structures | ||
and utilized to offset placement. | ||
robots: | ||
- name: base | ||
dir: north | ||
creative: true | ||
objectives: | ||
- goal: | ||
- Must have 3 of each color visible | ||
condition: | | ||
return false | ||
solution: | | ||
noop | ||
known: [boulder, log, pixel (R), pixel (G), pixel (B), gold] | ||
world: | ||
structures: | ||
- name: micro | ||
structure: | ||
mask: '.' | ||
palette: | ||
'x': [stone, gold] | ||
map: | | ||
xxx | ||
x.x | ||
xxx | ||
- name: block | ||
structure: | ||
mask: '.' | ||
palette: | ||
'x': [stone, pixel (R)] | ||
map: | | ||
xxxx | ||
x..x | ||
x..x | ||
xxxx | ||
- name: master | ||
structure: | ||
mask: '.' | ||
placements: | ||
- src: block | ||
- src: micro | ||
offset: [-3, 1] | ||
map: "" | ||
dsl: | | ||
overlay | ||
[ {grass} | ||
, mask (y > -4 && y < 4 || x > -4 && x < 4) {stone} | ||
, mask (y > -2 && y < 2 || x > -2 && x < 2) {ice} | ||
, mask (y > -1 && y < 1 || x > -1 && x < 1) {dirt} | ||
] | ||
palette: | ||
'Ω': [grass, erase, base] | ||
mask: '.' | ||
placements: | ||
- src: master | ||
offset: [0, 0] | ||
upperleft: [0, 0] | ||
map: | | ||
Ω |
62 changes: 62 additions & 0 deletions
62
data/scenarios/Testing/1780-structure-merge-expansion/offsets-fix.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
version: 1 | ||
name: Structure coordinate offsets | ||
author: Karl Ostmo | ||
description: | | ||
Avoid garbled structure | ||
robots: | ||
- name: base | ||
dir: north | ||
creative: true | ||
objectives: | ||
- goal: | ||
- Must have 3 of each color visible | ||
condition: | | ||
return false | ||
solution: | | ||
noop | ||
known: [boulder, log, pixel (R), pixel (G), pixel (B), gold] | ||
world: | ||
structures: | ||
- name: micro | ||
structure: | ||
mask: '.' | ||
palette: | ||
'x': [stone, gold] | ||
map: | | ||
xxx | ||
x.x | ||
xxx | ||
- name: block | ||
structure: | ||
mask: '.' | ||
palette: | ||
'x': [stone, pixel (R)] | ||
map: | | ||
xxxx | ||
x..x | ||
x..x | ||
xxxx | ||
- name: master | ||
structure: | ||
mask: '.' | ||
placements: | ||
- src: micro | ||
offset: [-3, 1] | ||
- src: block | ||
map: "" | ||
dsl: | | ||
overlay | ||
[ {grass} | ||
, mask (y > -4 && y < 4 || x > -4 && x < 4) {stone} | ||
, mask (y > -2 && y < 2 || x > -2 && x < 2) {ice} | ||
, mask (y > -1 && y < 1 || x > -1 && x < 1) {dirt} | ||
] | ||
palette: | ||
'Ω': [grass, erase, base] | ||
mask: '.' | ||
placements: | ||
- src: master | ||
offset: [0, 0] | ||
upperleft: [0, 0] | ||
map: | | ||
Ω |