mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-11 18:30:21 +01:00
show message when peaceful mode active
This commit is contained in:
parent
d31010216a
commit
b95ca521ed
12
api.lua
12
api.lua
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
-- Mobs Api (3rd August 2017)
|
-- Mobs Api (4th August 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
mobs.version = "20170803"
|
mobs.version = "20170804"
|
||||||
|
|
||||||
|
|
||||||
-- Intllib
|
-- 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 show_health = minetest.setting_getbool("mob_show_health") ~= false
|
||||||
local max_per_block = tonumber(minetest.setting_get("max_objects_per_block") or 99)
|
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
|
-- calculate aoc range for mob count
|
||||||
local aosrb = tonumber(minetest.setting_get("active_object_send_range_blocks"))
|
local aosrb = tonumber(minetest.setting_get("active_object_send_range_blocks"))
|
||||||
local abr = tonumber(minetest.setting_get("active_block_range"))
|
local abr = tonumber(minetest.setting_get("active_block_range"))
|
||||||
|
Loading…
Reference in New Issue
Block a user