Feuerwände im Astralraum

Werden durch Astralblock ersetzt. Ausserdem wird aus dem mapper heraus wieder eine Grenze von Feuerwänden um ältere Gebiete herum gezogen.
Issue: 556
This commit is contained in:
Enno Rehling 2005-06-13 21:26:52 +00:00
parent 4d0cfa34fa
commit 7a69ac541b
2 changed files with 36 additions and 18 deletions

View File

@ -747,6 +747,28 @@ fix_gates(void)
} }
} }
static void
frame_regions(void)
{
region * r = regions;
for (r=regions;r;r=r->next) {
direction_t d;
if (r->age<10) continue;
if (r->planep) continue;
if (r->terrain==T_FIREWALL) continue;
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r, d);
if (rn==NULL) {
rn = new_region(r->x+delta_x[d], r->y+delta_y[d]);
terraform(rn, T_FIREWALL);
rn->age=r->age;
}
}
}
}
static int static int
fix_astralplane(void) fix_astralplane(void)
{ {
@ -1037,6 +1059,18 @@ fix_attribflags(void)
return 0; return 0;
} }
static int
fix_astral_firewalls(void)
{
region * r;
for (r = regions; r; r=r->next) {
if (r->planep==astral_plane && r->terrain==T_FIREWALL) {
terraform(r, T_ASTRALB);
}
}
return 0;
}
static int static int
fix_chaosgates(void) fix_chaosgates(void)
{ {
@ -1077,6 +1111,8 @@ korrektur(void)
do_once("chgt", fix_chaosgates()); do_once("chgt", fix_chaosgates());
do_once("atri", fix_attribflags()); do_once("atri", fix_attribflags());
do_once("asfi", fix_astral_firewalls());
frame_regions();
fix_astralplane(); fix_astralplane();
fix_firewalls(); fix_firewalls();
fix_gates(); fix_gates();

View File

@ -1555,23 +1555,6 @@ log_newstuff(void)
} }
} }
void
frame_regions(void)
{
region * r = regions;
for (r=regions;r;r=r->next) if (r->age>10 && r->terrain!=T_FIREWALL) {
direction_t d;
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r, d);
if (rn==NULL) {
rn = new_region(r->x+delta_x[d], r->y+delta_y[d]);
terraform(rn, T_FIREWALL);
rn->age=r->age;
}
}
}
}
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
@ -1731,7 +1714,6 @@ main(int argc, char *argv[])
setminmax(); setminmax();
srand(time((time_t *) NULL)); srand(time((time_t *) NULL));
frame_regions();
if (autoseeding) { if (autoseeding) {
runautoseed(); runautoseed();
remove_empty_units(); remove_empty_units();