diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml
index 51a24c4d4..351a7e376 100644
--- a/res/core/de/strings.xml
+++ b/res/core/de/strings.xml
@@ -275,11 +275,6 @@
-
- Tresen
- counter
-
-
wenige
few
diff --git a/src/bind_building.c b/src/bind_building.c
index 8b89d2618..f52789700 100644
--- a/src/bind_building.c
+++ b/src/bind_building.c
@@ -114,7 +114,7 @@ static int tolua_building_set_name(lua_State * L)
static int tolua_building_get_size(lua_State * L)
{
building *self = (building *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, self->size);
+ lua_pushinteger(L, self->size);
return 1;
}
@@ -145,7 +145,7 @@ static int tolua_building_get_units(lua_State * L)
static int tolua_building_get_id(lua_State * L)
{
building *self = (building *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->no);
+ lua_pushinteger(L, self->no);
return 1;
}
diff --git a/src/bind_faction.c b/src/bind_faction.c
index 1846ea957..23b450618 100644
--- a/src/bind_faction.c
+++ b/src/bind_faction.c
@@ -84,28 +84,28 @@ int tolua_faction_add_item(lua_State * L)
static int tolua_faction_get_maxheroes(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)maxheroes(self));
+ lua_pushinteger(L, maxheroes(self));
return 1;
}
static int tolua_faction_get_heroes(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)countheroes(self));
+ lua_pushinteger(L, countheroes(self));
return 1;
}
static int tolua_faction_get_score(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->score);
+ lua_pushinteger(L, self->score);
return 1;
}
static int tolua_faction_get_id(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->no);
+ lua_pushinteger(L, self->no);
return 1;
}
@@ -148,7 +148,7 @@ static int tolua_faction_set_magic(lua_State * L)
static int tolua_faction_get_age(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->age);
+ lua_pushinteger(L, self->age);
return 1;
}
@@ -163,7 +163,7 @@ static int tolua_faction_set_age(lua_State * L)
static int tolua_faction_get_flags(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->flags);
+ lua_pushinteger(L, self->flags);
return 1;
}
@@ -178,7 +178,7 @@ static int tolua_faction_set_flags(lua_State * L)
static int tolua_faction_get_options(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->options);
+ lua_pushinteger(L, self->options);
return 1;
}
@@ -193,7 +193,7 @@ static int tolua_faction_set_options(lua_State * L)
static int tolua_faction_get_lastturn(lua_State * L)
{
faction *self = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->lastorders);
+ lua_pushinteger(L, self->lastorders);
return 1;
}
@@ -245,7 +245,7 @@ static int tolua_faction_get_policy(lua_State * L)
}
}
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -283,8 +283,8 @@ static int tolua_faction_normalize(lua_State * L)
int nx = r->x, ny = r->y;
pnormalize(&nx, &ny, pl);
adjust_coordinates(f, &nx, &ny, pl);
- tolua_pushnumber(L, (lua_Number)nx);
- tolua_pushnumber(L, (lua_Number)ny);
+ lua_pushinteger(L, nx);
+ lua_pushinteger(L, ny);
return 2;
}
return 0;
@@ -319,8 +319,8 @@ static int tolua_faction_get_origin(lua_State * L)
y = 0;
}
- tolua_pushnumber(L, (lua_Number)x);
- tolua_pushnumber(L, (lua_Number)y);
+ lua_pushinteger(L, x);
+ lua_pushinteger(L, y);
return 2;
}
@@ -443,7 +443,7 @@ static int tolua_faction_set_name(lua_State * L)
static int tolua_faction_get_uid(lua_State * L)
{
faction *f = (faction *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, f->subscription);
+ lua_pushinteger(L, f->subscription);
return 1;
}
diff --git a/src/bind_gmtool.c b/src/bind_gmtool.c
index ec2535e16..3c07bb3b7 100644
--- a/src/bind_gmtool.c
+++ b/src/bind_gmtool.c
@@ -153,7 +153,7 @@ static int tolua_make_island(lua_State * L)
int n = (int)tolua_tonumber(L, 4, s / 3);
n = build_island_e3(NULL, x, y, n, s);
- tolua_pushnumber(L, n);
+ lua_pushinteger(L, n);
return 1;
}
@@ -166,8 +166,8 @@ static void lua_paint_info(struct window *wnd, const struct state *st)
int nx = st->cursor.x, ny = st->cursor.y;
pnormalize(&nx, &ny, st->cursor.pl);
lua_rawgeti(L, LUA_REGISTRYINDEX, paint_handle);
- tolua_pushnumber(L, nx);
- tolua_pushnumber(L, ny);
+ lua_pushinteger(L, nx);
+ lua_pushinteger(L, ny);
if (lua_pcall(L, 2, 1, 0) != 0) {
const char *error = lua_tostring(L, -1);
log_error("paint function failed: %s\n", error);
diff --git a/src/bind_message.c b/src/bind_message.c
index 75ff5821b..bbbd2bc0b 100644
--- a/src/bind_message.c
+++ b/src/bind_message.c
@@ -214,7 +214,7 @@ static int tolua_msg_set_string(lua_State * L)
const char *param = tolua_tostring(L, 2, 0);
const char *value = tolua_tostring(L, 3, 0);
int result = msg_set_string(lmsg, param, value);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -224,7 +224,7 @@ static int tolua_msg_set_int(lua_State * L)
const char *param = tolua_tostring(L, 2, 0);
int value = (int)tolua_tonumber(L, 3, 0);
int result = msg_set_int(lmsg, param, value);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -234,7 +234,7 @@ static int tolua_msg_set_resource(lua_State * L)
const char *param = tolua_tostring(L, 2, 0);
const char *value = tolua_tostring(L, 3, 0);
int result = msg_set_resource(lmsg, param, value);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -244,7 +244,7 @@ static int tolua_msg_set_unit(lua_State * L)
const char *param = tolua_tostring(L, 2, 0);
unit *value = (unit *)tolua_tousertype(L, 3, 0);
int result = msg_set_unit(lmsg, param, value);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -254,7 +254,7 @@ static int tolua_msg_set_region(lua_State * L)
const char *param = tolua_tostring(L, 2, 0);
region *value = (region *)tolua_tousertype(L, 3, 0);
int result = msg_set_region(lmsg, param, value);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -270,7 +270,7 @@ static int tolua_msg_set(lua_State * L)
else if (tolua_isusertype(L, 3, TOLUA_CAST "unit", 0, &err)) {
return tolua_msg_set_unit(L);
}
- tolua_pushnumber(L, (lua_Number)-1);
+ lua_pushinteger(L, -1);
return 1;
}
@@ -279,7 +279,7 @@ static int tolua_msg_send_region(lua_State * L)
lua_message *lmsg = (lua_message *)tolua_tousertype(L, 1, 0);
region *r = (region *)tolua_tousertype(L, 2, 0);
int result = msg_send_region(lmsg, r);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -293,7 +293,7 @@ static int tolua_msg_report_action(lua_State * L)
lmsg->msg = msg_create(lmsg->mtype, lmsg->args);
}
result = report_action(r, u, lmsg->msg, flags);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -303,7 +303,7 @@ static int tolua_msg_send_faction(lua_State * L)
faction *f = (faction *)tolua_tousertype(L, 2, 0);
if (f && lmsg) {
int result = msg_send_faction(lmsg, f);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
return 0;
diff --git a/src/bind_monsters.c b/src/bind_monsters.c
index 8897da0d1..a106ec638 100644
--- a/src/bind_monsters.c
+++ b/src/bind_monsters.c
@@ -21,7 +21,7 @@ static int tolua_levitate_ship(lua_State * L)
float power = (float)tolua_tonumber(L, 3, 0);
int duration = (int)tolua_tonumber(L, 4, 0);
int cno = levitate_ship(sh, mage, power, duration);
- tolua_pushnumber(L, (lua_Number)cno);
+ lua_pushinteger(L, cno);
return 1;
}
diff --git a/src/bind_region.c b/src/bind_region.c
index 792f15ac0..1b0157718 100644
--- a/src/bind_region.c
+++ b/src/bind_region.c
@@ -62,7 +62,7 @@ int tolua_regionlist_next(lua_State * L)
static int tolua_region_get_id(lua_State * L)
{
region *self = (region *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->uid);
+ lua_pushinteger(L, self->uid);
return 1;
}
@@ -85,14 +85,14 @@ static int tolua_region_set_blocked(lua_State * L)
static int tolua_region_get_x(lua_State * L)
{
region *self = (region *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->x);
+ lua_pushinteger(L, self->x);
return 1;
}
static int tolua_region_get_y(lua_State * L)
{
region *self = (region *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->y);
+ lua_pushinteger(L, self->y);
return 1;
}
@@ -199,7 +199,7 @@ static int tolua_region_set_name(lua_State * L)
static int tolua_region_get_morale(lua_State * L)
{
region *r = (region *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, region_get_morale(r));
+ lua_pushinteger(L, region_get_morale(r));
return 1;
}
@@ -323,7 +323,7 @@ static int tolua_region_get_resourcelevel(lua_State * L)
const rawmaterial *rm;
for (rm = r->resources; rm; rm = rm->next) {
if (rm->type->rtype == rtype) {
- tolua_pushnumber(L, (lua_Number)rm->level);
+ lua_pushinteger(L, rm->level);
return 1;
}
}
@@ -389,7 +389,7 @@ static int tolua_region_get_resource(lua_State * L)
}
}
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -613,7 +613,7 @@ static int tolua_plane_set_name(lua_State * L)
static int tolua_plane_get_id(lua_State * L)
{
plane *self = (plane *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->id);
+ lua_pushinteger(L, self->id);
return 1;
}
@@ -623,8 +623,8 @@ static int tolua_plane_normalize(lua_State * L)
int x = (int)tolua_tonumber(L, 2, 0);
int y = (int)tolua_tonumber(L, 3, 0);
pnormalize(&x, &y, self);
- tolua_pushnumber(L, (lua_Number)x);
- tolua_pushnumber(L, (lua_Number)y);
+ lua_pushinteger(L, x);
+ lua_pushinteger(L, y);
return 2;
}
diff --git a/src/bind_ship.c b/src/bind_ship.c
index 7dd1b02f6..595be35dd 100644
--- a/src/bind_ship.c
+++ b/src/bind_ship.c
@@ -45,7 +45,7 @@ int tolua_shiplist_next(lua_State * L)
static int tolua_ship_get_id(lua_State * L)
{
ship *self = (ship *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->no);
+ lua_pushinteger(L, self->no);
return 1;
}
@@ -152,7 +152,7 @@ tolua_ship_tostring(lua_State * L)
static int tolua_ship_get_flags(lua_State * L)
{
ship *self = (ship *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->flags);
+ lua_pushinteger(L, self->flags);
return 1;
}
@@ -179,7 +179,7 @@ static int tolua_ship_get_coast(lua_State * L)
{
ship *self = (ship *)tolua_tousertype(L, 1, 0);
if (self->coast) {
- tolua_pushnumber(L, self->coast);
+ lua_pushinteger(L, self->coast);
return 1;
}
return 0;
diff --git a/src/bind_sqlite.c b/src/bind_sqlite.c
index e2c0e69e3..e8c9b7565 100644
--- a/src/bind_sqlite.c
+++ b/src/bind_sqlite.c
@@ -44,7 +44,7 @@ static int tolua_db_execute(lua_State * L)
int res = sqlite3_exec(db, sql, 0, 0, 0);
- tolua_pushnumber(L, (LUA_NUMBER)res);
+ lua_pushinteger(L, res);
return 1;
}
diff --git a/src/bind_storage.c b/src/bind_storage.c
index d0fea8244..acdf1e046 100644
--- a/src/bind_storage.c
+++ b/src/bind_storage.c
@@ -77,7 +77,7 @@ static int tolua_storage_read_float(lua_State * L)
gamedata *data = (gamedata *)tolua_tousertype(L, 1, 0);
float num;
READ_FLT(data->store, &num);
- tolua_pushnumber(L, (lua_Number)num);
+ lua_pushnumber(L, num);
return 1;
}
@@ -86,7 +86,7 @@ static int tolua_storage_read_int(lua_State * L)
gamedata *data = (gamedata *)tolua_tousertype(L, 1, 0);
int num;
READ_INT(data->store, &num);
- tolua_pushnumber(L, (lua_Number)num);
+ lua_pushinteger(L, num);
return 1;
}
diff --git a/src/bind_unit.c b/src/bind_unit.c
index 4f262114c..200c53b9b 100755
--- a/src/bind_unit.c
+++ b/src/bind_unit.c
@@ -160,7 +160,7 @@ static int tolua_unit_set_group(lua_State * L)
{
unit *self = (unit *)tolua_tousertype(L, 1, 0);
int result = join_group(self, tolua_tostring(L, 2, 0));
- tolua_pushnumber(L, result);
+ lua_pushinteger(L, result);
return 1;
}
diff --git a/src/bindings.c b/src/bindings.c
index 098499a23..849678f25 100755
--- a/src/bindings.c
+++ b/src/bindings.c
@@ -123,7 +123,7 @@ static int tolua_quicklist_iter(lua_State * L)
void *data = ql_get(ql, index);
tolua_pushusertype(L, data, TOLUA_CAST type);
ql_advance(qlp, &index, 1);
- tolua_pushnumber(L, index);
+ lua_pushinteger(L, index);
lua_replace(L, lua_upvalueindex(2));
return 1;
}
@@ -282,14 +282,14 @@ static int tolua_set_turn(lua_State * L)
static int tolua_get_turn(lua_State * L)
{
- tolua_pushnumber(L, (lua_Number)turn);
+ lua_pushinteger(L, turn);
return 1;
}
static int tolua_atoi36(lua_State * L)
{
const char *s = tolua_tostring(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)atoi36(s));
+ lua_pushinteger(L, atoi36(s));
return 1;
}
@@ -303,7 +303,7 @@ static int tolua_itoa36(lua_State * L)
static int tolua_dice_rand(lua_State * L)
{
const char *s = tolua_tostring(L, 1, 0);
- tolua_pushnumber(L, dice_rand(s));
+ lua_pushinteger(L, dice_rand(s));
return 1;
}
@@ -320,7 +320,7 @@ static int tolua_addequipment(lua_State * L)
result = 0;
}
}
- lua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -426,7 +426,7 @@ static int tolua_get_nmrs(lua_State * L)
}
result = nmrs[n];
}
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -451,7 +451,7 @@ static int tolua_equipment_setitem(lua_State * L)
result = 0;
}
}
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -465,7 +465,7 @@ static int tolua_spawn_braineaters(lua_State * L)
static int tolua_init_reports(lua_State * L)
{
int result = init_reports();
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -475,7 +475,7 @@ static int tolua_write_report(lua_State * L)
if (f) {
time_t ltime = time(0);
int result = write_reports(f, ltime);
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
}
else {
tolua_pushstring(L, "function expects a faction, got nil");
@@ -488,7 +488,7 @@ static int tolua_write_reports(lua_State * L)
int result;
init_reports();
result = reports();
- tolua_pushnumber(L, (lua_Number)result);
+ lua_pushinteger(L, result);
return 1;
}
@@ -568,7 +568,7 @@ static int tolua_write_map(lua_State * L)
static int tolua_read_turn(lua_State * L)
{
int cturn = current_turn();
- tolua_pushnumber(L, (lua_Number)cturn);
+ lua_pushinteger(L, cturn);
return 1;
}
@@ -661,7 +661,7 @@ static int tolua_get_alliance_factions(lua_State * L)
static int tolua_get_alliance_id(lua_State * L)
{
alliance *self = (alliance *)tolua_tousertype(L, 1, 0);
- tolua_pushnumber(L, (lua_Number)self->id);
+ lua_pushinteger(L, self->id);
return 1;
}
@@ -1069,7 +1069,7 @@ static void parse_inifile(lua_State * L, dictionary * d, const char *section)
tolua_pushstring(L, str_value);
}
else {
- tolua_pushnumber(L, num_value);
+ lua_pushnumber(L, num_value);
}
lua_rawset(L, -3);
}
diff --git a/src/helpers.c b/src/helpers.c
index 4690023e9..29038afb3 100644
--- a/src/helpers.c
+++ b/src/helpers.c
@@ -58,7 +58,7 @@ lua_giveitem(unit * s, unit * d, const item_type * itype, int n, struct order *o
tolua_pushusertype(L, s, TOLUA_CAST "unit");
tolua_pushusertype(L, d, TOLUA_CAST "unit");
tolua_pushstring(L, iname);
- tolua_pushnumber(L, (lua_Number)n);
+ lua_pushinteger(L, n);
if (lua_pcall(L, 4, 1, 0) != 0) {
const char *error = lua_tostring(L, -1);
@@ -121,7 +121,7 @@ produce_resource(region * r, const resource_type * rtype, int norders)
lua_getglobal(L, fname);
if (lua_isfunction(L, -1)) {
tolua_pushusertype(L, (void *)r, TOLUA_CAST "region");
- tolua_pushnumber(L, (lua_Number)norders);
+ lua_pushinteger(L, norders);
if (lua_pcall(L, 2, 0, 0) != 0) {
const char *error = lua_tostring(L, -1);
@@ -177,8 +177,8 @@ static int lua_callspell(castorder * co)
int nparam = 4;
tolua_pushusertype(L, r, TOLUA_CAST "region");
tolua_pushusertype(L, caster, TOLUA_CAST "unit");
- tolua_pushnumber(L, (lua_Number)co->level);
- tolua_pushnumber(L, (lua_Number)co->force);
+ lua_pushinteger(L, co->level);
+ lua_pushnumber(L, co->force);
if (co->sp->parameter && co->par->length) {
const char *synp = co->sp->parameter;
int i = 0;
@@ -267,7 +267,7 @@ lua_changeresource(unit * u, const struct resource_type *rtype, int delta)
lua_getglobal(L, fname);
if (lua_isfunction(L, -1)) {
tolua_pushusertype(L, u, TOLUA_CAST "unit");
- tolua_pushnumber(L, (lua_Number)delta);
+ lua_pushinteger(L, delta);
if (lua_pcall(L, 2, 1, 0) != 0) {
const char *error = lua_tostring(L, -1);
@@ -363,7 +363,7 @@ lua_wage(const region * r, const faction * f, const race * rc, int in_turn)
tolua_pushusertype(L, (void *)r, TOLUA_CAST "region");
tolua_pushusertype(L, (void *)f, TOLUA_CAST "faction");
tolua_pushstring(L, rc ? rc->_name : 0);
- tolua_pushnumber(L, (lua_Number)in_turn);
+ lua_pushinteger(L, in_turn);
if (lua_pcall(L, 3, 1, 0) != 0) {
const char *error = lua_tostring(L, -1);
@@ -416,7 +416,7 @@ static double lua_building_taxes(building * b, int level)
lua_getglobal(L, fname);
if (lua_isfunction(L, -1)) {
tolua_pushusertype(L, (void *)b, TOLUA_CAST "building");
- tolua_pushnumber(L, level);
+ lua_pushinteger(L, level);
if (lua_pcall(L, 2, 1, 0) != 0) {
const char *error = lua_tostring(L, -1);
@@ -508,7 +508,7 @@ struct order *ord)
lua_getglobal(L, fname);
if (lua_isfunction(L, -1)) {
tolua_pushusertype(L, (void *)u, TOLUA_CAST "unit");
- tolua_pushnumber(L, (lua_Number)amount);
+ lua_pushinteger(L, amount);
if (lua_pcall(L, 2, 1, 0) != 0) {
const char *error = lua_tostring(L, -1);