Building footprints need an entrance #55
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Buildings need an entrance, defined in the footprint. The entrance must be adjacent to/pointing at a single cell in the footprint. There must only be one entrance to a building.
As an arrow on the shape string:
or
or
Positives: easy to read in the shape string; easy to parse when building the cells array. Negatives: requires more spacing
.s.Arrows are the ASCII
< > ^ v(case-insensitive, soVworks too). Draw the shape with the arrow in mind; rotation handles the rest.Once the shape has been parsed, the entrance is not part of the cell array, but is stored privately on
BuildingFootprint:doorstep(steps)- the arrow's cell, anchor-relative, rotated bysteps. It is the tile a pawn stands on to enter, and is never incells().entrance_direction(steps)- the unit vector the arrow points in, rotated bysteps.doorstep(s) + entrance_direction(s)is always a cell inrotated(s).Decisions
@. All authored footprint.tresfiles carry one.Vector2i, not an N/E/S/W integer, and rotates through the samerotate_offset()as the cells, so there is one rotation implementation rather than two that must agree.push_errorandcells()left empty: no arrow, more than one arrow, arrow pointing at an empty tile, arrow pointing off the grid..on every other row or the shape skews. Prefer replacing an existing.or appending to a row.Rendering
Split out to #61.