Skip to content

Commit

Permalink
Merge branch 'master' into currencySupport
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay authored Dec 31, 2024
2 parents 537a061 + 11c7d7e commit 26d37c8
Show file tree
Hide file tree
Showing 14 changed files with 210 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ read_globals = {
"minetest",
"ItemStack",
"barter",
"beacon",
"christmas",
"digilines",
"drawers",
"mesecon",
"pipeworks",
"signs_lib",
"spacecannon",
"xdecor",
"bones",
}

10 changes: 10 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,39 @@ dofile(modpath.."/legacy.lua")
local mods = {
"3d_armor_stand",
"basic_signs",
"beacon",
"bees",
"biofuel",
"bones",
"christmas",
"connected_chests",
"currency",
"default",
"digibuilder",
"digilines",
"digiscreen",
"digistuff",
"digtron",
"drawers",
"easyvend",
"mesecons_commandblock",
"mesecons_detector",
"mesecons_luacontroller",
"mesecons_microcontroller",
"missions",
"mobs",
"more_chests",
"moreblocks",
"pipeworks",
"powerbanks",
"protector",
"signs_lib",
"spacecannon",
"soundblock",
"technic",
"technic_chests",
"technic_cnc",
"vacuum",
"vessels",
"xdecor",
}
Expand Down
10 changes: 10 additions & 0 deletions mod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,39 @@ 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,
connected_chests,
currency,
christmas,
default,
digtron,
digibuilder,
digilines,
digiscreen,
digistuff,
drawers,
easyvend,
mesecons_commandblock,
mesecons_detector,
mesecons_luacontroller,
mesecons_microcontroller,
missions,
mobs,
more_chests,
moreblocks,
pipeworks,
powerbanks,
protector,
signs_lib,
spacecannon,
soundblock,
technic,
technic_chests,
technic_cnc,
vacuum,
vessels,
xdecor,
"""
Expand Down
25 changes: 25 additions & 0 deletions nodes/beacon.lua
Original file line number Diff line number Diff line change
@@ -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

8 changes: 8 additions & 0 deletions nodes/christmas.lua
Original file line number Diff line number Diff line change
@@ -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

13 changes: 13 additions & 0 deletions nodes/digibuilder.lua
Original file line number Diff line number Diff line change
@@ -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,
},
})

27 changes: 27 additions & 0 deletions nodes/easyvend.lua
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions nodes/missions.lua
Original file line number Diff line number Diff line change
@@ -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,
},
})

14 changes: 14 additions & 0 deletions nodes/moreblocks.lua
Original file line number Diff line number Diff line change
@@ -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,
},
})

13 changes: 10 additions & 3 deletions nodes/pipeworks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,18 @@ 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
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
Expand All @@ -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

23 changes: 23 additions & 0 deletions nodes/powerbanks.lua
Original file line number Diff line number Diff line change
@@ -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

17 changes: 17 additions & 0 deletions nodes/soundblock.lua
Original file line number Diff line number Diff line change
@@ -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,
})

18 changes: 18 additions & 0 deletions nodes/spacecannon.lua
Original file line number Diff line number Diff line change
@@ -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

13 changes: 13 additions & 0 deletions nodes/vacuum.lua
Original file line number Diff line number Diff line change
@@ -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,
},
})

0 comments on commit 26d37c8

Please sign in to comment.