forked from github/server
move "do not accidentally terrafomr" logic to gmtool.
This commit is contained in:
parent
f4388f4429
commit
c78fe1ac0a
|
@ -565,7 +565,9 @@ static void terraform_at(coordinate * c, const terrain_type * terrain)
|
|||
if (r == NULL) {
|
||||
r = new_region(nx, ny, c->pl, 0);
|
||||
}
|
||||
terraform_region(r, terrain);
|
||||
if (!(r->units && fval(r->terrain, LAND_REGION) && !fval(terrain, LAND_REGION))) {
|
||||
terraform_region(r, terrain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -589,7 +591,9 @@ terraform_selection(selection * selected, const terrain_type * terrain)
|
|||
if (r == NULL) {
|
||||
r = new_region(nx, ny, pl, 0);
|
||||
}
|
||||
terraform_region(r, terrain);
|
||||
if (!(r->units && fval(r->terrain, LAND_REGION) && !fval(terrain, LAND_REGION))) {
|
||||
terraform_region(r, terrain);
|
||||
}
|
||||
tp = &t->nexthash;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1060,10 +1060,6 @@ void terraform_region(region * r, const terrain_type * terrain)
|
|||
rawmaterial **lrm = &r->resources;
|
||||
|
||||
assert(terrain);
|
||||
if (r->units && fval(r->terrain, LAND_REGION) && !fval(terrain, LAND_REGION)) {
|
||||
log_error("region %s contains units, not terraforming it to %s.", regionname(r, NULL), terrain->_name);
|
||||
return;
|
||||
}
|
||||
while (*lrm) {
|
||||
rawmaterial *rm = *lrm;
|
||||
const resource_type *rtype = NULL;
|
||||
|
|
Loading…
Reference in New Issue