forked from github/server
* ZEIGE lokalisiert und im CR
* Ursprung für Astralebene wird initialisiert * doppelte GM Attribute löschen
This commit is contained in:
parent
597f38d182
commit
3ab91b969d
|
@ -2093,8 +2093,7 @@ display_item(faction *f, unit *u, const item_type * itype)
|
|||
}
|
||||
if (!fp) return false;
|
||||
|
||||
sprintf(buf, "%s: ", LOC(f->locale, name));
|
||||
|
||||
buf[0]='\0';
|
||||
while (fgets(t, NAMESIZE, fp) != NULL) {
|
||||
if (t[strlen(t) - 1] == '\n') {
|
||||
t[strlen(t) - 1] = 0;
|
||||
|
@ -2104,7 +2103,7 @@ display_item(faction *f, unit *u, const item_type * itype)
|
|||
fclose(fp);
|
||||
name = buf;
|
||||
}
|
||||
addmessage(0, f, name, MSG_EVENT, ML_IMPORTANT);
|
||||
ADDMSG(&f->msgs, msg_message("displayitem", "item description", itype, name));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1200,7 +1200,7 @@ randomevents(void)
|
|||
}
|
||||
|
||||
for (r = regions; r; r = r->next) {
|
||||
#ifdef RACE_ADJUSTMENTS == 0
|
||||
#if (RACE_ADJUSTMENTS==0)
|
||||
/* Elfen generieren Wald, Personen in Steinkreisen können Einhörner
|
||||
* bekommen. */
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ init_oldweapons(void)
|
|||
item_type * itype = olditemtype[weapontable[w].item];
|
||||
int minskill = 1, wflags = WTF_NONE;
|
||||
weapon_mod * modifiers = NULL;
|
||||
int (*attack)(const troop *, int * deaths) = NULL;
|
||||
int (*attack)(const troop *, int * deaths, int row) = NULL;
|
||||
|
||||
switch (w) {
|
||||
case WP_RUNESWORD:
|
||||
|
|
|
@ -97,8 +97,8 @@ getplaneid(const region *r)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ursprung_x(const faction *f, const plane *pl)
|
||||
static int
|
||||
ursprung_x(const faction *f, const plane *pl, const region * rdefault)
|
||||
{
|
||||
ursprung *ur;
|
||||
int id = 0;
|
||||
|
@ -113,11 +113,13 @@ ursprung_x(const faction *f, const plane *pl)
|
|||
if(ur->id == id)
|
||||
return ur->x;
|
||||
}
|
||||
return 0;
|
||||
if (!rdefault) return 0;
|
||||
set_ursprung((faction*)f, pl->id, rdefault->x - plane_center_x(pl), rdefault->y - plane_center_y(pl));
|
||||
return rdefault->x - plane_center_x(pl);
|
||||
}
|
||||
|
||||
int
|
||||
ursprung_y(const faction *f, const plane *pl)
|
||||
static int
|
||||
ursprung_y(const faction *f, const plane *pl, const region * rdefault)
|
||||
{
|
||||
ursprung *ur;
|
||||
int id = 0;
|
||||
|
@ -132,7 +134,9 @@ ursprung_y(const faction *f, const plane *pl)
|
|||
if(ur->id == id)
|
||||
return ur->y;
|
||||
}
|
||||
return 0;
|
||||
if (!rdefault) return 0;
|
||||
set_ursprung((faction*)f, id, rdefault->x - plane_center_x(pl), rdefault->y - plane_center_y(pl));
|
||||
return rdefault->y - plane_center_y(pl);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -159,7 +163,7 @@ region_x(const region *r, const faction *f)
|
|||
plane *pl;
|
||||
|
||||
pl = getplane(r);
|
||||
return r->x - ursprung_x(f, pl) - plane_center_x(pl);
|
||||
return r->x - ursprung_x(f, pl, r) - plane_center_x(pl);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -168,7 +172,7 @@ region_y(const region *r, const faction *f)
|
|||
plane *pl;
|
||||
|
||||
pl = getplane(r);
|
||||
return r->y - ursprung_y(f, pl) - plane_center_y(pl);
|
||||
return r->y - plane_center_y(pl) - ursprung_y(f, pl, r);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -220,9 +224,9 @@ rel_to_abs(const struct plane *pl, const struct faction * f, int rel, unsigned c
|
|||
assert(index == 0 || index == 1);
|
||||
|
||||
if(index == 0)
|
||||
return (rel + ursprung_x(f,pl) + plane_center_x(pl));
|
||||
return (rel + ursprung_x(f, pl, NULL) + plane_center_x(pl));
|
||||
|
||||
return (rel + ursprung_y(f,pl) + plane_center_y(pl));
|
||||
return (rel + ursprung_y(f, pl, NULL) + plane_center_y(pl));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -58,8 +58,6 @@ int region_x(const struct region *r, const struct faction *f);
|
|||
int region_y(const struct region *r, const struct faction *f);
|
||||
int plane_center_x(const struct plane *pl);
|
||||
int plane_center_y(const struct plane *pl);
|
||||
int ursprung_x(const struct faction *f, const plane *pl);
|
||||
int ursprung_y(const struct faction *f, const plane *pl);
|
||||
void set_ursprung(struct faction *f, int id, int x, int y);
|
||||
plane * create_new_plane(int id, const char *name, int minx, int maxx, int miny, int maxy, int flags);
|
||||
plane * getplanebyname(const char *);
|
||||
|
|
|
@ -1388,15 +1388,13 @@ update_gms(void)
|
|||
for (f=factions;f;f=f->next) {
|
||||
attrib * permissions = a_find(f->attribs, &at_permissions);
|
||||
if (permissions) {
|
||||
const char * keys[] = { "gmgate", "gmmsgr", "gmmsgu", NULL };
|
||||
int k;
|
||||
item_t i;
|
||||
if (!find_key((attrib*)permissions->data.v, atoi36("gmgate"))) {
|
||||
a_add((attrib**)&permissions->data.v, make_key(atoi36("gmgate")));
|
||||
}
|
||||
if (!find_key((attrib*)permissions->data.v, atoi36("gmmsgr"))) {
|
||||
a_add((attrib**)&permissions->data.v, make_key(atoi36("gmmsgr")));
|
||||
}
|
||||
if (!find_key((attrib*)permissions->data.v, atoi36("gmmsgu"))) {
|
||||
a_add((attrib**)&permissions->data.v, make_key(atoi36("gmmsgu")));
|
||||
for (k=0;keys[k];++k) {
|
||||
if (!find_key((attrib*)permissions->data.v, atoi36(keys[k]))) {
|
||||
a_add((attrib**)&permissions->data.v, make_key(atoi36(keys[k])));
|
||||
}
|
||||
}
|
||||
for (i=I_GREATSWORD;i!=I_KEKS;++i) {
|
||||
attrib * a = a_find(permissions, &at_gmcreate);
|
||||
|
@ -1407,6 +1405,44 @@ update_gms(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
fix_gms(void)
|
||||
{
|
||||
faction * f;
|
||||
for (f=factions;f;f=f->next) {
|
||||
attrib * permissions = a_find(f->attribs, &at_permissions);
|
||||
if (permissions) {
|
||||
const char * keys[] = { "gmgate", "gmmsgr", "gmmsgr", "gmmsgu", NULL };
|
||||
int k;
|
||||
item_t i;
|
||||
for (k=0;keys[k];++k) {
|
||||
attrib * a = find_key((attrib*)permissions->data.v, atoi36("gmgate"));
|
||||
if (a) {
|
||||
attrib ** ap = &a->nexttype;
|
||||
while (*ap) {
|
||||
attrib * an = *ap;
|
||||
if (a->data.i==an->data.i) a_remove(ap, an);
|
||||
else ap = &an->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i=I_GREATSWORD;i!=I_KEKS;++i) {
|
||||
attrib * a = a_find(permissions, &at_gmcreate);
|
||||
while (a && a->data.v!=(void*)olditemtype[i]) a=a->nexttype;
|
||||
if (a) {
|
||||
attrib ** ap = &a->nexttype;
|
||||
while (*ap) {
|
||||
attrib * an = *ap;
|
||||
if (a->data.v==an->data.v) a_remove(ap, an);
|
||||
else ap = &an->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 1
|
||||
static int
|
||||
fix_demand(void)
|
||||
|
@ -2779,11 +2815,13 @@ heal_all(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
static int
|
||||
fix_astralplane(void)
|
||||
{
|
||||
plane * astralplane = getplanebyname("Astralraum");
|
||||
freset(astralplane, PFL_NOCOORDS);
|
||||
set_ursprung(findfaction(MONSTER_FACTION), astralplane->id, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2828,6 +2866,7 @@ korrektur(void)
|
|||
|
||||
do_once("grat", fix_ratfamiliar());
|
||||
do_once("fdmd", fix_demand());
|
||||
do_once("fgms", fix_gms());
|
||||
#if NEW_RESOURCEGROWTH
|
||||
do_once("rndr", randomized_resources());
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<type>
|
||||
<arg name="turns" type="int"></arg>
|
||||
</type>
|
||||
<text locae="de">"Deine Partei ist noch $int($turns) Wochen immun gegen Angriffe."</text>
|
||||
<text locale="de">"Deine Partei ist noch $int($turns) Wochen immun gegen Angriffe."</text>
|
||||
</message>
|
||||
|
||||
<message name="giverestriction" section="errors">
|
||||
|
@ -7282,4 +7282,13 @@
|
|||
<text locale="en">"Life itself touches the world and all beings are healed."</text>
|
||||
</message>
|
||||
|
||||
<message name="showitem" section="events">
|
||||
<type>
|
||||
<arg name="item" type="item"></arg>
|
||||
<arg name="description" type="string"></arg>
|
||||
</type>
|
||||
<text locale="de">"$resource($item,1): $description"</text>
|
||||
<text locale="en">"$resource($item,1): $description"</text>
|
||||
</message>
|
||||
|
||||
</messages>
|
||||
|
|
Loading…
Reference in New Issue