mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
Linked all /rules chatcommand to new interact system
This commit is contained in:
parent
cc7e126c7a
commit
aeae5c426a
@ -219,7 +219,7 @@ minetest.register_chatcommand("rules",{
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
function start_formspecs(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if not minetest.get_player_privs(name).interact then
|
if not minetest.get_player_privs(name).interact then
|
||||||
if interact.screen1 ~= false then
|
if interact.screen1 ~= false then
|
||||||
@ -229,7 +229,19 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
else
|
else
|
||||||
minetest.show_formspec(name, "rules", make_formspec3(player))
|
minetest.show_formspec(name, "rules", make_formspec3(player))
|
||||||
end
|
end
|
||||||
else
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
|
||||||
|
minetest.register_on_joinplayer(start_formspecs)
|
||||||
|
|
||||||
|
minetest.register_chatcommand("rules", {
|
||||||
|
description = "Obtain interact privilege / Obtenir le privilege interact",
|
||||||
|
params = "",
|
||||||
|
privs = {},
|
||||||
|
func = function(name)
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
if player then
|
||||||
|
start_formspecs(player)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user