From 860d0b38fd1d1d015aa4e28958c92301f3d88e1c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 4 Feb 2015 01:24:27 +0100 Subject: [PATCH] Remove armor and hunger --- armor.lua | 34 ---- hunger.lua | 361 ------------------------------------- init.lua | 189 +------------------ textures/hud_armor_bg.png | Bin 424 -> 0 bytes textures/hud_armor_fg.png | Bin 3167 -> 0 bytes textures/hud_hunger_bg.png | Bin 417 -> 0 bytes textures/hud_hunger_fg.png | Bin 522 -> 0 bytes 7 files changed, 3 insertions(+), 581 deletions(-) delete mode 100644 armor.lua delete mode 100644 hunger.lua delete mode 100644 textures/hud_armor_bg.png delete mode 100644 textures/hud_armor_fg.png delete mode 100644 textures/hud_hunger_bg.png delete mode 100644 textures/hud_hunger_fg.png diff --git a/armor.lua b/armor.lua deleted file mode 100644 index 7f0d0cf..0000000 --- a/armor.lua +++ /dev/null @@ -1,34 +0,0 @@ -minetest.after(0, function() - if not armor.def then - minetest.after(2,minetest.chat_send_all,"#Better HUD: Please update your version of 3darmor") - HUD_SHOW_ARMOR = false - end -end) - -function hud.get_armor(player) - if not player or not armor.def then - return - end - local name = player:get_player_name() - local def = armor.def[name] or nil - if def and def.state and def.count then - hud.set_armor(name, def.state, def.count) - end -end - -function hud.set_armor(player_name, ges_state, items) - local max_items = 4 - if items == 5 then - max_items = items - end - local max = max_items * 65535 - local lvl = max - ges_state - lvl = lvl/max - if ges_state == 0 and items == 0 then - lvl = 0 - end - - hud.armor[player_name] = lvl* (items * (20 / max_items)) - - -end \ No newline at end of file diff --git a/hunger.lua b/hunger.lua deleted file mode 100644 index 8c4e787..0000000 --- a/hunger.lua +++ /dev/null @@ -1,361 +0,0 @@ --- Keep these for backwards compatibility -function hud.save_hunger(player) - hud.set_hunger(player) -end -function hud.load_hunger(player) - hud.get_hunger(player) -end - --- Poison player -local function poisenp(tick, time, time_left, player) - time_left = time_left + tick - if time_left < time then - minetest.after(tick, poisenp, tick, time, time_left, player) - else - --reset hud image - end - if player:get_hp()-1 > 0 then - player:set_hp(player:get_hp()-1) - end - -end - -function hud.item_eat(hunger_change, replace_with_item, poisen, heal) - return function(itemstack, user, pointed_thing) - if itemstack:take_item() ~= nil and user ~= nil then - local name = user:get_player_name() - local h = tonumber(hud.hunger[name]) - local hp = user:get_hp() - - -- Saturation - if h < 30 and hunger_change then - h = h + hunger_change - if h > 30 then h = 30 end - hud.hunger[name] = h - hud.set_hunger(user) - end - -- Healing - if hp < 20 and heal then - hp = hp + heal - if hp > 20 then hp = 20 end - user:set_hp(hp) - end - -- Poison - if poisen then - --set hud-img - poisenp(1.0, poisen, 0, user) - end - - --sound:eat - itemstack:add_item(replace_with_item) - end - return itemstack - end -end - -local function overwrite(name, hunger_change, replace_with_item, poisen, heal) - local tab = minetest.registered_items[name] - if tab == nil then return end - tab.on_use = hud.item_eat(hunger_change, replace_with_item, poisen, heal) - minetest.registered_items[name] = tab -end - -overwrite("default:apple", 2) -if minetest.get_modpath("farming") ~= nil then - overwrite("farming:bread", 4) -end - -if minetest.get_modpath("mobs") ~= nil then - overwrite("mobs:meat", 6) - overwrite("mobs:meat_raw", 3) - overwrite("mobs:rat_cooked", 5) -end - -if minetest.get_modpath("moretrees") ~= nil then - overwrite("moretrees:coconut_milk", 1) - overwrite("moretrees:raw_coconut", 2) - overwrite("moretrees:acorn_muffin", 3) - overwrite("moretrees:spruce_nuts", 1) - overwrite("moretrees:pine_nuts", 1) - overwrite("moretrees:fir_nuts", 1) -end - -if minetest.get_modpath("dwarves") ~= nil then - overwrite("dwarves:beer", 2) - overwrite("dwarves:apple_cider", 1) - overwrite("dwarves:midus", 2) - overwrite("dwarves:tequila", 2) - overwrite("dwarves:tequila_with_lime", 2) - overwrite("dwarves:sake", 2) -end - -if minetest.get_modpath("animalmaterials") ~= nil then - overwrite("animalmaterials:milk", 2) - overwrite("animalmaterials:meat_raw", 3) - overwrite("animalmaterials:meat_pork", 3) - overwrite("animalmaterials:meat_beef", 3) - overwrite("animalmaterials:meat_chicken", 3) - overwrite("animalmaterials:meat_lamb", 3) - overwrite("animalmaterials:meat_venison", 3) - overwrite("animalmaterials:meat_undead", 3, "", 3) - overwrite("animalmaterials:meat_toxic", 3, "", 5) - overwrite("animalmaterials:meat_ostrich", 3) - overwrite("animalmaterials:fish_bluewhite", 2) - overwrite("animalmaterials:fish_clownfish", 2) -end - -if minetest.get_modpath("fishing") ~= nil then - overwrite("fishing:fish_raw", 2) - overwrite("fishing:fish_cooked", 5) - overwrite("fishing:sushi", 6) - overwrite("fishing:shark", 4) - overwrite("fishing:shark_cooked", 8) - overwrite("fishing:pike", 4) - overwrite("fishing:pike_cooked", 8) -end - -if minetest.get_modpath("glooptest") ~= nil then - overwrite("glooptest:kalite_lump", 1) -end - -if minetest.get_modpath("bushes") ~= nil then - overwrite("bushes:sugar", 1) - overwrite("bushes:strawberry", 2) - overwrite("bushes:berry_pie_raw", 3) - overwrite("bushes:berry_pie_cooked", 4) - overwrite("bushes:basket_pies", 15) -end - -if minetest.get_modpath("bushes_classic") then - -- bushes_classic mod, as found in the plantlife modpack - local berries = { - "strawberry", - "blackberry", - "blueberry", - "raspberry", - "gooseberry", - "mixed_berry"} - for _, berry in ipairs(berries) do - if berry ~= "mixed_berry" then - overwrite("bushes:"..berry, 1) - end - overwrite("bushes:"..berry.."_pie_raw", 2) - overwrite("bushes:"..berry.."_pie_cooked", 5) - overwrite("bushes:basket_"..berry, 15) - end -end - -if minetest.get_modpath("mushroom") ~= nil then - overwrite("mushroom:brown", 1) - overwrite("mushroom:red", 1, "", 3) -end - -if minetest.get_modpath("docfarming") ~= nil then - overwrite("docfarming:carrot", 3) - overwrite("docfarming:cucumber", 2) - overwrite("docfarming:corn", 3) - overwrite("docfarming:potato", 4) - overwrite("docfarming:bakedpotato", 5) - overwrite("docfarming:raspberry", 3) -end - -if minetest.get_modpath("farming_plus") ~= nil then - overwrite("farming_plus:carrot_item", 3) - overwrite("farming_plus:banana", 2) - overwrite("farming_plus:orange_item", 2) - overwrite("farming:pumpkin_bread", 4) - overwrite("farming_plus:strawberry_item", 2) - overwrite("farming_plus:tomato_item", 2) - overwrite("farming_plus:potato_item", 4) - overwrite("farming_plus:rhubarb_item", 2) -end - -if minetest.get_modpath("mtfoods") ~= nil then - overwrite("mtfoods:dandelion_milk", 1) - overwrite("mtfoods:sugar", 1) - overwrite("mtfoods:short_bread", 4) - overwrite("mtfoods:cream", 1) - overwrite("mtfoods:chocolate", 2) - overwrite("mtfoods:cupcake", 2) - overwrite("mtfoods:strawberry_shortcake", 2) - overwrite("mtfoods:cake", 3) - overwrite("mtfoods:chocolate_cake", 3) - overwrite("mtfoods:carrot_cake", 3) - overwrite("mtfoods:pie_crust", 3) - overwrite("mtfoods:apple_pie", 3) - overwrite("mtfoods:rhubarb_pie", 2) - overwrite("mtfoods:banana_pie", 3) - overwrite("mtfoods:pumpkin_pie", 3) - overwrite("mtfoods:cookies", 2) - overwrite("mtfoods:mlt_burger", 5) - overwrite("mtfoods:potato_slices", 2) - overwrite("mtfoods:potato_chips", 3) - --mtfoods:medicine - overwrite("mtfoods:casserole", 3) - overwrite("mtfoods:glass_flute", 2) - overwrite("mtfoods:orange_juice", 2) - overwrite("mtfoods:apple_juice", 2) - overwrite("mtfoods:apple_cider", 2) - overwrite("mtfoods:cider_rack", 2) -end - -if minetest.get_modpath("fruit") ~= nil then - overwrite("fruit:apple", 2) - overwrite("fruit:pear", 2) - overwrite("fruit:bananna", 3) - overwrite("fruit:orange", 2) -end - -if minetest.get_modpath("mush45") ~= nil then - overwrite("mush45:meal", 4) -end - -if minetest.get_modpath("seaplants") ~= nil then - overwrite("seaplants:kelpgreen", 1) - overwrite("seaplants:kelpbrown", 1) - overwrite("seaplants:seagrassgreen", 1) - overwrite("seaplants:seagrassred", 1) - overwrite("seaplants:seasaladmix", 6) - overwrite("seaplants:kelpgreensalad", 1) - overwrite("seaplants:kelpbrownsalad", 1) - overwrite("seaplants:seagrassgreensalad", 1) - overwrite("seaplants:seagrassgreensalad", 1) -end - -if minetest.get_modpath("mobfcooking") ~= nil then - overwrite("mobfcooking:cooked_pork", 6) - overwrite("mobfcooking:cooked_ostrich", 6) - overwrite("mobfcooking:cooked_beef", 6) - overwrite("mobfcooking:cooked_chicken", 6) - overwrite("mobfcooking:cooked_lamb", 6) - overwrite("mobfcooking:cooked_venison", 6) - overwrite("mobfcooking:cooked_fish", 6) -end - -if minetest.get_modpath("creatures") ~= nil then - overwrite("creatures:meat", 6) - overwrite("creatures:flesh", 3) - overwrite("creatures:rotten_flesh", 3, "", 3) -end - -if minetest.get_modpath("ethereal") then - overwrite("ethereal:strawberry", 1) - overwrite("ethereal:banana", 4) - overwrite("ethereal:pine_nuts", 1) - overwrite("ethereal:bamboo_sprout", 0, "", 3) - overwrite("ethereal:fern_tubers", 1) - overwrite("ethereal:banana_bread", 7) - overwrite("ethereal:mushroom_plant", 2) - overwrite("ethereal:coconut_slice", 2) - overwrite("ethereal:golden_apple", 4, "", nil, 10) - overwrite("ethereal:wild_onion_plant", 2) - overwrite("ethereal:mushroom_soup", 4, "ethereal:bowl") - overwrite("ethereal:mushroom_soup_cooked", 6, "ethereal:bowl") - overwrite("ethereal:hearty_stew", 6, "ethereal:bowl", 3) - overwrite("ethereal:hearty_stew_cooked", 10, "ethereal:bowl") - if minetest.get_modpath("bucket") then - overwrite("ethereal:bucket_cactus", 2, "bucket:bucket_empty") - end - overwrite("ethereal:fish_raw", 2) - overwrite("ethereal:fish_cooked", 5) - overwrite("ethereal:seaweed", 1) - overwrite("ethereal:yellowleaves", 1, "", nil, 1) - overwrite("ethereal:sashimi", 4) -end - -if minetest.get_modpath("farming") and farming.mod == "redo" then - overwrite("farming:bread", 6) - overwrite("farming:potato", 1) - overwrite("farming:baked_potato", 6) - overwrite("farming:cucumber", 4) - overwrite("farming:tomato", 4) - overwrite("farming:carrot", 3) - overwrite("farming:carrot_gold", 6, "", nil, 8) - overwrite("farming:corn", 3) - overwrite("farming:corn_cob", 5) - overwrite("farming:melon_slice", 2) - overwrite("farming:pumpkin_slice", 1) - overwrite("farming:pumpkin_bread", 9) - overwrite("farming:coffee_cup", 2, "farming:drinking_cup") - overwrite("farming:coffee_cup_hot", 3, "farming:drinking_cup", nil, 2) - overwrite("farming:cookie", 2) - overwrite("farming:chocolate_dark", 3) - overwrite("farming:donut", 4) - overwrite("farming:donut_chocolate", 6) - overwrite("farming:donut_apple", 6) - overwrite("farming:raspberries", 1) - if minetest.get_modpath("vessels") then - overwrite("farming:smoothie_raspberry", 2, "vessels:drinking_glass") - end - overwrite("farming:rhubarb", 1) - overwrite("farming:rhubarb_pie", 6) -end - -if minetest.get_modpath("kpgmobs") ~= nil then - overwrite("kpgmobs:uley", 3) - overwrite("kpgmobs:meat", 6) - overwrite("kpgmobs:rat_cooked", 5) - overwrite("kpgmobs:med_cooked", 4) - if minetest.get_modpath("bucket") then - overwrite("kpgmobs:bucket_milk", 4, "bucket:bucket_empty") - end -end - -if minetest.get_modpath("jkfarming") ~= nil then - overwrite("jkfarming:carrot", 3) - overwrite("jkfarming:corn", 3) - overwrite("jkfarming:melon_part", 2) - overwrite("jkfarming:cake", 3) -end - -if minetest.get_modpath("jkanimals") ~= nil then - overwrite("jkanimals:meat", 6) -end - -if minetest.get_modpath("jkwine") ~= nil then - overwrite("jkwine:grapes", 2) - overwrite("jkwine:winebottle", 1) -end - -if minetest.get_modpath("cooking") ~= nil then - overwrite("cooking:meat_beef_cooked", 4) - overwrite("cooking:fish_bluewhite_cooked", 3) - overwrite("cooking:fish_clownfish_cooked", 1) - overwrite("cooking:meat_chicken_cooked", 2) - overwrite("cooking:meat_cooked", 2) - overwrite("cooking:meat_pork_cooked", 3) - overwrite("cooking:meat_toxic_cooked", -3) - overwrite("cooking:meat_venison_cooked", 3) - overwrite("cooking:meat_undead_cooked", 1) -end - --- player-action based hunger changes -function hud.handle_node_actions(pos, oldnode, player, ext) - if not player or not player:is_player() then - return - end - local name = player:get_player_name() - local exhaus = hud.exhaustion[name] - local new = HUD_HUNGER_EXHAUST_PLACE - -- placenode event - if not ext then - new = HUD_HUNGER_EXHAUST_DIG - end - -- assume its send by main timer when movement detected - if not pos and not oldnode then - new = HUD_HUNGER_EXHAUST_MOVE - end - exhaus = exhaus + new - if exhaus > HUD_HUNGER_EXHAUST_LVL then - exhaus = 0 - local h = tonumber(hud.hunger[name]) - h = h - 1 - if h < 0 then h = 0 end - hud.hunger[name] = h - hud.set_hunger(player) - end - hud.exhaustion[name] = exhaus -end - -minetest.register_on_placenode(hud.handle_node_actions) -minetest.register_on_dignode(hud.handle_node_actions) diff --git a/init.lua b/init.lua index 09c307f..e91f1fb 100644 --- a/init.lua +++ b/init.lua @@ -2,18 +2,11 @@ hud = {} -- HUD statbar values hud.health = {} -hud.hunger = {} hud.air = {} -hud.armor = {} -hud.hunger_out = {} -hud.armor_out = {} -- HUD item ids local health_hud = {} -local hunger_hud = {} local air_hud = {} -local armor_hud = {} -local armor_hud_bg = {} -- default settings @@ -23,12 +16,8 @@ HUD_SIZE = "" -- statbar positions HUD_HEALTH_POS = {x=0.5,y=0.9} HUD_HEALTH_OFFSET = {x=-175, y=2} -HUD_HUNGER_POS = {x=0.5,y=0.9} -HUD_HUNGER_OFFSET = {x=15, y=2} HUD_AIR_POS = {x=0.5,y=0.9} -HUD_AIR_OFFSET = {x=15,y=-15} -HUD_ARMOR_POS = {x=0.5,y=0.9} -HUD_ARMOR_OFFSET = {x=-175, y=-15} +HUD_AIR_OFFSET = {x=15,y=2} -- dirty way to check for new statbars if dump(minetest.hud_replace_builtin) ~= "nil" then @@ -36,46 +25,19 @@ if dump(minetest.hud_replace_builtin) ~= "nil" then HUD_SIZE = {x=24, y=24} HUD_HEALTH_POS = {x=0.5,y=1} HUD_HEALTH_OFFSET = {x=-262, y=-87} - HUD_HUNGER_POS = {x=0.5,y=1} - HUD_HUNGER_OFFSET = {x=15, y=-87} HUD_AIR_POS = {x=0.5,y=1} - HUD_AIR_OFFSET = {x=15,y=-110} - HUD_ARMOR_POS = {x=0.5,y=1} - HUD_ARMOR_OFFSET = {x=-262, y=-110} + HUD_AIR_OFFSET = {x=15,y=-87} end HUD_TICK = 0.1 ---Some hunger settings -hud.exhaustion = {} -- Exhaustion is experimental! -HUD_HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken -HUD_HUNGER_EXHAUST_DIG = 3 -- exhaustion increased this value after digged node -HUD_HUNGER_EXHAUST_PLACE = 1 -- exhaustion increased this value after placed -HUD_HUNGER_EXHAUST_MOVE = 0.3 -- exhaustion increased this value if player movement detected -HUD_HUNGER_EXHAUST_LVL = 160 -- at what exhaustion player saturation gets lowerd - - - -HUD_ENABLE_HUNGER = minetest.setting_getbool("hud_hunger_enable") -if HUD_ENABLE_HUNGER == nil then - HUD_ENABLE_HUNGER = minetest.setting_getbool("enable_damage") -end - -HUD_SHOW_ARMOR = false -if minetest.get_modpath("3d_armor") ~= nil then - HUD_SHOW_ARMOR = true -end --load custom settings local set = io.open(minetest.get_modpath("hudbars").."/hud.conf", "r") if set then dofile(minetest.get_modpath("hudbars").."/hud.conf") set:close() -else - if not HUD_ENABLE_HUNGER then - HUD_AIR_OFFSET = HUD_HUNGER_OFFSET - end end local function hide_builtin(player) @@ -93,29 +55,6 @@ local function custom_hud(player) end if minetest.setting_getbool("enable_damage") then - --hunger - if HUD_ENABLE_HUNGER then - player:hud_add({ - hud_elem_type = "statbar", - position = HUD_HUNGER_POS, - size = HUD_SIZE, - text = "hud_hunger_bg.png", - number = 20, - alignment = {x=-1,y=-1}, - offset = HUD_HUNGER_OFFSET, - }) - local h = hud.hunger[name] - if h == nil or h > 20 then h = 20 end - hunger_hud[name] = player:hud_add({ - hud_elem_type = "statbar", - position = HUD_HUNGER_POS, - size = HUD_SIZE, - text = "hud_hunger_fg.png", - number = h, - alignment = {x=-1,y=-1}, - offset = HUD_HUNGER_OFFSET, - }) - end --health player:hud_add({ hud_elem_type = "statbar", @@ -147,37 +86,9 @@ local function custom_hud(player) offset = HUD_AIR_OFFSET, }) - --armor - if HUD_SHOW_ARMOR then - armor_hud_bg[name] = player:hud_add({ - hud_elem_type = "statbar", - position = HUD_ARMOR_POS, - size = HUD_SIZE, - text = "hud_armor_bg.png", - number = 0, - alignment = {x=-1,y=-1}, - offset = HUD_ARMOR_OFFSET, - }) - armor_hud[name] = player:hud_add({ - hud_elem_type = "statbar", - position = HUD_ARMOR_POS, - size = HUD_SIZE, - text = "hud_armor_fg.png", - number = 0, - alignment = {x=-1,y=-1}, - offset = HUD_ARMOR_OFFSET, - }) - end end end ---needs to be defined for older version of 3darmor -function hud.set_armor() -end - - -if HUD_ENABLE_HUNGER then dofile(minetest.get_modpath("hudbars").."/hunger.lua") end -if HUD_SHOW_ARMOR then dofile(minetest.get_modpath("hudbars").."/armor.lua") end -- update hud elemtens if value has changed local function update_hud(player) @@ -197,89 +108,23 @@ local function update_hud(player) hud.health[name] = hp player:hud_change(health_hud[name], "number", hp) end - --armor - local arm_out = tonumber(hud.armor_out[name]) - if not arm_out then arm_out = 0 end - local arm = tonumber(hud.armor[name]) - if not arm then arm = 0 end - if arm_out ~= arm then - hud.armor_out[name] = arm - player:hud_change(armor_hud[name], "number", arm) - -- hide armor bar completely when there is none - if (not armor.def[name].count or armor.def[name].count == 0) and arm == 0 then - player:hud_change(armor_hud_bg[name], "number", 0) - else - player:hud_change(armor_hud_bg[name], "number", 20) - end - end - --hunger - local h_out = tonumber(hud.hunger_out[name]) - local h = tonumber(hud.hunger[name]) - if h_out ~= h then - hud.hunger_out[name] = h - -- bar should not have more than 10 icons - if h>20 then h=20 end - player:hud_change(hunger_hud[name], "number", h) - end -end - -hud.get_hunger = function(player) - local inv = player:get_inventory() - if not inv then return nil end - local hgp = inv:get_stack("hunger", 1):get_count() - if hgp == 0 then - hgp = 21 - inv:set_stack("hunger", 1, ItemStack({name=":", count=hgp})) - else - hgp = hgp - end - return hgp-1 -end - -hud.set_hunger = function(player) - local inv = player:get_inventory() - local name = player:get_player_name() - local value = hud.hunger[name] - if not inv or not value then return nil end - if value > 30 then value = 30 end - if value < 0 then value = 0 end - - inv:set_stack("hunger", 1, ItemStack({name=":", count=value+1})) - - return true end minetest.register_on_joinplayer(function(player) local name = player:get_player_name() local inv = player:get_inventory() - inv:set_size("hunger",1) hud.health[name] = player:get_hp() - if HUD_ENABLE_HUNGER then - hud.hunger[name] = hud.get_hunger(player) - hud.hunger_out[name] = hud.hunger[name] - hud.exhaustion[name] = 0 - end - hud.armor[name] = 0 - hud.armor_out[name] = 0 local air = player:get_breath() hud.air[name] = air minetest.after(0.5, function() hide_builtin(player) custom_hud(player) - if HUD_ENABLE_HUNGER then hud.set_hunger(player) end end) end) minetest.register_on_respawnplayer(function(player) -- reset player breath since the engine doesnt player:set_breath(11) - -- reset hunger (and save) - local name = player:get_player_name() - hud.hunger[name] = 20 - if HUD_ENABLE_HUNGER then - minetest.after(0.5, hud.set_hunger, player) - hud.exhaustion[name] = 0 - end end) local main_timer = 0 @@ -290,50 +135,22 @@ minetest.after(2.5, function() main_timer = main_timer + dtime timer = timer + dtime timer2 = timer2 + dtime - if main_timer > HUD_TICK or timer > 4 or timer2 > HUD_HUNGER_TICK then + if main_timer > HUD_TICK or timer > 4 then if main_timer > HUD_TICK then main_timer = 0 end for _,player in ipairs(minetest.get_connected_players()) do local name = player:get_player_name() -- only proceed if damage is enabled if minetest.setting_getbool("enable_damage") then - local h = tonumber(hud.hunger[name]) local hp = player:get_hp() - if HUD_ENABLE_HUNGER and timer > 4 then - -- heal player by 1 hp if not dead and saturation is > 15 (of 30) - if h > 15 and hp > 0 and hud.air[name] > 0 then - player:set_hp(hp+1) - -- or damage player by 1 hp if saturation is < 2 (of 30) - elseif h <= 1 and minetest.setting_getbool("enable_damage") then - if hp-1 >= 0 then player:set_hp(hp-1) end - end - end - -- lower saturation by 1 point after xx seconds - if HUD_ENABLE_HUNGER and timer2 > HUD_HUNGER_TICK then - if h > 0 then - h = h-1 - hud.hunger[name] = h - hud.set_hunger(player) - end - end - -- update current armor level - if HUD_SHOW_ARMOR then hud.get_armor(player) end -- update all hud elements update_hud(player) - if HUD_ENABLE_HUNGER then - local controls = player:get_player_control() - -- Determine if the player is walking - if controls.up or controls.down or controls.left or controls.right then - hud.handle_node_actions(nil, nil, player) - end - end end end end if timer > 4 then timer = 0 end - if timer2 > HUD_HUNGER_TICK then timer2 = 0 end end) end) diff --git a/textures/hud_armor_bg.png b/textures/hud_armor_bg.png deleted file mode 100644 index 32401003a8f42a81bb123e03be086fdda348c159..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 424 zcmV;Z0ayNsP)paFLO0b(HqY%<_pLI`0NQ0n~k zCHwvUp@bUP7-M9bCb?WL_ux5z8-{!bui60Cy4YpNUw{yTSZhV!Nt3&<(k!~%@8?sq z#&Im)!CJj6bKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN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&Wov!Ce`d<6U`HGiA|00000 LNkvXXu0mjf5NEV} diff --git a/textures/hud_hunger_fg.png b/textures/hud_hunger_fg.png deleted file mode 100644 index a5cc2a12339c1fcba9e605fb5cae51aabcefb60c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 522 zcmV+l0`>igP)pGyh%hsRCt`NlfP?IVHAd+ivNL21xFVL|C0n#xP+i^QAlWqIyfi| zNJ(|Dv}V%5Hsp#oVkM*!2m~Z0v~q__BmSVxu^J9O+YXXFK0RD zIWOP$9wae|CK~=f0DpR6MD-+cW1&hnQ0XQr+Wh>pZvIwADLRAaxBv4?74{TPENeux5e{O2973m*1$T%o?iuPB~-Xhx1 zqUJJcrcv`2GHc-ylSjtk_{=X1%2(7bphE|J$)kh(urY^PIn>IBGQ&kc_nDm%_0}w4oO^A8-asU7T M07*qoM6N<$g3~bI