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
|
#define FIND_FOREIGN_TEMP
|
||||||
|
|
||||||
int demonfix = 0;
|
|
||||||
|
|
||||||
const unit *
|
const unit *
|
||||||
u_peasants(void)
|
u_peasants(void)
|
||||||
{
|
{
|
||||||
|
@ -779,21 +777,20 @@ move_unit(unit * u, region * r, unit ** ulist)
|
||||||
void
|
void
|
||||||
transfermen(unit * u, unit * u2, int n)
|
transfermen(unit * u, unit * u2, int n)
|
||||||
{
|
{
|
||||||
const attrib * a;
|
const attrib * a;
|
||||||
int hp = u->hp;
|
int hp = u->hp;
|
||||||
region * r = u->region;
|
region * r = u->region;
|
||||||
|
|
||||||
if (n==0) return;
|
if (n==0) return;
|
||||||
assert(n > 0);
|
assert(n > 0);
|
||||||
/* "hat attackiert"-status wird übergeben */
|
/* "hat attackiert"-status wird übergeben */
|
||||||
|
|
||||||
if (u2) {
|
if (u2) {
|
||||||
skill *sv, *sn;
|
skill *sv, *sn;
|
||||||
skill_t sk;
|
skill_t sk;
|
||||||
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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue