make update_time depend of a setting

This commit is contained in:
AFCMS 2021-07-19 23:36:25 +02:00
parent 1f9fc8cb49
commit 0dfd44266a
2 changed files with 3 additions and 1 deletions

View file

@ -10,7 +10,7 @@ minetest.register_alias("mapgen_water_source", "air")
--Variables
local modpath = minetest.get_modpath("formspec_edit")
local insecure_env = minetest.request_insecure_environment()
local update_time = 0.2 --seconds
local update_time = tonumber(minetest.settings:get("formspec_editor.update_time")) or 0.2
local error_formspec = [[
formspec_version[4]

2
settingtypes.txt Normal file
View file

@ -0,0 +1,2 @@
# Formspec update time (in seconds)
formspec_editor.update_time (Update time) float 0.2