Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [jumpdrive] support #11

Merged
merged 11 commits into from
Dec 31, 2024
2 changes: 2 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ globals = {
}

read_globals = {
"core",
"table.copy",
"table.indexof",
"minetest",
"ItemStack",
SwissalpS marked this conversation as resolved.
Show resolved Hide resolved
"digilines",
"drawers",
"jumpdrive",
"mesecon",
"pipeworks",
"signs_lib",
Expand Down
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ local mods = {
"digistuff",
"digtron",
"drawers",
"jumpdrive",
"mesecons_commandblock",
"mesecons_detector",
"mesecons_luacontroller",
Expand Down
1 change: 1 addition & 0 deletions mod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ optional_depends = """
digiscreen,
digistuff,
drawers,
jumpdrive,
mesecons_commandblock,
mesecons_detector,
mesecons_luacontroller,
Expand Down
40 changes: 40 additions & 0 deletions nodes/jumpdrive.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

-- Register wrench support for the jumpdrive mod

wrench.register_node("jumpdrive:engine", {
lists = {"main", "upgrade"},
metas = {
x = wrench.META_TYPE_INT,
y = wrench.META_TYPE_INT,
z = wrench.META_TYPE_INT,
radius = wrench.META_TYPE_INT,
powerstorage = wrench.META_TYPE_INT,
max_powerstorage = wrench.META_TYPE_INT,
power_requirement = wrench.META_TYPE_IGNORE,
owner = wrench.META_TYPE_STRING,
channel = wrench.META_TYPE_STRING,
infotext = wrench.META_TYPE_STRING,
formspec = wrench.META_TYPE_IGNORE, -- legacy field
HV_EU_input = wrench.META_TYPE_IGNORE,
HV_EU_demand = wrench.META_TYPE_IGNORE
},
after_place = function(pos)
jumpdrive.update_formspec(core.get_meta(pos), pos)
end,
})

wrench.register_node("jumpdrive:fleet_controller", {
lists = {"main"},
metas = {
x = wrench.META_TYPE_INT,
y = wrench.META_TYPE_INT,
z = wrench.META_TYPE_INT,
owner = wrench.META_TYPE_STRING,
channel = wrench.META_TYPE_STRING,
infotext = wrench.META_TYPE_STRING,
formspec = wrench.META_TYPE_STRING,
active = wrench.META_TYPE_INT,
jump_index = wrench.META_TYPE_INT,
jump_list = wrench.META_TYPE_STRING
}
})
Loading