forked from github/server
- removing demonfix
- adding ship.maxsize to lua interface
This commit is contained in:
parent
eb0843b92c
commit
4f5c8e1878
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue