correct casting for tolua

This commit is contained in:
Enno Rehling 2009-07-21 07:08:41 +00:00
parent 60e99b9a00
commit 98867c2e2c
5 changed files with 11 additions and 12 deletions

View file

@ -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;

View file

@ -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

View file

@ -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, '|', '|', '-', '-', '+', '+', '+', '+')

View file

@ -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;

View file

@ -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