1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

Removed global variables (quests, throwing)

This commit is contained in:
LeMagnesium 2015-07-24 10:42:07 +02:00
parent 1fb14f00cb
commit 905464a39a
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
if (cmsg) then if rawget(_G, "cmsg") then
function quests.show_message(t, playername, text) function quests.show_message(t, playername, text)
if (quests.hud[playername].central_message_enabled) then if (quests.hud[playername].central_message_enabled) then
local player = minetest.get_player_by_name(playername) local player = minetest.get_player_by_name(playername)

View File

@ -123,7 +123,7 @@ function throwing_register_bow (name, desc, scale, stiffness, reload_time, tough
recipe = craft recipe = craft
}) })
craft_width = 1 local craft_width = 1
-- Since # isn't stable especially when there are nils in the table, count by hand -- Since # isn't stable especially when there are nils in the table, count by hand
for _,v in ipairs(craft) do for _,v in ipairs(craft) do
for i,__ in ipairs(v) do for i,__ in ipairs(v) do
@ -132,7 +132,7 @@ function throwing_register_bow (name, desc, scale, stiffness, reload_time, tough
end end
end end
end end
rev_craft = {} local rev_craft = {}
for i,y in ipairs(craft) do for i,y in ipairs(craft) do
rev_craft[i] = {} rev_craft[i] = {}
for j,x in ipairs(y) do for j,x in ipairs(y) do