forked from github/server
parent
8bb5509446
commit
7ce7f691ed
|
@ -270,7 +270,7 @@ read_newfactions(const char * filename)
|
|||
for (;;) {
|
||||
faction * f = factions;
|
||||
char race[20], email[64], lang[8];
|
||||
newfaction * nf;
|
||||
newfaction *nf;
|
||||
int bonus;
|
||||
/* email;race;locale;startbonus */
|
||||
if (fscanf(F, "%s %s %s %d", email, race, lang, &bonus)<=0) break;
|
||||
|
@ -281,6 +281,10 @@ read_newfactions(const char * filename)
|
|||
f = f->next;
|
||||
}
|
||||
if (f) continue; /* skip the ones we've already got */
|
||||
for (nf=newfactions;nf;nf=nf->next) {
|
||||
if (strcmp(nf->email, email)==0) break;
|
||||
}
|
||||
if (nf) continue;
|
||||
nf = calloc(sizeof(newfaction), 1);
|
||||
nf->email = strdup(email);
|
||||
nf->race = rc_find(race);
|
||||
|
|
|
@ -347,6 +347,18 @@ readfactions(void)
|
|||
modified = 1;
|
||||
}
|
||||
|
||||
int
|
||||
newbie_region(region * r)
|
||||
{
|
||||
unit * u;
|
||||
if (r==NULL || r->units==NULL) return 0;
|
||||
for (u=r->units;u;u=u->next) {
|
||||
if (u->faction->age>10) return 0;
|
||||
if (u->faction->age==0) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
drawmap(boolean maponly) {
|
||||
int x, x1, y1, y2, s, q;
|
||||
|
@ -439,7 +451,7 @@ drawmap(boolean maponly) {
|
|||
(hl == -6 && fval(r, RF_MALLORN)) ||
|
||||
(hl == -7 && fval(r, RF_CHAOTIC)) ||
|
||||
(hl == -8 && is_cursed_internal(r->attribs, C_CURSED_BY_THE_GODS, 0)) ||
|
||||
(hl == -9 && r->units && r->units->faction->age==0) ||
|
||||
(hl == -9 && newbie_region(r)) ||
|
||||
(hl >= 0 && factionhere(r, hl)) ||
|
||||
(x==tx && y1==ty))
|
||||
addch(rs | A_REVERSE);
|
||||
|
|
Loading…
Reference in New Issue