diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-04-04 17:37:43 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-04-04 17:37:43 +0100 |
commit | 7c5fd79b57fad2b9485d801eea07c1c9fedaabe9 (patch) | |
tree | 79ec666a5497999b3129fe925238040d3c48aa59 /sfinv.lua | |
parent | c579f862b6d4952bc56f2a0a402ad5c77e5b11f2 (diff) |
Clean up formspec related code
Diffstat (limited to 'sfinv.lua')
-rw-r--r-- | sfinv.lua | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/sfinv.lua b/sfinv.lua deleted file mode 100644 index e2b6eb4..0000000 --- a/sfinv.lua +++ /dev/null @@ -1,25 +0,0 @@ -if minetest.get_modpath("sfinv") then - local S = awards.gettext - - sfinv.register_page("awards:awards", { - title = S("Awards"), - on_enter = function(self, player, context) - context.awards_idx = 1 - end, - get = function(self, player, context) - local name = player:get_player_name() - return sfinv.make_formspec(player, context, - awards.getFormspec(name, name, context.awards_idx or 1), - false, "size[11,5]") - end, - on_player_receive_fields = function(self, player, context, fields) - if fields.awards then - local event = minetest.explode_textlist_event(fields.awards) - if event.type == "CHG" then - context.awards_idx = event.index - sfinv.set_player_inventory_formspec(player, context) - end - end - end - }) -end |