mirror of
https://github.com/mt-mods/dreambuilder_hotbar.git
synced 2025-01-26 13:31:27 +01:00
adjust for change of name of Dreambuilder's theme code
This commit is contained in:
parent
f0afbd739e
commit
9a50475ed5
6
init.lua
6
init.lua
@ -44,8 +44,8 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
local hotbar_size = validate_size(get_hotbar_setting(player:get_player_name()))
|
local hotbar_size = validate_size(get_hotbar_setting(player:get_player_name()))
|
||||||
player:hud_set_hotbar_itemcount(hotbar_size)
|
player:hud_set_hotbar_itemcount(hotbar_size)
|
||||||
minetest.after(0.5,function(hotbar_size)
|
minetest.after(0.5,function(hotbar_size)
|
||||||
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
|
player:hud_set_hotbar_selected_image(dreambuilder_theme.name.."_gui_hotbar_selected.png")
|
||||||
player:hud_set_hotbar_image("gui_hb_bg_"..hotbar_size..".png")
|
player:hud_set_hotbar_image(dreambuilder_theme.name.."_gui_hb_bg_"..hotbar_size..".png")
|
||||||
end,hotbar_size)
|
end,hotbar_size)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ minetest.register_chatcommand("hotbar", {
|
|||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
player:hud_set_hotbar_itemcount(hotbar_size)
|
player:hud_set_hotbar_itemcount(hotbar_size)
|
||||||
minetest.chat_send_player(name, "[_] Hotbar size set to " ..hotbar_size.. ".")
|
minetest.chat_send_player(name, "[_] Hotbar size set to " ..hotbar_size.. ".")
|
||||||
player:hud_set_hotbar_image("gui_hb_bg_"..hotbar_size..".png")
|
player:hud_set_hotbar_image(dreambuilder_theme.name.."_gui_hb_bg_"..hotbar_size..".png")
|
||||||
save_hotbar_settings()
|
save_hotbar_settings()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
2
mod.conf
2
mod.conf
@ -1,2 +1,2 @@
|
|||||||
min_minetest_version = 5.2.0
|
min_minetest_version = 5.2.0
|
||||||
optional_depends = default, dreambuilder_gui_theming
|
optional_depends = default, dreambuilder_theme_settings
|
||||||
|
Loading…
Reference in New Issue
Block a user