This repository has been archived on 2019-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
scriptblocks/init.lua

39 lines
989 B
Lua
Raw Normal View History

2018-09-06 05:04:07 +02:00
--
-- Minetest scriptblocks mod
--
2017-07-30 22:24:43 +02:00
2018-09-06 05:04:07 +02:00
-- Settings
scriptblocks = {
-- The maximum length of scriptblocks scripts.
max_length = 30,
-- The maximum amount of scriptblocks processed during a globalstep
max_per_step = 24,
-- The "tick" delay - How long to wait between processing scriptblocks
-- NOTE: If this is set too high, scriptblocks will appear unresponsive.
tick_delay = 0.1,
2018-09-06 05:04:07 +02:00
}
2018-09-06 05:04:07 +02:00
-- Get the mod path and storage
local modpath = minetest.get_modpath('scriptblocks')
scriptblocks.storage = minetest.get_mod_storage()
-- Load scriptblocks lua files
dofile(modpath .. '/core.lua')
dofile(modpath .. '/scriptblock.lua')
-- Load mesecons and digilines scriptblocks
if minetest.get_modpath('mesecons') then
dofile(modpath .. '/mesecons.lua')
end
2018-09-06 05:04:07 +02:00
if minetest.get_modpath('digilines') then
dofile(modpath .. '/digilines.lua')
end
-- Override rmod scriptblock functions.
if minetest.get_modpath('rmod') then
rmod.scriptblock = scriptblocks
end