forked from github/server
correct casting for tolua
This commit is contained in:
parent
60e99b9a00
commit
98867c2e2c
5 changed files with 11 additions and 12 deletions
|
@ -607,7 +607,6 @@ cr_output_ship(FILE * F, const ship * sh, const unit * u, int fcaptain, const fa
|
|||
|
||||
/* calculate cargo */
|
||||
if (u && (u->faction == f || omniscient(f))) {
|
||||
static int rule_capacity = -1;
|
||||
int n = 0, p = 0;
|
||||
int mweight = shipcapacity(sh);
|
||||
int mcabins = sh->type->cabins;
|
||||
|
|
|
@ -10,12 +10,12 @@ SOURCES =
|
|||
alchemy.c
|
||||
alliance.c
|
||||
battle.c
|
||||
border.c
|
||||
build.c
|
||||
building.c
|
||||
calendar.c
|
||||
curse.c
|
||||
command.c
|
||||
connection.c
|
||||
curse.c
|
||||
eressea.c
|
||||
equipment.c
|
||||
faction.c
|
||||
|
|
|
@ -89,7 +89,7 @@ extern void set_info_function(void (*callback)(struct window *, const struct sta
|
|||
#define TWIDTH 2 /* width of tile */
|
||||
#define THEIGHT 1 /* height of tile */
|
||||
|
||||
#if WIN32
|
||||
#ifdef WIN32
|
||||
#define wxborder(win) wborder(win, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
#else
|
||||
#define wxborder(win) wborder(win, '|', '|', '-', '-', '+', '+', '+', '+')
|
||||
|
|
|
@ -135,7 +135,7 @@ tolua_region_get_owner(lua_State* L)
|
|||
region* r = (region*) tolua_tousertype(L, 1, 0);
|
||||
if (r) {
|
||||
struct faction * f = region_get_owner(r);
|
||||
tolua_pushusertype(L, f, "faction");
|
||||
tolua_pushusertype(L, f, TOLUA_CAST "faction");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
-- the locales that this gameworld supports.
|
||||
local locales = { "de", "en" }
|
||||
local confirmed_multis = {
|
||||
"agve", "dbgi", "7jfa", "qbki",
|
||||
"gu8y", "wgxe", "iwp0", "r8vz",
|
||||
"78xt", "34fu", "z33r", "fLkr",
|
||||
"yuok"
|
||||
}
|
||||
local suspected_multis = {
|
||||
}
|
||||
|
@ -168,11 +164,15 @@ function process(orders)
|
|||
end
|
||||
|
||||
kill_multis(confirmed_multis)
|
||||
plan_monsters()
|
||||
-- plan_monsters()
|
||||
|
||||
local nmrs = get_nmrs(1)
|
||||
if nmrs >= 80 then
|
||||
print("Shit. More than 80 factions with 1 NMR (" .. nmrs .. ")")
|
||||
-- nmrs = 0
|
||||
if maxnmrs == nil then
|
||||
maxnmrs = 30
|
||||
end
|
||||
if nmrs >= maxnmrs then
|
||||
print("Shit. More than " .. maxnmrs .. " factions with 1 NMR (" .. nmrs .. ")")
|
||||
write_summary()
|
||||
write_game("aborted.dat")
|
||||
return -1
|
||||
|
|
Loading…
Reference in a new issue