Minor fixes to inbox.

* Don't trigger global variable warning.
* Change form name to avoid possible bugs in the future.
* Actually (opt-)depend on screwdriver mod.
This commit is contained in:
Diego Martínez 2017-02-03 00:27:02 -03:00
parent 2ce071ec16
commit fe92fdc373
2 changed files with 4 additions and 3 deletions

View File

@ -1,2 +1,3 @@
default default
homedecor_i18n homedecor_i18n
screwdriver?

View File

@ -2,7 +2,7 @@
local S = homedecor_i18n.gettext local S = homedecor_i18n.gettext
local inbox = {} local inbox = {}
screwdriver = screwdriver or {} local screwdriver = rawget(_G, "screwdriver") or {}
minetest.register_craft({ minetest.register_craft({
output ="inbox:empty", output ="inbox:empty",
@ -53,12 +53,12 @@ minetest.register_node("inbox:empty", {
clicker:get_player_control().aux1 then clicker:get_player_control().aux1 then
minetest.show_formspec( minetest.show_formspec(
clicker:get_player_name(), clicker:get_player_name(),
"default:chest_locked", "inbox:mailbox",
inbox.get_inbox_formspec(pos)) inbox.get_inbox_formspec(pos))
else else
minetest.show_formspec( minetest.show_formspec(
clicker:get_player_name(), clicker:get_player_name(),
"default:chest_locked", "inbox:mailbox",
inbox.get_inbox_insert_formspec(pos)) inbox.get_inbox_insert_formspec(pos))
end end
return itemstack return itemstack