summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-12-05 21:05:47 -0600
committercheapie <no-email-for-you@example.com>2024-12-05 21:05:47 -0600
commite51432957b21d32ca446d6442e730ba5ab012bb3 (patch)
tree67f2145c559928dd05772fb50fc966a88a4b5ba4
parentccd9c9c8c175e7ca2a98435fd460576d9e42f8c5 (diff)
downloadcelevator-main.tar
celevator-main.tar.gz
celevator-main.tar.bz2
celevator-main.tar.xz
celevator-main.zip
Improve formspec compatibility with games using prepends (like VoxeLibre)HEADmain
-rw-r--r--controllerfw.lua5
-rw-r--r--dispatcherfw.lua1
2 files changed, 5 insertions, 1 deletions
diff --git a/controllerfw.lua b/controllerfw.lua
index c268124..eeb8814 100644
--- a/controllerfw.lua
+++ b/controllerfw.lua
@@ -1248,6 +1248,7 @@ end
fs("formspec_version[6]")
fs("size[16,12]")
+fs("no_prepend[]")
fs("background9[0,0;16,12;celevator_fs_bg.png;true;3]")
if mem.screenstate == "oobe_welcome" then
fs("image[6,1;4,2;celevator_logo.png]")
@@ -1581,6 +1582,8 @@ local coprows = math.floor((floorcount-1)/copcols)+1
local litimg = "celevator_copbutton_lit.png"
local unlitimg = "celevator_copbutton_unlit.png"
mem.copformspec = mem.copformspec..string.format("size[%f,%f]",copcols*1.25+2.5,coprows*1.25+5)
+mem.copformspec = mem.copformspec.."no_prepend[]"
+mem.copformspec = mem.copformspec.."background9[0,0;16,12;celevator_fs_bg.png;true;3]"
for i=1,floorcount,1 do
local row = math.floor((i-1)/copcols)+1
local col = ((i-1)%copcols)+1
@@ -1614,7 +1617,7 @@ else
mem.copformspec = mem.copformspec..string.format("image[2.2,0.5;1.4,1.4;%s]",firehat)
end
-mem.switchformspec = "formspec_version[7]size[8,10]"
+mem.switchformspec = "formspec_version[7]size[8,10]no_prepend[]background9[0,0;16,12;celevator_fs_bg.png;true;3]"
local fs2ontex = (mem.fs2sw == "on") and "celevator_button_rect_active.png" or "celevator_button_rect.png"
local fs2holdtex = (mem.fs2sw == "hold") and "celevator_button_rect_active.png" or "celevator_button_rect.png"
local fs2offtex = (mem.fs2sw == "off" or not mem.fs2sw) and "celevator_button_rect_active.png" or "celevator_button_rect.png"
diff --git a/dispatcherfw.lua b/dispatcherfw.lua
index 88e1537..25ad4f8 100644
--- a/dispatcherfw.lua
+++ b/dispatcherfw.lua
@@ -901,6 +901,7 @@ end
fs("formspec_version[6]")
fs("size[20,12]")
+fs("no_prepend[]")
fs("background9[0,0;16,12;celevator_fs_bg.png;true;3]")
if mem.screenstate == "oobe_welcome" then