From 40de740a0aa06e6b036ca9fe03b1f0a4fee3dc74 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 11 Feb 2017 22:24:36 +0100 Subject: [PATCH] remove dict from ships and buildings, too --- src/bind_building.c | 9 --------- src/bind_ship.c | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/src/bind_building.c b/src/bind_building.c index f8cf4e6df..ea689bfb5 100644 --- a/src/bind_building.c +++ b/src/bind_building.c @@ -13,7 +13,6 @@ without prior permission by the authors of Eressea. #include #include "bind_building.h" #include "bind_unit.h" -#include "bind_dict.h" #include #include @@ -41,13 +40,6 @@ int tolua_buildinglist_next(lua_State * L) return 0; /* no more values to return */ } -static int tolua_building_get_objects(lua_State * L) -{ - building *self = (building *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); - return 1; -} - static int tolua_building_set_working(lua_State * L) { building *self = (building *)tolua_tousertype(L, 1, 0); @@ -258,7 +250,6 @@ void tolua_building_open(lua_State * L) tolua_variable(L, TOLUA_CAST "size", tolua_building_get_size, tolua_building_set_size); tolua_function(L, TOLUA_CAST "get_typename", tolua_building_get_typename); - tolua_variable(L, TOLUA_CAST "objects", tolua_building_get_objects, 0); tolua_variable(L, TOLUA_CAST "working", tolua_building_get_working, tolua_building_set_working); } diff --git a/src/bind_ship.c b/src/bind_ship.c index 95006cf5f..515fa8de3 100644 --- a/src/bind_ship.c +++ b/src/bind_ship.c @@ -13,7 +13,6 @@ without prior permission by the authors of Eressea. #include #include "bind_ship.h" #include "bind_unit.h" -#include "bind_dict.h" #include "move.h" @@ -115,13 +114,6 @@ static int tolua_ship_get_units(lua_State * L) return 1; } -static int tolua_ship_get_objects(lua_State * L) -{ - ship *self = (ship *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); - return 1; -} - static int tolua_ship_create(lua_State * L) { region *r = (region *)tolua_tousertype(L, 1, 0); @@ -233,8 +225,6 @@ void tolua_ship_open(lua_State * L) tolua_variable(L, TOLUA_CAST "type", tolua_ship_get_type, 0); tolua_variable(L, TOLUA_CAST "damage", tolua_ship_get_damage, tolua_ship_set_damage); - tolua_variable(L, TOLUA_CAST "objects", tolua_ship_get_objects, 0); - tolua_function(L, TOLUA_CAST "create", tolua_ship_create); } tolua_endmodule(L);