Escape creative formspec strings
This commit is contained in:
parent
c4d93e1871
commit
25e284708a
@ -4,8 +4,10 @@
|
|||||||
local S
|
local S
|
||||||
if (minetest.get_modpath("intllib")) then
|
if (minetest.get_modpath("intllib")) then
|
||||||
S = intllib.Getter()
|
S = intllib.Getter()
|
||||||
|
ES = function( s ) return minetest.formspec_escape(S(s)) end
|
||||||
else
|
else
|
||||||
S = function ( s ) return s end
|
S = function ( s ) return s end
|
||||||
|
ES = function ( s ) return minetest.formspec_escape(s) end
|
||||||
end
|
end
|
||||||
|
|
||||||
creative = {}
|
creative = {}
|
||||||
@ -123,13 +125,13 @@ creative.set_creative_formspec = function(player, start_i, pagenum, tab_id)
|
|||||||
button[7.25,3.2;0.8,0.9;creative_next;>]
|
button[7.25,3.2;0.8,0.9;creative_next;>]
|
||||||
button[2.1,3.4;0.8,0.5;creative_search;?]
|
button[2.1,3.4;0.8,0.5;creative_search;?]
|
||||||
button[2.75,3.4;0.8,0.5;creative_clear;X]
|
button[2.75,3.4;0.8,0.5;creative_clear;X]
|
||||||
tooltip[creative_search;]]..S("Search")..[[]
|
tooltip[creative_search;]]..ES("Search")..[[]
|
||||||
tooltip[creative_clear;]]..S("Reset")..[[]
|
tooltip[creative_clear;]]..ES("Reset")..[[]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
]] ..
|
]] ..
|
||||||
"field[0.3,3.5;2.2,1;creative_filter;;".. filter .."]"..
|
"field[0.3,3.5;2.2,1;creative_filter;;".. filter .."]"..
|
||||||
"listring[detached:creative_".. player_name ..";main]"..
|
"listring[detached:creative_".. player_name ..";main]"..
|
||||||
"tabheader[0,0;creative_tabs;"..S("Crafting")..","..S("All")..","..S("Nodes")..","..S("Tools")..","..S("Items")..";".. tostring(tab_id) ..";true;false]"..
|
"tabheader[0,0;creative_tabs;"..ES("Crafting")..","..ES("All")..","..ES("Nodes")..","..ES("Tools")..","..ES("Items")..";".. tostring(tab_id) ..";true;false]"..
|
||||||
"list[detached:creative_".. player_name ..";main;0,0;8,3;".. tostring(start_i) .."]"..
|
"list[detached:creative_".. player_name ..";main;0,0;8,3;".. tostring(start_i) .."]"..
|
||||||
"table[6.05,3.35;1.15,0.5;pagenum;#FFFF00,".. tostring(pagenum) ..",#FFFFFF,/ ".. tostring(pagemax) .."]"..
|
"table[6.05,3.35;1.15,0.5;pagenum;#FFFF00,".. tostring(pagenum) ..",#FFFFFF,/ ".. tostring(pagemax) .."]"..
|
||||||
default.get_hotbar_bg(0,4.7)..
|
default.get_hotbar_bg(0,4.7)..
|
||||||
@ -147,7 +149,7 @@ creative.set_crafting_formspec = function(player)
|
|||||||
list[detached:creative_trash;main;0,2.75;1,1;]
|
list[detached:creative_trash;main;0,2.75;1,1;]
|
||||||
image[0.06,2.85;0.8,0.8;creative_trash_icon.png]
|
image[0.06,2.85;0.8,0.8;creative_trash_icon.png]
|
||||||
image[5,1.75;1,1;gui_furnace_arrow_bg.png^[transformR270]
|
image[5,1.75;1,1;gui_furnace_arrow_bg.png^[transformR270]
|
||||||
tabheader[0,0;creative_tabs;]]..S("Crafting")..","..S("All")..","..S("Nodes")..","..S("Tools")..","..S("Items")..[[;1;true;false]
|
tabheader[0,0;creative_tabs;]]..ES("Crafting")..","..ES("All")..","..ES("Nodes")..","..ES("Tools")..","..ES("Items")..[[;1;true;false]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
listring[current_player;craft]
|
listring[current_player;craft]
|
||||||
]] ..
|
]] ..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user