master
JPG 2017-10-11 11:29:04 +02:00
parent 0274bb56be
commit 3a8558a9e8
3 changed files with 15 additions and 9 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)