forked from your-land-mirror/yl_speak_up
allow to provide a specific formspec version manually
This commit is contained in:
parent
bb399d3381
commit
978962412f
@ -86,6 +86,11 @@ end)
|
|||||||
-- show formspec with highest possible version information for the player
|
-- show formspec with highest possible version information for the player
|
||||||
-- force_version: optional parameter
|
-- force_version: optional parameter
|
||||||
yl_speak_up.show_fs_ver = function(pname, formname, formspec, force_version)
|
yl_speak_up.show_fs_ver = function(pname, formname, formspec, force_version)
|
||||||
|
-- if the formspec already calls for a specific formspec version: use that one
|
||||||
|
if(string.sub(formspec, 1, 17) == "formspec_version[") then
|
||||||
|
minetest.show_formspec(pname, formname, formspec)
|
||||||
|
return
|
||||||
|
end
|
||||||
local fs_ver = (yl_speak_up.fs_version[pname] or "2")
|
local fs_ver = (yl_speak_up.fs_version[pname] or "2")
|
||||||
if(force_version) then
|
if(force_version) then
|
||||||
fs_ver = force_version
|
fs_ver = force_version
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user