mirror of
git://repo.or.cz/minetest_hbhunger.git
synced 2024-12-23 08:20:20 +01:00
Change short mod name to “hbhunger”
This commit is contained in:
parent
fbdadb09e2
commit
a72cc4d1a7
@ -1,5 +1,5 @@
|
|||||||
Minetest mod: Hunger
|
Minetest mod: Hunger [hbhunger]
|
||||||
====================
|
===============================
|
||||||
Version: 0.1.0
|
Version: 0.1.0
|
||||||
|
|
||||||
License of source code: WTFPL
|
License of source code: WTFPL
|
||||||
|
8
init.lua
8
init.lua
@ -22,9 +22,9 @@ HUNGER_EXHAUST_LVL = 160 -- at what exhaustion player saturation gets lowerd
|
|||||||
|
|
||||||
|
|
||||||
--load custom settings
|
--load custom settings
|
||||||
local set = io.open(minetest.get_modpath("hunger").."/hunger.conf", "r")
|
local set = io.open(minetest.get_modpath("hbhunger").."/hbhunger.conf", "r")
|
||||||
if set then
|
if set then
|
||||||
dofile(minetest.get_modpath("hunger").."/hunger.conf")
|
dofile(minetest.get_modpath("hbhunger").."/hbhunger.conf")
|
||||||
set:close()
|
set:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -32,10 +32,10 @@ local function custom_hud(player)
|
|||||||
hb.init_hudbar(player, "saturation", hunger.get_hunger(player))
|
hb.init_hudbar(player, "saturation", hunger.get_hunger(player))
|
||||||
end
|
end
|
||||||
|
|
||||||
dofile(minetest.get_modpath("hunger").."/hunger.lua")
|
dofile(minetest.get_modpath("hbhunger").."/hunger.lua")
|
||||||
|
|
||||||
-- register saturation hudbar
|
-- register saturation hudbar
|
||||||
hb.register_hudbar("saturation", 0xFFFFFF, "Saturation", { icon = "hunger_icon.png", bar = "hunger_bar.png" }, 20, 30, false)
|
hb.register_hudbar("saturation", 0xFFFFFF, "Saturation", { icon = "hbhunger_icon.png", bar = "hbhunger_bar.png" }, 20, 30, false)
|
||||||
|
|
||||||
-- update hud elemtens if value has changed
|
-- update hud elemtens if value has changed
|
||||||
local function update_hud(player)
|
local function update_hud(player)
|
||||||
|
Before Width: | Height: | Size: 80 B After Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 522 B |
Loading…
Reference in New Issue
Block a user