From 6d66c11a289d728cdaf25e4fbf7b2a46f58015f4 Mon Sep 17 00:00:00 2001 From: Paramat Date: Tue, 1 Aug 2017 14:53:10 +0100 Subject: [PATCH] Various fixes for 'stairs' and 'hud' mods (#91) Fix undeclared global variables in 'stairs' and 'hud' mods. Stairs mod: Add to 'depends.txt' to enable cheeseblock and wool slabs/stairs. Improve detection of mobs mods. Remove 'mobs:honey_block' slabs/stairs as the node does not exist. --- games/default/files/hud/builtin.lua | 1 + games/default/files/stairs/depends.txt | 3 +++ games/default/files/stairs/init.lua | 10 ++-------- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/games/default/files/hud/builtin.lua b/games/default/files/hud/builtin.lua index 95f9f646d..499a8f84a 100644 --- a/games/default/files/hud/builtin.lua +++ b/games/default/files/hud/builtin.lua @@ -1,3 +1,4 @@ +HUD_ENABLE_HUNGER = nil -- MC add line ************************************************** HUD_IW_MAX = 8 HUD_IW_TICK = 0.4 diff --git a/games/default/files/stairs/depends.txt b/games/default/files/stairs/depends.txt index 4ad96d515..ffc3fc084 100644 --- a/games/default/files/stairs/depends.txt +++ b/games/default/files/stairs/depends.txt @@ -1 +1,4 @@ default +mobs +mobs_animal +wool diff --git a/games/default/files/stairs/init.lua b/games/default/files/stairs/init.lua index 8ed4388cb..8b18884a0 100644 --- a/games/default/files/stairs/init.lua +++ b/games/default/files/stairs/init.lua @@ -285,7 +285,7 @@ end --= Mobs Mod -if mobs and mobs.mod and mobs.mod == "redo" then +if minetest.get_modpath("mobs") and minetest.get_modpath("mobs_animal") then grp = {crumbly = 3, flammable = 2, not_in_craft_guide = 1} @@ -295,12 +295,6 @@ stairs.register_all("cheeseblock", "mobs:cheeseblock", "Cheese Block", stairs.dirt) -stairs.register_all("honey_block", "mobs:honey_block", - grp, - {"mobs_honey_block.png"}, - "Honey Block", - stairs.dirt) - end --= Lapis Mod @@ -805,4 +799,4 @@ stairs.register_all("wool_dark_green", "wool:dark_green", "Dark Green Wool", stairs.wool) -end \ No newline at end of file +end