forked from github/server
bugfixes: parser, directions
This commit is contained in:
parent
c29da6e179
commit
96d6cc03a5
|
@ -97,6 +97,10 @@ SOURCE=.\giveitem.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\gm.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\hate.h
|
SOURCE=.\hate.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -138,6 +142,10 @@ SOURCE=.\giveitem.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\gm.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\hate.c
|
SOURCE=.\hate.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: eressea.c,v 1.16 2001/02/17 14:47:42 enno Exp $
|
* $Id: eressea.c,v 1.17 2001/02/18 08:37:57 enno Exp $
|
||||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -2144,7 +2144,10 @@ finddirection(const char *s)
|
||||||
static tnode dirnames;
|
static tnode dirnames;
|
||||||
int dir;
|
int dir;
|
||||||
|
|
||||||
if (!init) init_directions(&dirnames);
|
if (!init) {
|
||||||
|
init_directions(&dirnames);
|
||||||
|
init=true;
|
||||||
|
}
|
||||||
|
|
||||||
if (findtoken(&dirnames, s, (void**)&dir)==E_TOK_SUCCESS) {
|
if (findtoken(&dirnames, s, (void**)&dir)==E_TOK_SUCCESS) {
|
||||||
return (direction_t)dir;
|
return (direction_t)dir;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: item.c,v 1.12 2001/02/15 02:41:46 enno Exp $
|
* $Id: item.c,v 1.13 2001/02/18 08:37:57 enno Exp $
|
||||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -1219,7 +1219,7 @@ limit_oldtypes(const region * r, const resource_type * rtype)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
use_oldtypes(region * r, const resource_type * rtype, int norders)
|
use_oldresource(region * r, const resource_type * rtype, int norders)
|
||||||
/* TODO: split into seperate functions. really much nicer. */
|
/* TODO: split into seperate functions. really much nicer. */
|
||||||
{
|
{
|
||||||
assert(norders>0);
|
assert(norders>0);
|
||||||
|
@ -1248,6 +1248,19 @@ use_oldtypes(region * r, const resource_type * rtype, int norders)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
use_olditem(struct unit * user, const struct item_type * itype, const char * cmd)
|
||||||
|
{
|
||||||
|
item_t i;
|
||||||
|
for (i=0;i!=MAXITEMS;++i) {
|
||||||
|
if (olditemtype[i]==itype) {
|
||||||
|
strlist * s = makestrlist(cmd);
|
||||||
|
itemdata[i].benutze_funktion(user->region, user, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
typedef const char* translate_t[5];
|
typedef const char* translate_t[5];
|
||||||
static translate_t translation[] = {
|
static translate_t translation[] = {
|
||||||
{ "Holz", "log", "logs", "log", "logs" },
|
{ "Holz", "log", "logs", "log", "logs" },
|
||||||
|
@ -1385,10 +1398,13 @@ init_olditems(void)
|
||||||
{
|
{
|
||||||
resource_limit * rdata = (resource_limit*)a->data.v;
|
resource_limit * rdata = (resource_limit*)a->data.v;
|
||||||
rdata->limit = limit_oldtypes;
|
rdata->limit = limit_oldtypes;
|
||||||
rdata->use = use_oldtypes;
|
rdata->use = use_oldresource;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (itemdata[i].benutze_funktion) {
|
||||||
|
itype->use = use_olditem;
|
||||||
|
}
|
||||||
itype->construction = con;
|
itype->construction = con;
|
||||||
olditemtype[i] = itype;
|
olditemtype[i] = itype;
|
||||||
oldresourcetype[item2res(i)] = rtype;
|
oldresourcetype[item2res(i)] = rtype;
|
||||||
|
|
|
@ -836,6 +836,40 @@ SOURCE=..\common\attributes\giveitem.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\attributes\gm.c
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "eressea - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "eressea - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP Intermediate_Dir "..\common\attributes\Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "eressea - Win32 Conversion"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "eressea - Win32 Profile"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\attributes\gm.h
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "eressea - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "eressea - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP Intermediate_Dir "..\common\attributes\Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "eressea - Win32 Conversion"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "eressea - Win32 Profile"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\attributes\hate.c
|
SOURCE=..\common\attributes\hate.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "eressea - Win32 Release"
|
!IF "$(CFG)" == "eressea - Win32 Release"
|
||||||
|
|
Loading…
Reference in New Issue