forked from github/server
- Hack in Mapper zum 'Verarmen' von Regionen: Tag->Modify->Peasants
This commit is contained in:
parent
28b566a8a1
commit
9e183e4393
3 changed files with 20 additions and 3 deletions
|
@ -563,6 +563,18 @@ r_isforest(const region * r)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean
|
||||||
|
r_issea(const region * r)
|
||||||
|
{
|
||||||
|
direction_t d;
|
||||||
|
|
||||||
|
for(d=0; d < MAXDIRECTIONS; d++) {
|
||||||
|
region *rc = rconnect(r,d);
|
||||||
|
if(rc && rterrain(rc) == T_OCEAN) return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
r_isglacier(const region * r)
|
r_isglacier(const region * r)
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,7 +192,7 @@ void rsetlaen(struct region * r, int value);
|
||||||
#define rsetherbs(r, value) ((r)->land?((r)->land->herbs=(short)(value)):(value),0)
|
#define rsetherbs(r, value) ((r)->land?((r)->land->herbs=(short)(value)):(value),0)
|
||||||
|
|
||||||
extern boolean r_isforest(const struct region * r);
|
extern boolean r_isforest(const struct region * r);
|
||||||
|
extern boolean r_issea(const struct region * r);
|
||||||
extern boolean r_isglacier(const struct region * r);
|
extern boolean r_isglacier(const struct region * r);
|
||||||
|
|
||||||
#define rterrain(r) (terrain_t)((r)?(r)->terrain:T_FIREWALL)
|
#define rterrain(r) (terrain_t)((r)?(r)->terrain:T_FIREWALL)
|
||||||
|
|
|
@ -494,6 +494,7 @@ modify_block(void)
|
||||||
region *r;
|
region *r;
|
||||||
tagregion *t;
|
tagregion *t;
|
||||||
char *name;
|
char *name;
|
||||||
|
int div;
|
||||||
|
|
||||||
win = openwin(70, 4, "< Tag-Regionen modifizieren >");
|
win = openwin(70, 4, "< Tag-Regionen modifizieren >");
|
||||||
wmove(win, 1, 2);
|
wmove(win, 1, 2);
|
||||||
|
@ -517,7 +518,10 @@ modify_block(void)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
name = my_input(win, 2, 2, "Name: ", NULL);
|
name = my_input(win, 2, 2, "Name: ", NULL);
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
div = atoi(my_input(win, 2, 2, "Divisor: ", "1"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -529,7 +533,8 @@ modify_block(void)
|
||||||
rsetname(r, name);
|
rsetname(r, name);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
rsetpeasants(r, production(r)*3+rand()%(production(r)*3));
|
rsetpeasants(r, (production(r)*3+rand()%(production(r)*3))/div);
|
||||||
|
rsetmoney(r, (production(r)*10+rand()%(production(r)*10))/div);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
rsethorses(r, rand()%(production(r) / 10));
|
rsethorses(r, rand()%(production(r) / 10));
|
||||||
|
|
Loading…
Reference in a new issue