summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-12-30 16:41:20 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-12-30 16:41:20 +0000
commite5baaa5e130a0b74f75c9f191d8d4dbf82c551e8 (patch)
treece1f73261ab061bedbafe7b18fa1083474e471db /api.lua
parenta0d975510ed93ddc822b991c7c7011d675b098e7 (diff)
added mob_spawn_amend settings for minetest.conf
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/api.lua b/api.lua
index 25d5d37..1c1f310 100644
--- a/api.lua
+++ b/api.lua
@@ -3,7 +3,7 @@
mobs = {}
mobs.mod = "redo"
-mobs.version = "20171222"
+mobs.version = "20171230"
-- Intllib
@@ -61,6 +61,7 @@ local remove_far = minetest.settings:get_bool("remove_far_mobs")
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
local show_health = minetest.settings:get_bool("mob_show_health") ~= false
local max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 99)
+local mob_spawn_amend = tonumber(minetest.settings:get("mob_spawn_amend") or 1)
-- Peaceful mode message so players will know there are no monsters
if peaceful_only then
@@ -2834,7 +2835,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
nodenames = nodes,
neighbors = neighbors,
interval = interval,
- chance = chance,
+ chance = (chance * mob_spawn_amend),
catch_up = false,
action = function(pos, node, active_object_count, active_object_count_wider)