joelpt / quickfort

A spreadsheet driven construction tool for Dwarf Fortress
http://joelpt.net/quickfort
38 stars 14 forks source link

Transformations can't produce center-cell symmetry? #39

Open abair opened 6 years ago

abair commented 6 years ago

Transformations seem to work great for fortresses that have 2 tile wide corridors and rooms built on even numbered dimensions like 10x10 or 6x4, but, for a fortress with 3 tile wide corridors and 11x11 or 3x3 rooms, either the blueprint needs to have a row and column cut out of the center after the transform, or one added into the center.

For example, it is possible to turn the below into a 4x4 square:

d,d
d,~

with something like python qfconvert.py -i -t 'rotcw 2e rotcw rotcw 2s' tmp.csv.

Blueprint preview:
  1234
 +----+
1|dddd|
2|d..d|
3|d..d|
4|dddd|
 +----+

However, if a 5x5 square is needed, how should it be defined? Perhaps a quadrant with the centerline included?

d,d,d
d,~,~
d,~,~

Transforming this with the previous line results in a 6x6 square:

Blueprint preview:
  123456
 +------+
1|dddddd|
2|d....d|
3|d....d|
4|d....d|
5|d....d|
6|dddddd|
 +------+

Is there a flag that tells the working bucket to discard the first character along its aligning axis? Maybe something like python qfconvert.py -i -t 'rotcw overlap 2e rotcw rotcw overlap 2s' tmp.csv to produce:

Blueprint preview:
  12345
 +-----+
1|ddddd|
2|d...d|
3|d...d|
4|d...d|
5|ddddd|
 +-----+