From 8fd06cadc31e6ccf78a9fdc7e3e6b18e83a282aa Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Sat, 5 Mar 2022 21:52:22 -0500 Subject: [PATCH] fix default formspec crashes --- common.lua | 2 +- teleport_tube.lua | 4 +--- trashcan.lua | 4 ---- vacuum_tubes.lua | 4 +--- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/common.lua b/common.lua index 207b728..2f60e86 100644 --- a/common.lua +++ b/common.lua @@ -183,7 +183,7 @@ function pipeworks.create_fake_player(def, is_dynamic) is_player = delay(true), is_fake_player = true, - _formspec = def.formspec or default.gui_survival_form, + _formspec = def.formspec or "size[8,8.5]label[1,1;404 formspec not found]", _hp = def.hp or 20, _breath = 11, _pos = def.position and table.copy(def.position) or vector.new(), diff --git a/teleport_tube.lua b/teleport_tube.lua index c59f740..9ad7f20 100644 --- a/teleport_tube.lua +++ b/teleport_tube.lua @@ -153,9 +153,7 @@ local function update_meta(meta, can_receive) "label[7.0,0;"..S("Receive").."]".. "image_button[7.0,0.5;1,0.6;pipeworks_button_" .. cr_state .. ".png;cr" .. (can_receive and 0 or 1) .. ";;;false;pipeworks_button_interm.png]".. "button_exit[6.3,1.3;2,1;close;"..S("Close").."]".. - "label[0.2,2.3;"..itext.."]".. - default.gui_bg.. - default.gui_bg_img) + "label[0.2,2.3;"..itext.."]") end pipeworks.register_tube("pipeworks:teleport_tube", { diff --git a/trashcan.lua b/trashcan.lua index 361d73e..d445c14 100644 --- a/trashcan.lua +++ b/trashcan.lua @@ -25,10 +25,6 @@ minetest.register_node("pipeworks:trashcan", { "item_image[0,0;1,1;pipeworks:trashcan]".. "label[1,0;"..S("Trash Can").."]".. "list[context;trash;3.5,1;1,1;]".. - default.gui_bg.. - default.gui_bg_img.. - default.gui_slots.. - default.get_hotbar_bg(0,3) .. "list[current_player;main;0,3;8,4;]" .. "listring[]") meta:set_string("infotext", S("Trash Can")) diff --git a/vacuum_tubes.lua b/vacuum_tubes.lua index 927480b..5e44a9a 100644 --- a/vacuum_tubes.lua +++ b/vacuum_tubes.lua @@ -46,9 +46,7 @@ if pipeworks.enable_mese_sand_tube then "label[1.2,0.2;"..S("Adjustable Vacuuming Tube").."]".. "field[0.5,1.6;2.1,1;dist;"..S("Radius")..";${dist}]".. "button[2.3,1.3;1.5,1;set_dist;"..S("Set").."]".. - "button_exit[3.8,1.3;2,1;close;"..S("Close").."]".. - default.gui_bg.. - default.gui_bg_img) + "button_exit[3.8,1.3;2,1;close;"..S("Close").."]") meta:set_string("infotext", S("Adjustable Vacuuming Pneumatic Tube Segment")) end, on_receive_fields = function(pos,formname,fields,sender)