diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-09 13:58:19 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-09 13:58:19 +0100 |
commit | c81191df2ab8b0f6f79692278ca3035779d7913b (patch) | |
tree | b4c2b4fa011e07fd87e57283d72e85a37cba9e92 /init.lua | |
parent | 1c37c2b695e61c19147923aa89736f8cd654a325 (diff) |
update to newer 0.4.16 functions
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2,15 +2,16 @@ -- get minetest.conf settings protector = {} protector.mod = "redo" -protector.radius = tonumber(minetest.setting_get("protector_radius")) or 5 -protector.flip = minetest.setting_getbool("protector_flip") or false -protector.hurt = tonumber(minetest.setting_get("protector_hurt")) or 0 -protector.spawn = tonumber(minetest.setting_get("protector_spawn") - or minetest.setting_get("protector_pvp_spawn")) or 0 +protector.radius = tonumber(minetest.settings:get("protector_radius")) or 5 +protector.flip = minetest.settings:get_bool("protector_flip") or false +protector.hurt = tonumber(minetest.settings:get("protector_hurt")) or 0 +protector.spawn = tonumber(minetest.settings:get("protector_spawn") + or minetest.settings:get("protector_pvp_spawn")) or 0 -- get static spawn position -local statspawn = minetest.setting_get_pos("static_spawnpoint") or {x = 0, y = 2, z = 0} +local statspawn = minetest.string_to_pos(minetest.settings:get("static_spawnpoint")) + or {x = 0, y = 2, z = 0} -- Intllib |