From cbe1b0992822d4ff99b0a172b3d479fbd3fe483e Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 17:42:15 +0100 Subject: [PATCH 01/11] Fix warning when using [pipeworks] without luacontroller (#36) --- .luacheckrc | 1 + nodes/pipeworks.lua | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 3178a9b..d7b2164 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -5,6 +5,7 @@ globals = { } read_globals = { + "core", "table.copy", "table.indexof", "minetest", diff --git a/nodes/pipeworks.lua b/nodes/pipeworks.lua index 0ec5d94..e57502d 100644 --- a/nodes/pipeworks.lua +++ b/nodes/pipeworks.lua @@ -142,6 +142,8 @@ for i = 1, 6 do table.insert(mese_tube_data.lists, "line"..i) end +local has_lua_tube = core.get_modpath("mesecons_luacontroller") and true + for xm = 0, 1 do for xp = 0, 1 do for ym = 0, 1 do @@ -149,7 +151,9 @@ for yp = 0, 1 do for zm = 0, 1 do for zp = 0, 1 do local tname = xm..xp..ym..yp..zm..zp - wrench.register_node("pipeworks:lua_tube"..tname, lua_tube_data) + if has_lua_tube then + wrench.register_node("pipeworks:lua_tube"..tname, lua_tube_data) + end wrench.register_node("pipeworks:mese_tube_"..tname, mese_tube_data) end end @@ -158,5 +162,8 @@ end end end -lua_tube_data.drop = nil -wrench.register_node("pipeworks:lua_tube_burnt", lua_tube_data) +if has_lua_tube then + lua_tube_data.drop = nil + wrench.register_node("pipeworks:lua_tube_burnt", lua_tube_data) +end + From bc79a707374d6c21aff14b40e83d290dd76ab706 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:03:01 +0100 Subject: [PATCH 02/11] Add [vacuum] support (#18) --- init.lua | 1 + mod.conf | 1 + nodes/vacuum.lua | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 nodes/vacuum.lua diff --git a/init.lua b/init.lua index 1357bf2..bff072b 100644 --- a/init.lua +++ b/init.lua @@ -46,6 +46,7 @@ local mods = { "technic", "technic_chests", "technic_cnc", + "vacuum", "vessels", "xdecor", } diff --git a/mod.conf b/mod.conf index c84c353..af7011a 100644 --- a/mod.conf +++ b/mod.conf @@ -25,6 +25,7 @@ optional_depends = """ technic, technic_chests, technic_cnc, + vacuum, vessels, xdecor, """ diff --git a/nodes/vacuum.lua b/nodes/vacuum.lua new file mode 100644 index 0000000..1e19380 --- /dev/null +++ b/nodes/vacuum.lua @@ -0,0 +1,13 @@ + +-- Register wrench support for the vacuum mod + +wrench.register_node("vacuum:airpump", { + lists = { "main" }, + metas = { + enabled = wrench.META_TYPE_INT, + formspec = wrench.META_TYPE_IGNORE, + infotext = wrench.META_TYPE_IGNORE, + owner = wrench.META_TYPE_STRING, + }, +}) + From 637f0f76442a6beb0b154a9dac053a6365ba121d Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:06:25 +0100 Subject: [PATCH 03/11] Add [missions] support (#19) --- init.lua | 1 + mod.conf | 1 + nodes/missions.lua | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 nodes/missions.lua diff --git a/init.lua b/init.lua index bff072b..e16af95 100644 --- a/init.lua +++ b/init.lua @@ -38,6 +38,7 @@ local mods = { "mesecons_detector", "mesecons_luacontroller", "mesecons_microcontroller", + "missions", "mobs", "more_chests", "pipeworks", diff --git a/mod.conf b/mod.conf index af7011a..50f4c4b 100644 --- a/mod.conf +++ b/mod.conf @@ -17,6 +17,7 @@ optional_depends = """ mesecons_detector, mesecons_luacontroller, mesecons_microcontroller, + missions, mobs, more_chests, pipeworks, diff --git a/nodes/missions.lua b/nodes/missions.lua new file mode 100644 index 0000000..6ce85fe --- /dev/null +++ b/nodes/missions.lua @@ -0,0 +1,18 @@ + +-- Register wrench support for the missions mod + +wrench.register_node("missions:mission", { + lists = { "main" }, + metas = { + description = wrench.META_TYPE_STRING, + hidden = wrench.META_TYPE_INT, + infotext = wrench.META_TYPE_STRING, + name = wrench.META_TYPE_STRING, + owner = wrench.META_TYPE_STRING, + steps = wrench.META_TYPE_STRING, + successcount = wrench.META_TYPE_INT, + time = wrench.META_TYPE_INT, + valid = wrench.META_TYPE_INT, + }, +}) + From 7fd0dd94532c751e3a4320911d3f59405ddee347 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:08:56 +0100 Subject: [PATCH 04/11] Add [easyvend] support (#24) --- init.lua | 1 + mod.conf | 1 + nodes/easyvend.lua | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 nodes/easyvend.lua diff --git a/init.lua b/init.lua index e16af95..3b7f103 100644 --- a/init.lua +++ b/init.lua @@ -34,6 +34,7 @@ local mods = { "digistuff", "digtron", "drawers", + "easyvend", "mesecons_commandblock", "mesecons_detector", "mesecons_luacontroller", diff --git a/mod.conf b/mod.conf index 50f4c4b..532d42b 100644 --- a/mod.conf +++ b/mod.conf @@ -13,6 +13,7 @@ optional_depends = """ digiscreen, digistuff, drawers, + easyvend, mesecons_commandblock, mesecons_detector, mesecons_luacontroller, diff --git a/nodes/easyvend.lua b/nodes/easyvend.lua new file mode 100644 index 0000000..fe2fd33 --- /dev/null +++ b/nodes/easyvend.lua @@ -0,0 +1,27 @@ + +-- Register wrench support for the easyvend mod + +for _, name in ipairs({ + "easyvend:vendor", "easyvend:vendor_on", + "easyvend:depositor", "easyvend:depositor_on", + }) do + wrench.register_node(name, { + lists = { "gold", "item" }, + metas = { + configmode = wrench.META_TYPE_INT, + cost = wrench.META_TYPE_INT, + earnings = wrench.META_TYPE_INT, + formspec = wrench.META_TYPE_IGNORE, + infotext = wrench.META_TYPE_IGNORE, + itemname = wrench.META_TYPE_STRING, + joke_id = wrench.META_TYPE_INT, + joketimer = wrench.META_TYPE_INT, + message = wrench.META_TYPE_IGNORE, + number = wrench.META_TYPE_INT, + owner = wrench.META_TYPE_STRING, + status = wrench.META_TYPE_IGNORE, + stock = wrench.META_TYPE_INT, + wear = wrench.META_TYPE_INT, + }, + }) +end From 90d1881b84522fdc28320eb867f00afd33b95258 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:10:20 +0100 Subject: [PATCH 05/11] Add [christmas] support (#26) --- .luacheckrc | 1 + init.lua | 1 + mod.conf | 1 + nodes/christmas.lua | 8 ++++++++ 4 files changed, 11 insertions(+) create mode 100644 nodes/christmas.lua diff --git a/.luacheckrc b/.luacheckrc index d7b2164..34d309a 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -10,6 +10,7 @@ read_globals = { "table.indexof", "minetest", "ItemStack", + "christmas", "digilines", "drawers", "mesecon", diff --git a/init.lua b/init.lua index 3b7f103..6343603 100644 --- a/init.lua +++ b/init.lua @@ -27,6 +27,7 @@ local mods = { "bees", "biofuel", "bones", + "christmas", "connected_chests", "default", "digilines", diff --git a/mod.conf b/mod.conf index 532d42b..5aee59b 100644 --- a/mod.conf +++ b/mod.conf @@ -7,6 +7,7 @@ optional_depends = """ biofuel, bones, connected_chests, + christmas, default, digtron, digilines, diff --git a/nodes/christmas.lua b/nodes/christmas.lua new file mode 100644 index 0000000..5aa033f --- /dev/null +++ b/nodes/christmas.lua @@ -0,0 +1,8 @@ + +-- Register wrench support for the christmas mod + +for _, colour in ipairs(christmas.present_colours) do + wrench.register_node("christmas:present_" .. colour.name, { + }) +end + From 88e4d9bba62f7d0dfe8aa0ab392cef9e58752881 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:13:13 +0100 Subject: [PATCH 06/11] Add [powerbanks] support (#27) --- init.lua | 1 + mod.conf | 1 + nodes/powerbanks.lua | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 nodes/powerbanks.lua diff --git a/init.lua b/init.lua index 6343603..5d6a01b 100644 --- a/init.lua +++ b/init.lua @@ -44,6 +44,7 @@ local mods = { "mobs", "more_chests", "pipeworks", + "powerbanks", "protector", "signs_lib", "technic", diff --git a/mod.conf b/mod.conf index 5aee59b..9057ba0 100644 --- a/mod.conf +++ b/mod.conf @@ -23,6 +23,7 @@ optional_depends = """ mobs, more_chests, pipeworks, + powerbanks, protector, signs_lib, technic, diff --git a/nodes/powerbanks.lua b/nodes/powerbanks.lua new file mode 100644 index 0000000..7c404b9 --- /dev/null +++ b/nodes/powerbanks.lua @@ -0,0 +1,23 @@ + +-- Register wrench support for the powerbanks mod + +for i = 1, 3 do + wrench.register_node("powerbanks:powerbank_mk" .. i .. "_node", { + lists = { "main" }, + metas = { + charge = wrench.META_TYPE_INT, + formspec = wrench.META_TYPE_IGNORE, + infotext = wrench.META_TYPE_IGNORE, + owner = wrench.META_TYPE_STRING, + }, + timer = true, + after_place = function(pos) + local timer = core.get_node_timer(pos) + if not timer:is_started() then + -- Just to re-create infotext and formspec. + timer:start(0) + end + end, + }) +end + From 0200aafbc0cdc2e4e15b806ea71838e1b72ce15e Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:17:37 +0100 Subject: [PATCH 07/11] Add [beacon] support (#28) --- .luacheckrc | 1 + init.lua | 1 + mod.conf | 1 + nodes/beacon.lua | 25 +++++++++++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 nodes/beacon.lua diff --git a/.luacheckrc b/.luacheckrc index 34d309a..fe7b4be 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -10,6 +10,7 @@ read_globals = { "table.indexof", "minetest", "ItemStack", + "beacon", "christmas", "digilines", "drawers", diff --git a/init.lua b/init.lua index 5d6a01b..d2d4ac3 100644 --- a/init.lua +++ b/init.lua @@ -24,6 +24,7 @@ dofile(modpath.."/legacy.lua") local mods = { "3d_armor_stand", "basic_signs", + "beacon", "bees", "biofuel", "bones", diff --git a/mod.conf b/mod.conf index 9057ba0..d7ed8f8 100644 --- a/mod.conf +++ b/mod.conf @@ -3,6 +3,7 @@ description = Adds a wrench to pick up nodes with inventories, such as chests, a optional_depends = """ 3d_armor_stand, basic_signs, + beacon, bees, biofuel, bones, diff --git a/nodes/beacon.lua b/nodes/beacon.lua new file mode 100644 index 0000000..d68a2ca --- /dev/null +++ b/nodes/beacon.lua @@ -0,0 +1,25 @@ + +-- Register wrench support for the beacon mod + +for id in pairs(beacon.colors) do + wrench.register_node("beacon:" .. id, { + lists = { "beacon_upgrades" }, + metas = { + active = wrench.META_TYPE_STRING, + beam_dir = wrench.META_TYPE_STRING, + channel = wrench.META_TYPE_STRING, + effect = wrench.META_TYPE_STRING, + formspec = wrench.META_TYPE_IGNORE, + owner = wrench.META_TYPE_STRING, + range = wrench.META_TYPE_INT, + }, + timer = true, + after_place = function(pos, player) + beacon.update_formspec(pos) + if core.get_meta(pos):get_string("active") == "true" then + beacon.activate(pos, player:get_player_name()) + end + end, + }) +end + From 597de839f78f014f18b3dc41152ef7bf12a3d63f Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:22:00 +0100 Subject: [PATCH 08/11] Add [moreblocks] support (#29) --- init.lua | 1 + mod.conf | 1 + nodes/moreblocks.lua | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 nodes/moreblocks.lua diff --git a/init.lua b/init.lua index d2d4ac3..b734245 100644 --- a/init.lua +++ b/init.lua @@ -44,6 +44,7 @@ local mods = { "missions", "mobs", "more_chests", + "moreblocks", "pipeworks", "powerbanks", "protector", diff --git a/mod.conf b/mod.conf index d7ed8f8..ff92298 100644 --- a/mod.conf +++ b/mod.conf @@ -23,6 +23,7 @@ optional_depends = """ missions, mobs, more_chests, + moreblocks, pipeworks, powerbanks, protector, diff --git a/nodes/moreblocks.lua b/nodes/moreblocks.lua new file mode 100644 index 0000000..cf15b77 --- /dev/null +++ b/nodes/moreblocks.lua @@ -0,0 +1,14 @@ + +-- Register wrench support for the moreblocks mod + +wrench.register_node("moreblocks:circular_saw", { + lists = { "input", "micro" , "output", "recycle" }, + metas = { + anz = wrench.META_TYPE_INT, + formspec = wrench.META_TYPE_IGNORE, + infotext = wrench.META_TYPE_STRING, + max_offered = wrench.META_TYPE_INT, + owner = wrench.META_TYPE_STRING, + }, +}) + From 49c3b1c26d23f3719db1c2253fc1fb2206e37119 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:29:21 +0100 Subject: [PATCH 09/11] Add [digibuilder] support (#32) --- init.lua | 1 + mod.conf | 1 + nodes/digibuilder.lua | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 nodes/digibuilder.lua diff --git a/init.lua b/init.lua index b734245..0ee9d29 100644 --- a/init.lua +++ b/init.lua @@ -31,6 +31,7 @@ local mods = { "christmas", "connected_chests", "default", + "digibuilder", "digilines", "digiscreen", "digistuff", diff --git a/mod.conf b/mod.conf index ff92298..ddbf7c5 100644 --- a/mod.conf +++ b/mod.conf @@ -11,6 +11,7 @@ optional_depends = """ christmas, default, digtron, + digibuilder, digilines, digiscreen, digistuff, diff --git a/nodes/digibuilder.lua b/nodes/digibuilder.lua new file mode 100644 index 0000000..bd82ec7 --- /dev/null +++ b/nodes/digibuilder.lua @@ -0,0 +1,13 @@ + +-- Register wrench support for the digibuilder mod + +wrench.register_node("digibuilder:digibuilder", { + lists = { "main" }, + metas = { + channel = wrench.META_TYPE_STRING, + formspec = wrench.META_TYPE_IGNORE, + infotext = wrench.META_TYPE_IGNORE, + owner = wrench.META_TYPE_STRING, + }, +}) + From 359650b82154c59c47de797ee6b0ad68fad5583a Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:31:26 +0100 Subject: [PATCH 10/11] Add [soundblock] support (#33) --- init.lua | 1 + mod.conf | 1 + nodes/soundblock.lua | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 nodes/soundblock.lua diff --git a/init.lua b/init.lua index 0ee9d29..fc18dac 100644 --- a/init.lua +++ b/init.lua @@ -50,6 +50,7 @@ local mods = { "powerbanks", "protector", "signs_lib", + "soundblock", "technic", "technic_chests", "technic_cnc", diff --git a/mod.conf b/mod.conf index ddbf7c5..cf9a940 100644 --- a/mod.conf +++ b/mod.conf @@ -29,6 +29,7 @@ optional_depends = """ powerbanks, protector, signs_lib, + soundblock, technic, technic_chests, technic_cnc, diff --git a/nodes/soundblock.lua b/nodes/soundblock.lua new file mode 100644 index 0000000..769ebab --- /dev/null +++ b/nodes/soundblock.lua @@ -0,0 +1,17 @@ + +-- Register wrench support for the soundblock mod + +wrench.register_node("soundblock:block", { + lists = {}, + metas = { + gain = wrench.META_TYPE_INT, + hear_distance = wrench.META_TYPE_INT, + interval_max = wrench.META_TYPE_INT, + interval_min = wrench.META_TYPE_INT, + randomize_position = wrench.META_TYPE_INT, + selected_sound_key = wrench.META_TYPE_STRING, + state = wrench.META_TYPE_STRING, + }, + timer = true, +}) + From 11c7d7e3ca18f94cedb4add70fd68bc0c94eb582 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Sun, 29 Dec 2024 19:32:04 +0100 Subject: [PATCH 11/11] Add [spacecannon] support (#30) --- .luacheckrc | 2 ++ init.lua | 1 + mod.conf | 1 + nodes/spacecannon.lua | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 nodes/spacecannon.lua diff --git a/.luacheckrc b/.luacheckrc index fe7b4be..ca3151d 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -17,6 +17,8 @@ read_globals = { "mesecon", "pipeworks", "signs_lib", + "spacecannon", "xdecor", "bones", } + diff --git a/init.lua b/init.lua index fc18dac..b01aaa0 100644 --- a/init.lua +++ b/init.lua @@ -50,6 +50,7 @@ local mods = { "powerbanks", "protector", "signs_lib", + "spacecannon", "soundblock", "technic", "technic_chests", diff --git a/mod.conf b/mod.conf index cf9a940..57617cd 100644 --- a/mod.conf +++ b/mod.conf @@ -29,6 +29,7 @@ optional_depends = """ powerbanks, protector, signs_lib, + spacecannon, soundblock, technic, technic_chests, diff --git a/nodes/spacecannon.lua b/nodes/spacecannon.lua new file mode 100644 index 0000000..908d611 --- /dev/null +++ b/nodes/spacecannon.lua @@ -0,0 +1,18 @@ + +-- Register wrench support for the spacecannon mod + +for _, def in ipairs(spacecannon.cannon_defs) do + wrench.register_node("spacecannon:cannon_" .. def.color, { + lists = def.is_th and {} or { "src" }, + metas = { + channel = wrench.META_TYPE_STRING, + formspec = wrench.META_TYPE_IGNORE, + HV_EU_demand = wrench.META_TYPE_INT, + HV_EU_input = wrench.META_TYPE_INT, + infotext = wrench.META_TYPE_IGNORE, + owner = wrench.META_TYPE_STRING, + powerstorage = wrench.META_TYPE_INT, + }, + }) +end +