3 # IMPORTANT: You must change "height" and "width" by hand below.
5 # A deity tool to parse a dump file and generate edit commands
6 # to build larger start sanctuaries.
7 # dump * | bigstart >bigstart.out
9 # -Drake (dld@chem.psu.edu)
12 function sanctuary(x,y,o,nsect)
14 if (x>=width/2) x -= width;
15 if (y>=height/2) y -= height;
16 if (x<-width/2) x += width;
17 if (y<-height/2) y+= height;
20 if ((nsect in newown) && !(nsect in own)) {
21 printf("des %s s\n",nsect);
22 printf("give civ %s 550\n",nsect);
23 printf("setsector oldowner %s %d\n",nsect,o);
24 printf("setsector owner %s %d\n",nsect,o);
25 printf("setsector work %s 100\n",nsect);
45 for (i=1;i<=NF;i++) header[i]=$i;
56 for (i=1;i<=nheader;i++) {
59 if (val["own"]==0 && val["des"]=="-") {
60 newown[val["x"],val["y"]]=0;
63 own[val["x"],val["y"]]=val["own"];
68 / *DUMP SECTOR/ { begin=1; }
78 sanctuary(x+2,y,own[sect]);
79 sanctuary(x-2,y,own[sect]);
80 sanctuary(x+1,y+1,own[sect]);
81 sanctuary(x+1,y-1,own[sect]);
82 sanctuary(x-1,y+1,own[sect]);
83 sanctuary(x-1,y-1,own[sect]);