forked from github/server
small bugfixes, broken strings, and a new assert
This commit is contained in:
parent
c6f973d822
commit
002a2fc628
|
@ -418,9 +418,21 @@ rt_find(const char * name)
|
||||||
return rtype;
|
return rtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
item_type *
|
static const char * it_aliases[2][2] = { { "Runenschwert", "runesword" }, { NULL, NULL } };
|
||||||
it_find(const char * name)
|
static const char *
|
||||||
|
it_alias(const char * zname)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;it_aliases[i][0];++i) {
|
||||||
|
if (strcasecmp(it_aliases[i][0], zname)==0) return it_aliases[i][1];
|
||||||
|
}
|
||||||
|
return zname;
|
||||||
|
}
|
||||||
|
|
||||||
|
item_type *
|
||||||
|
it_find(const char * zname)
|
||||||
|
{
|
||||||
|
const char * name = it_alias(zname);
|
||||||
unsigned int hash = hashstring(name);
|
unsigned int hash = hashstring(name);
|
||||||
item_type * itype;
|
item_type * itype;
|
||||||
|
|
||||||
|
|
|
@ -428,7 +428,6 @@ new_message(struct faction * receiver, const char* sig, ...)
|
||||||
static void
|
static void
|
||||||
caddmessage(region * r, faction * f, const char *s, msg_t mtype, int level)
|
caddmessage(region * r, faction * f, const char *s, msg_t mtype, int level)
|
||||||
{
|
{
|
||||||
const char * section = NULL;
|
|
||||||
message * m = NULL;
|
message * m = NULL;
|
||||||
|
|
||||||
unused(level);
|
unused(level);
|
||||||
|
|
|
@ -78,6 +78,7 @@ static void
|
||||||
write_gmcreate(const attrib * a, FILE * F)
|
write_gmcreate(const attrib * a, FILE * F)
|
||||||
{
|
{
|
||||||
const item_type * itype = (const item_type *)a->data.v;
|
const item_type * itype = (const item_type *)a->data.v;
|
||||||
|
assert(itype);
|
||||||
fprintf(F, "%s", resourcename(itype->rtype, 0));
|
fprintf(F, "%s", resourcename(itype->rtype, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +89,7 @@ read_gmcreate(attrib * a, FILE * F)
|
||||||
const item_type ** p_itype = (const item_type **)&a->data.v;
|
const item_type ** p_itype = (const item_type **)&a->data.v;
|
||||||
fscanf(F, "%s", zText);
|
fscanf(F, "%s", zText);
|
||||||
*p_itype = it_find(zText);
|
*p_itype = it_find(zText);
|
||||||
|
assert(*p_itype);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1385,6 +1385,14 @@ SOURCE=..\common\triggers\createunit.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\triggers\gate.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\triggers\gate.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\triggers\giveitem.c
|
SOURCE=..\common\triggers\giveitem.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "eressea - Win32 Release"
|
!IF "$(CFG)" == "eressea - Win32 Release"
|
||||||
|
|
|
@ -110,7 +110,7 @@ temple;de;Tempel
|
||||||
## Testitem
|
## Testitem
|
||||||
wand;de;Zauberstab
|
wand;de;Zauberstab
|
||||||
wand_p;de;Zauberstäbe
|
wand_p;de;Zauberstäbe
|
||||||
wand_of_tear_p;de;Szepter der Tränen
|
wand_of_tears;de;Szepter der Tränen
|
||||||
wands_of_tear_p;de;Szepter der Tränen
|
wands_of_tear_p;de;Szepter der Tränen
|
||||||
|
|
||||||
## Burgausbaustufen
|
## Burgausbaustufen
|
||||||
|
@ -281,15 +281,15 @@ dreameye;de;Traumauge
|
||||||
dreameye_p;de;Traumaugen
|
dreameye_p;de;Traumaugen
|
||||||
seaserpenthead;de;Seeschlangenkopf
|
seaserpenthead;de;Seeschlangenkopf
|
||||||
seaserpenthead_p;de;Seeschlangenköpfe
|
seaserpenthead_p;de;Seeschlangenköpfe
|
||||||
aurafocu_p;de;Aurafocus
|
aurafocus;de;Aurafocus
|
||||||
aurafocuse_p;de;Aurafocuse
|
aurafocus_p;de;Aurafocuse
|
||||||
presspass;de;Akkredition des Xontormia-Expreß
|
presspass;de;Akkredition des Xontormia-Expreß
|
||||||
presspass_p;de;Akkreditionen des Xontormia-Expreß
|
presspass_p;de;Akkreditionen des Xontormia-Expreß
|
||||||
trollbelt;de;Gürtel der Trollstärke
|
trollbelt;de;Gürtel der Trollstärke
|
||||||
elvenhorse;de;Elfenpferd
|
elvenhorse;de;Elfenpferd
|
||||||
elvenhorse_p;de;Elfenpferde
|
elvenhorse_p;de;Elfenpferde
|
||||||
pegasu_p;de;Pegasus
|
pegasus;de;Pegasus
|
||||||
pegasi;de;Pegasi
|
pegasus_p;de;Pegasi
|
||||||
dolphin;de;Delphin
|
dolphin;de;Delphin
|
||||||
dolphin_p;de;Delphine
|
dolphin_p;de;Delphine
|
||||||
museumticket;de;Eintrittskarte des Großen Museum
|
museumticket;de;Eintrittskarte des Großen Museum
|
||||||
|
|
|
@ -99,8 +99,8 @@ aots;en;amulet of true seeing
|
||||||
aots_p;en;amulets of true seeing
|
aots_p;en;amulets of true seeing
|
||||||
apple;en;apple
|
apple;en;apple
|
||||||
apple_p;en;apples
|
apple_p;en;apples
|
||||||
aurafocu_p;en;aurafocus
|
aurafocus;en;aurafocus
|
||||||
aurafocuse_p;en;aurafocuses
|
aurafocus_p;en;aurafocuses
|
||||||
axe;en;axe
|
axe;en;axe
|
||||||
axe_p;en;axes
|
axe_p;en;axes
|
||||||
bow;en;bow
|
bow;en;bow
|
||||||
|
@ -177,8 +177,8 @@ museumticket;en;ticket to the grand museum
|
||||||
museumticket_p;en;tickets to the grand museum
|
museumticket_p;en;tickets to the grand museum
|
||||||
nut;en;nut
|
nut;en;nut
|
||||||
nut_p;en;nuts
|
nut_p;en;nuts
|
||||||
pegasi;en;pegasi
|
pegasus;en;pegasus
|
||||||
pegasu_p;en;pegasus
|
pegasus_p;en;pegasi
|
||||||
person;en;man
|
person;en;man
|
||||||
person_p;en;men
|
person_p;en;men
|
||||||
plate;en;plate
|
plate;en;plate
|
||||||
|
@ -587,3 +587,10 @@ ZIPPED;en;ZIPPED
|
||||||
BZIP2;en;BZIP2
|
BZIP2;en;BZIP2
|
||||||
PUNKTE;en;SCORE
|
PUNKTE;en;SCORE
|
||||||
INFO;en;INFO
|
INFO;en;INFO
|
||||||
|
|
||||||
|
## Testitem
|
||||||
|
wand;en;wand
|
||||||
|
wand_p;en;wands
|
||||||
|
wand_of_tears;en;wand of tears
|
||||||
|
wands_of_tear_p;en;wands of tears
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue