summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-08-04 08:53:54 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-08-04 08:53:54 +0100
commitb95ca521ed5898b08f9fc2219fbe1df9e7f592f8 (patch)
tree1c0a434449ccf6efeb38a77808af95fef3edd1e2
parentd31010216ad2e707b811ebcb95bfe184190441b8 (diff)
show message when peaceful mode active
-rw-r--r--api.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/api.lua b/api.lua
index 9b80678..1d8e943 100644
--- a/api.lua
+++ b/api.lua
@@ -1,9 +1,9 @@
--- Mobs Api (3rd August 2017)
+-- Mobs Api (4th August 2017)
mobs = {}
mobs.mod = "redo"
-mobs.version = "20170803"
+mobs.version = "20170804"
-- Intllib
@@ -54,6 +54,14 @@ local difficulty = tonumber(minetest.setting_get("mob_difficulty")) or 1.0
local show_health = minetest.setting_getbool("mob_show_health") ~= false
local max_per_block = tonumber(minetest.setting_get("max_objects_per_block") or 99)
+-- Peaceful mode message so players will know there are no monsters
+if peaceful_only then
+ minetest.register_on_joinplayer(function(player)
+ minetest.chat_send_player(player:get_player_name(),
+ S("** Peaceful Mode Active - No Monsters Will Spawn"))
+ end)
+end
+
-- calculate aoc range for mob count
local aosrb = tonumber(minetest.setting_get("active_object_send_range_blocks"))
local abr = tonumber(minetest.setting_get("active_block_range"))