update
parent
0274bb56be
commit
3a8558a9e8
|
@ -174,18 +174,17 @@ function creative.register_tab(name, title, items)
|
||||||
else for item in pairs(fields) do
|
else for item in pairs(fields) do
|
||||||
if item:find(":") then
|
if item:find(":") then
|
||||||
if not is_mapmaker and not is_teacher and not sandbox then
|
if not is_mapmaker and not is_teacher and not sandbox then
|
||||||
if not sandbox then
|
if worldname == "coding_schools" or
|
||||||
minetest.chat_send_player(player_name,
|
worldname == "science_factory" then
|
||||||
minetest.colorize("#FF0000",
|
|
||||||
"ERROR: Privilege 'mapmaker' or 'teacher'" ..
|
|
||||||
" required to get this item"))
|
|
||||||
|
|
||||||
elseif worldname == "coding_schools" or
|
|
||||||
worldname == "science_factory" then
|
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
minetest.colorize("#FF0000",
|
minetest.colorize("#FF0000",
|
||||||
"ERROR: You cannot use any other item " ..
|
"ERROR: You cannot use any other item " ..
|
||||||
"on this map except the kidsbot"))
|
"on this map except the kidsbot"))
|
||||||
|
else
|
||||||
|
minetest.chat_send_player(player_name,
|
||||||
|
minetest.colorize("#FF0000",
|
||||||
|
"ERROR: Privilege 'mapmaker' or 'teacher'" ..
|
||||||
|
" required to get this item"))
|
||||||
end
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
@ -15,6 +15,13 @@ end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
minetest.after(0, add_text, player)
|
minetest.after(0, add_text, player)
|
||||||
|
|
||||||
|
local is_mapmaker = minetest.check_player_privs(player, "mapmaker")
|
||||||
|
local is_teacher = minetest.check_player_privs(player, "teacher")
|
||||||
|
|
||||||
|
if is_teacher or is_mapmaker then
|
||||||
|
player:hud_set_hotbar_itemcount(16)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
|
|
|
@ -28,6 +28,6 @@ minetest.register_on_joinplayer(function(player)
|
||||||
{x = 200, y = 219},
|
{x = 200, y = 219},
|
||||||
30
|
30
|
||||||
)
|
)
|
||||||
player:hud_set_hotbar_image("gui_hotbar.png")
|
--player:hud_set_hotbar_image("gui_hotbar.png")
|
||||||
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
|
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue