add setting to toggle spider web littering (thanks Awkanimus)

This commit is contained in:
tenplus1 2022-11-28 08:46:55 +00:00
parent aaa822cc56
commit 573aa57a89
4 changed files with 14 additions and 3 deletions

View File

@ -2,9 +2,11 @@ local path = minetest.get_modpath("nssm")
nssm = { nssm = {
mymapgenis = tonumber(minetest.settings:get("mymapgenis")) or 7, mymapgenis = tonumber(minetest.settings:get("mymapgenis")) or 7,
multimobs = tonumber(minetest.settings:get("multimobs")) or 1000 multimobs = tonumber(minetest.settings:get("multimobs")) or 1000,
spiders_litter_web = minetest.settings:get_bool("spiders_litter_web", true)
} }
-- Mobs -- Mobs
dofile(path .. "/mobs/ant_queen.lua") dofile(path .. "/mobs/ant_queen.lua")
dofile(path .. "/mobs/ant_soldier.lua") dofile(path .. "/mobs/ant_soldier.lua")

View File

@ -53,6 +53,9 @@ mobs:register_mob("nssm:black_widow", {
}, },
do_custom = function(self) do_custom = function(self)
webber_ability(self, "nssm:web", 2)
if nssm.spiders_litter_web then
webber_ability(self, "nssm:web", 2)
end
end end
}) })

View File

@ -53,6 +53,9 @@ mobs:register_mob("nssm:uloboros", {
}, },
do_custom = function(self) do_custom = function(self)
webber_ability(self, "nssm:web", 2)
if nssm.spiders_litter_web then
webber_ability(self, "nssm:web", 2)
end
end end
}) })

View File

@ -13,3 +13,6 @@ multimobs (Multimobs) int 1000
# Difficult-level: # Difficult-level:
# Multiplier to raise life and damage of the mobs # Multiplier to raise life and damage of the mobs
mob_difficulty (Mob_difficulty) int 1 mob_difficulty (Mob_difficulty) int 1
# Spiders
spiders_litter_web (Spiders casually litter web) bool true