From ac73052dc15549a096337f5302254c10fca66b56 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 11 May 2018 06:05:28 +0200 Subject: [PATCH] autoseed code is never used in lua scripts (they have their own autoseed implementation). --- src/bindings.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/bindings.c b/src/bindings.c index 3fda9b844..e08b0850f 100755 --- a/src/bindings.c +++ b/src/bindings.c @@ -47,7 +47,6 @@ #include "monsters.h" #include "market.h" -#include #include #include @@ -154,25 +153,6 @@ int tolua_itemlist_next(lua_State * L) return 0; } -static int tolua_autoseed(lua_State * L) -{ - const char *filename = tolua_tostring(L, 1, 0); - int new_island = tolua_toboolean(L, 2, 0); - newfaction *players = read_newfactions(filename); - if (players != NULL) { - while (players) { - int n = listlen(players); - int k = (n + ISLANDSIZE - 1) / ISLANDSIZE; - k = n / k; - n = autoseed(&players, k, new_island ? 0 : TURNS_PER_ISLAND); - if (n == 0) { - break; - } - } - } - return 0; -} - static int tolua_getkey(lua_State * L) { const char *name = tolua_tostring(L, 1, 0); @@ -1068,7 +1048,6 @@ int tolua_bindings_open(lua_State * L, const dictionary *inifile) tolua_function(L, TOLUA_CAST "update_owners", tolua_update_owners); tolua_function(L, TOLUA_CAST "learn_skill", tolua_learn_skill); tolua_function(L, TOLUA_CAST "create_curse", tolua_create_curse); - tolua_function(L, TOLUA_CAST "autoseed", tolua_autoseed); tolua_function(L, TOLUA_CAST "get_key", tolua_getkey); tolua_function(L, TOLUA_CAST "set_key", tolua_setkey); tolua_function(L, TOLUA_CAST "translate", &tolua_translate);