update
parent
0274bb56be
commit
3a8558a9e8
|
@ -174,18 +174,17 @@ function creative.register_tab(name, title, items)
|
|||
else for item in pairs(fields) do
|
||||
if item:find(":") then
|
||||
if not is_mapmaker and not is_teacher and not sandbox then
|
||||
if not sandbox then
|
||||
minetest.chat_send_player(player_name,
|
||||
minetest.colorize("#FF0000",
|
||||
"ERROR: Privilege 'mapmaker' or 'teacher'" ..
|
||||
" required to get this item"))
|
||||
|
||||
elseif worldname == "coding_schools" or
|
||||
if worldname == "coding_schools" or
|
||||
worldname == "science_factory" then
|
||||
minetest.chat_send_player(player_name,
|
||||
minetest.colorize("#FF0000",
|
||||
"ERROR: You cannot use any other item " ..
|
||||
"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
|
||||
|
||||
return
|
||||
|
|
|
@ -15,6 +15,13 @@ end
|
|||
|
||||
minetest.register_on_joinplayer(function(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)
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
|
|
|
@ -28,6 +28,6 @@ minetest.register_on_joinplayer(function(player)
|
|||
{x = 200, y = 219},
|
||||
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")
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue