Commit c4ef44f1 authored by Milan's avatar Milan
Browse files
parents 85ba0cfd 89fba7a8
Pipeline #172 skipped
...@@ -399,6 +399,7 @@ if minetest.get_modpath("xanadu") then ...@@ -399,6 +399,7 @@ if minetest.get_modpath("xanadu") then
overwrite("xanadu:iced_coffee", 3, "vessels:drinking_glass") overwrite("xanadu:iced_coffee", 3, "vessels:drinking_glass")
overwrite("xanadu:pizza_slice", 3) overwrite("xanadu:pizza_slice", 3)
overwrite("xanadu:cupcake", 4) overwrite("xanadu:cupcake", 4)
overwrite("xanadu:cupcake_chocolate", 4)
overwrite("xanadu:juice_apple", 4, "vessels:drinking_glass") overwrite("xanadu:juice_apple", 4, "vessels:drinking_glass")
overwrite("xanadu:juice_coconut", 4, "vessels:drinking_glass") overwrite("xanadu:juice_coconut", 4, "vessels:drinking_glass")
overwrite("xanadu:juice_orange", 4, "vessels:drinking_glass") overwrite("xanadu:juice_orange", 4, "vessels:drinking_glass")
...@@ -409,7 +410,10 @@ if minetest.get_modpath("xanadu") then ...@@ -409,7 +410,10 @@ if minetest.get_modpath("xanadu") then
overwrite("xanadu:bacon", 4) overwrite("xanadu:bacon", 4)
overwrite("xanadu:burger", 7) overwrite("xanadu:burger", 7)
overwrite("xanadu:fries", 6) overwrite("xanadu:fries", 6)
overwrite("xanadu:glass_wine", 2) overwrite("wine:glass_wine", 2)
overwrite("wine:glass_beer", 2)
overwrite("wine:glass_mead", 2)
overwrite("wine:glass_cider", 2)
overwrite("xanadu:potato_salad", 8, "ethereal:bowl", nil, 2) overwrite("xanadu:potato_salad", 8, "ethereal:bowl", nil, 2)
overwrite("xanadu:gingerbread_man", 2) overwrite("xanadu:gingerbread_man", 2)
overwrite("xanadu:taco", 4) overwrite("xanadu:taco", 4)
...@@ -446,5 +450,5 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext) ...@@ -446,5 +450,5 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
hbhunger.exhaustion[name] = exhaus hbhunger.exhaustion[name] = exhaus
end end
minetest.register_on_placenode(hbhunger.handle_node_actions) --minetest.register_on_placenode(hbhunger.handle_node_actions)
minetest.register_on_dignode(hbhunger.handle_node_actions) minetest.register_on_dignode(hbhunger.handle_node_actions)
...@@ -28,9 +28,9 @@ function hb.load_setting(sname, stype, defaultval, valid_values) ...@@ -28,9 +28,9 @@ function hb.load_setting(sname, stype, defaultval, valid_values)
end end
end end
if not valid then if not valid then
minetest.log("error", "[hudbars] Invalid value for " -- minetest.log("error", "[hudbars] Invalid value for "
..sname.."! Using default value (" -- ..sname.."! Using default value ("
..tostring(defaultval)..").") -- ..tostring(defaultval)..").")
return defaultval return defaultval
else else
return sval return sval
...@@ -294,7 +294,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta ...@@ -294,7 +294,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
local main_error_text = local main_error_text =
"[hudbars] Bad initial values of HUD bar identifier “" "[hudbars] Bad initial values of HUD bar identifier “"
..tostring(identifier).."” for player "..name..". " ..tostring(identifier).."” for player "..name..". "
--[[
if start_max < start_value then if start_max < start_value then
minetest.log("error", main_error_text.."start_max (" minetest.log("error", main_error_text.."start_max ("
..start_max..") is smaller than start_value ("..start_value..")!") ..start_max..") is smaller than start_value ("..start_value..")!")
...@@ -307,7 +307,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta ...@@ -307,7 +307,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
minetest.log("error", main_error_text.."start_value (" minetest.log("error", main_error_text.."start_value ("
..start_value..") is smaller than 0!") ..start_value..") is smaller than 0!")
end end
]]
hb.hudtables[identifier].hudids[name] = ids hb.hudtables[identifier].hudids[name] = ids
hb.hudtables[identifier].hudstate[name] = state hb.hudtables[identifier].hudstate[name] = state
end end
...@@ -348,7 +348,7 @@ end ...@@ -348,7 +348,7 @@ end
-- ADDED THIS TOO -- ADDED THIS TOO
if not hudtable.hudstate[name] then if not hudtable.hudstate[name] then
print ("line 350 hudtabke.hudstate[name] nil") print ("Warning: [hudbars init.lua] line 350 hudtable.hudstate[" .. name .. "] is nil")
return return
end end
...@@ -372,6 +372,7 @@ end ...@@ -372,6 +372,7 @@ end
local main_error_text = local main_error_text =
"[hudbars] Bad call to hb.change_hudbar, identifier: “" "[hudbars] Bad call to hb.change_hudbar, identifier: “"
..tostring(identifier).."”, player name: “"..name.."”. " ..tostring(identifier).."”, player name: “"..name.."”. "
--[[
if new_max_value < new_value then if new_max_value < new_value then
minetest.log("error", main_error_text.."new_max_value (" minetest.log("error", main_error_text.."new_max_value ("
..new_max_value..") is smaller than new_value ("..new_value..")!") ..new_max_value..") is smaller than new_value ("..new_value..")!")
...@@ -384,7 +385,7 @@ end ...@@ -384,7 +385,7 @@ end
minetest.log("error", main_error_text.."new_value (" minetest.log("error", main_error_text.."new_value ("
..new_value..") is smaller than 0!") ..new_value..") is smaller than 0!")
end end
]]
if hudtable.hudstate[name].hidden == false then if hudtable.hudstate[name].hidden == false then
if max_changed and hb.settings.bar_type == "progress_bar" then if max_changed and hb.settings.bar_type == "progress_bar" then
if hudtable.hudstate[name].max == 0 then if hudtable.hudstate[name].max == 0 then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment