- removing demonfix

- adding ship.maxsize to lua interface
This commit is contained in:
Enno Rehling 2007-02-07 17:58:31 +00:00
parent eb0843b92c
commit 4f5c8e1878
3 changed files with 15 additions and 16 deletions

View File

@ -57,8 +57,6 @@
#define FIND_FOREIGN_TEMP #define FIND_FOREIGN_TEMP
int demonfix = 0;
const unit * const unit *
u_peasants(void) u_peasants(void)
{ {
@ -793,7 +791,6 @@ transfermen(unit * u, unit * u2, int n)
ship * sh; ship * sh;
assert(u2->number+n>0); assert(u2->number+n>0);
if (demonfix && u2->race==new_race[RC_DAEMON]) fset(u2, UFL_DEBUG);
for (sk=0; sk!=MAXSKILLS; ++sk) { for (sk=0; sk!=MAXSKILLS; ++sk) {
double dlevel = 0.0; double dlevel = 0.0;

View File

@ -45,6 +45,11 @@ add_ship(const char * sname, region& r)
return sh; return sh;
} }
static int
ship_maxsize(const ship& s) {
return s.type->construction->maxsize;
}
const char * const char *
ship_gettype(const ship& s) { ship_gettype(const ship& s) {
return s.type->name[0]; return s.type->name[0];
@ -75,6 +80,7 @@ bind_ship(lua_State * L)
.property("type", &ship_gettype) .property("type", &ship_gettype)
.property("weight", &ship_getweight) .property("weight", &ship_getweight)
.property("capacity", &ship_getcapacity) .property("capacity", &ship_getcapacity)
.property("maxsize", &ship_maxsize)
.def_readonly("name", &ship::name) .def_readonly("name", &ship::name)
.def_readonly("region", &ship::region) .def_readonly("region", &ship::region)
.def_readonly("id", &ship::no) .def_readonly("id", &ship::no)

View File

@ -139,7 +139,6 @@ extern "C" {
extern boolean nobattledebug; extern boolean nobattledebug;
extern boolean dirtyload; extern boolean dirtyload;
extern int demonfix;
extern int loadplane; extern int loadplane;
extern void debug_messagetypes(FILE * out); extern void debug_messagetypes(FILE * out);
@ -469,9 +468,6 @@ read_args(int argc, char **argv, lua_State * luaState)
case 'e': case 'e':
luafile = argv[++i]; luafile = argv[++i];
break; break;
case 'D': /* DEBUG */
demonfix = atoi(argv[++i]);
break;
case 'd': case 'd':
g_datadir = argv[++i]; g_datadir = argv[++i];
break; break;