diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index 92ffba40a..a3bbace10 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -57,8 +57,6 @@ #define FIND_FOREIGN_TEMP -int demonfix = 0; - const unit * u_peasants(void) { @@ -779,21 +777,20 @@ move_unit(unit * u, region * r, unit ** ulist) void transfermen(unit * u, unit * u2, int n) { - const attrib * a; - int hp = u->hp; - region * r = u->region; - - if (n==0) return; + const attrib * a; + int hp = u->hp; + region * r = u->region; + + if (n==0) return; assert(n > 0); - /* "hat attackiert"-status wird übergeben */ + /* "hat attackiert"-status wird übergeben */ - if (u2) { - skill *sv, *sn; - skill_t sk; + if (u2) { + skill *sv, *sn; + skill_t sk; ship * sh; assert(u2->number+n>0); - if (demonfix && u2->race==new_race[RC_DAEMON]) fset(u2, UFL_DEBUG); for (sk=0; sk!=MAXSKILLS; ++sk) { double dlevel = 0.0; diff --git a/src/eressea/lua/ship.cpp b/src/eressea/lua/ship.cpp index 369eb1da7..475e36893 100644 --- a/src/eressea/lua/ship.cpp +++ b/src/eressea/lua/ship.cpp @@ -45,6 +45,11 @@ add_ship(const char * sname, region& r) return sh; } +static int +ship_maxsize(const ship& s) { + return s.type->construction->maxsize; +} + const char * ship_gettype(const ship& s) { return s.type->name[0]; @@ -75,6 +80,7 @@ bind_ship(lua_State * L) .property("type", &ship_gettype) .property("weight", &ship_getweight) .property("capacity", &ship_getcapacity) + .property("maxsize", &ship_maxsize) .def_readonly("name", &ship::name) .def_readonly("region", &ship::region) .def_readonly("id", &ship::no) diff --git a/src/eressea/server.cpp b/src/eressea/server.cpp index 9a44eae41..8bb7fedb7 100644 --- a/src/eressea/server.cpp +++ b/src/eressea/server.cpp @@ -139,7 +139,6 @@ extern "C" { extern boolean nobattledebug; extern boolean dirtyload; - extern int demonfix; extern int loadplane; extern void debug_messagetypes(FILE * out); @@ -469,9 +468,6 @@ read_args(int argc, char **argv, lua_State * luaState) case 'e': luafile = argv[++i]; break; - case 'D': /* DEBUG */ - demonfix = atoi(argv[++i]); - break; case 'd': g_datadir = argv[++i]; break;