From eda954a04bedf682d76271b956a6cefaa40bcb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B5=D1=80=D1=85=D0=B0=D1=80=D0=B4=20PICCORO=20Len?= =?UTF-8?q?z=20McKAY?= Date: Tue, 25 Jan 2022 10:47:22 -0400 Subject: [PATCH] fix configurable nyancat horrible flying pig with namespaced change * complete the commit from e114cb543fc0e32f848d615c407764167abda833 * finish the backported confifurable nyancat the horrible flying pig * backported from https://notabug.org/TenPlus1/dmobs/commit/74fc8110c14c1e68f78f9e26e6f1f0bf0e82fc02 * closed https://codeberg.org/minenux/minetest-mod-mobs_doomed/issues/8 --- init.lua | 6 +++--- settingtypes.txt | 2 +- spawn.lua | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 17e15ba..437dd57 100644 --- a/init.lua +++ b/init.lua @@ -16,8 +16,8 @@ if mobs_doomed.regulars == nil then mobs_doomed.regulars = true end --- Enable NyanCat -dmobs.allow_nyanc = minetest.settings:get_bool("dmobs.allow_nyanc") or false +-- Enabling of NyanCat +mobs_doomed.allow_nyanc = minetest.settings:get_bool("mobs_doomed.allow_nyanc") or false -- Enable fireballs/explosions mobs_doomed.destructive = minetest.settings:get_bool("mobs_doomed.destructive") or false @@ -81,7 +81,7 @@ local mobslist = { if mobs_doomed.regulars then for _,mobname in pairs(mobslist) do - if mobslist == "nyan" and dmobs.allow_nyanc then + if mobslist == "nyan" and mobs_doomed.allow_nyanc then loadmob("nyan") else loadmob(mobname) diff --git a/settingtypes.txt b/settingtypes.txt index 3f215a6..6fac60a 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -10,6 +10,6 @@ mobs_doomed.destructive (Fire balls will be destructive) bool false # If disabled only a common dragon will be spawned mobs_doomed.dragons (Enable all the dragons not only common) bool true -# if enabled will load a mobs very ugply and stupid.. nyancat.. a pig that fly and leve arciris +# if enabled will load a mobs very ugly and stupid.. nyancat.. a pig that fly and leve arciris mobs_doomeds.allow_nyanc (Enable the stupid nyanCat mob fliying pig) bool false diff --git a/spawn.lua b/spawn.lua index de6e08e..9e16633 100644 --- a/spawn.lua +++ b/spawn.lua @@ -26,10 +26,12 @@ if mobs_doomed.regulars then -- friendlies -- nodes = {"darkage:marble"} -- neighbor = {"darkage:slate"} - mobs:spawn({name = "mobs_doomed:nyan", nodes = {"air"}, neighbor = {"group:leaves"}, - min_light = 10, max_light = 15, interval = 300, chance = 64000, active_object_count = 2, min_height = 0, max_height = 2000}) - mobs:spawn({name = "mobs_doomed:nyan", nodes = {"air"}, neighbor = {"ethereal:mushroom", "nyanland:meseleaves"}, - min_light = 10, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 2000}) + if mobs_doomed.allow_nyanc then + mobs:spawn({name = "mobs_doomed:nyan", nodes = {"air"}, neighbor = {"group:leaves"}, + min_light = 10, max_light = 15, interval = 300, chance = 64000, active_object_count = 2, min_height = 0, max_height = 2000}) + mobs:spawn({name = "mobs_doomed:nyan", nodes = {"air"}, neighbor = {"ethereal:mushroom", "nyanland:meseleaves"}, + min_light = 10, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 2000}) + end mobs:spawn({name = "mobs_doomed:hedgehog", nodes = {"group:flora", "ethereal:prairie_dirt"}, neighbor = {}, min_light = 0, max_light = 8, interval = 300, chance = 8000, active_object_count = 3, min_height = 0, max_height = 2000}) mobs:spawn({name = "mobs_doomed:whale", nodes = {"default:water_source"}, neighbor = {"group:sand"},