Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ To make maintaining support easier, wrench only supports specific versions of mo
- `mesecons_microcontroller` - https://github.com/minetest-mods/mesecons
- `missions` - https://github.com/mt-mods/missions
- `mobs` - https://codeberg.org/tenplus1/mobs_redo
- `mooncontroller` - https://github.com/mt-mods/mooncontroller
- `more_chests` - https://github.com/minetest-mods/more_chests
- `moreblocks` - https://github.com/minetest-mods/moreblocks
- `pipeworks` - https://github.com/mt-mods/pipeworks
Expand Down
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ local mods = {
"mesecons_microcontroller",
"missions",
"mobs",
"mooncontroller",
"more_chests",
"moreblocks",
"pipeworks",
Expand Down
25 changes: 25 additions & 0 deletions nodes/mooncontroller.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

-- Register wrench support for mooncontroller

for a = 0, 1 do
for b = 0, 1 do
for c = 0, 1 do
for d = 0, 1 do
local state = d..c..b..a
wrench.register_node("mooncontroller:mooncontroller"..state, {
metas = {
infotext = wrench.META_TYPE_STRING,
code = wrench.META_TYPE_STRING,
afterid = wrench.META_TYPE_INT,
eeprom = wrench.META_TYPE_STRING,
formspec = wrench.META_TYPE_STRING,
real_portstates = wrench.META_TYPE_INT,
},
description = function(pos, meta, node, player)
return meta:get_string("infotext")
end,
})
end
end
end
end