Move hotbar code/textures, and damage sound, from player_api to default

These are unrelated to the Player API and player object.
All other GUI/HUD code and textures are in default.
All other engine hardcoded sounds are in default.
The player_api mod is highly likely to be used unchanged in new games,
so logical grouping of content will help the creation of new games.
Tento commit je obsažen v:
Paramat
2019-10-18 02:43:06 +01:00
odevzdal GitHub
rodič 7c1fd9c24e
revize 7caa5d36f2
8 změnil soubory, kde provedl 16 přidání a 44 odebrání

Zobrazit soubor

@ -14,10 +14,10 @@ default.get_translator = S
-- GUI related stuff
minetest.register_on_joinplayer(function(player)
-- Set formspec prepend
local formspec = [[
bgcolor[#080808BB;true]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]]
local name = player:get_player_name()
local info = minetest.get_player_information(name)
if info.formspec_version > 1 then
@ -26,6 +26,10 @@ minetest.register_on_joinplayer(function(player)
formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]"
end
player:set_formspec_prepend(formspec)
-- Set hotbar textures
player:hud_set_hotbar_image("gui_hotbar.png")
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
end)
function default.get_hotbar_bg(x,y)