mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Add setting to disable events
This commit is contained in:
parent
a1e21b44c8
commit
2147790b44
@ -1,5 +1,8 @@
|
||||
mcl_events = {}
|
||||
mcl_events.registered_events = {}
|
||||
local disabled_events = minetest.settings:get("mcl_disabled_events")
|
||||
if disabled_events then disabled_events = disabled_events:split(",")
|
||||
else disabled_events = {} end
|
||||
local DBG = minetest.settings:get_bool("mcl_logging_event_api",false)
|
||||
local active_events = {}
|
||||
|
||||
@ -27,6 +30,7 @@ local function mcl_log(m,l)
|
||||
end
|
||||
|
||||
function mcl_events.register_event(name,def)
|
||||
if table.indexof(disabled_events,name) ~= -1 then return end
|
||||
mcl_events.registered_events[name] = {}
|
||||
--setmetatable(mcl_events.registered_events[name],tpl_eventdef)
|
||||
mcl_events.registered_events[name] = def
|
||||
|
@ -42,6 +42,9 @@ mcl_tnt_griefing (TNT destroys blocks) bool true
|
||||
# Comma separated list of disabled structure names
|
||||
mcl_disabled_structures (Disabled structures) string
|
||||
|
||||
# Comma separated list of disabled event names
|
||||
mcl_disabled_events (Disabled events) string
|
||||
|
||||
[Players]
|
||||
# If enabled, players respawn at the bed they last lay on instead of normal
|
||||
# spawn.
|
||||
|
Loading…
Reference in New Issue
Block a user