Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions touchscreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ local function create_element_string(element, values)
end

local function modify_element_string(old, values)
local e = string.match(old, "^(.-)%[")
local e = string.match(old, "^(.-)%[[^[]*%]$")
local element = formspec_elements[e]
if type(element) == "function" then
if type(element) ~= "table" then
return old -- No-op for special elements, as there is no format string
end
local old_values = {string.match(old, element[5])}
Expand Down Expand Up @@ -156,7 +156,7 @@ local function create_formspec(meta, data)
if meta:get_int("no_prepend") == 1 then
fs = fs.."no_prepend[]"
end
if not meta:get("real_coordinates") and not meta:get("realcoordinates") then
if (meta:get("real_coordinates") or meta:get("realcoordinates")) ~= "1" then
fs = fs.."real_coordinates[false]"
end
local focus = meta:get("focus")
Expand Down