-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into updateReadme
- Loading branch information
Showing
22 changed files
with
541 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
unused_args = false | ||
--std = "luanti+max" | ||
|
||
globals = { | ||
"wrench", | ||
} | ||
|
||
read_globals = { | ||
"core", | ||
"table.copy", | ||
"table.indexof", | ||
"minetest", | ||
"ItemStack", | ||
"barter", | ||
"beacon", | ||
"bones", | ||
"christmas", | ||
"digilines", | ||
"drawers", | ||
"fancy_vend", | ||
"jumpdrive", | ||
"locator", | ||
"mesecon", | ||
"pipeworks", | ||
"signs_lib", | ||
"smartshop", | ||
"spacecannon", | ||
"xdecor", | ||
"bones", | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
-- Register wrench support for the currency mod | ||
|
||
wrench.register_node("currency:barter", { | ||
lists = { "pl1", "pl2" }, | ||
metas = { | ||
clean = wrench.META_TYPE_INT, | ||
formspec = wrench.META_TYPE_IGNORE, | ||
infotext = wrench.META_TYPE_IGNORE, | ||
pl1 = wrench.META_TYPE_STRING, | ||
pl2 = wrench.META_TYPE_STRING, | ||
pl1step = wrench.META_TYPE_INT, | ||
pl2step = wrench.META_TYPE_INT, | ||
timer = wrench.META_TYPE_INT, | ||
}, | ||
timer = true, | ||
after_place = function(pos, player, stack, pointed) | ||
barter.chest.update_formspec(core.get_meta(pos)) | ||
end, | ||
}) | ||
|
||
wrench.register_node("currency:safe", { | ||
lists = { "main" }, | ||
metas = { | ||
infotext = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
}, | ||
owned = true, | ||
}) | ||
|
||
-- Unkown what happens if a shop is wrenched while a user is using it. | ||
for _, name in ipairs({ "currency:shop", "currency:shop_empty" }) do | ||
wrench.register_node(name, { | ||
lists = { "customers_gave", "owner_gives", "owner_wants", "stock" }, | ||
metas = { | ||
infotext = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
}, | ||
owned = true, | ||
}) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
-- Register wrench support for the ehlphabet mod | ||
|
||
wrench.register_node("ehlphabet:machine", { | ||
lists = { "input", "output" }, | ||
metas = { | ||
formspec = wrench.META_TYPE_IGNORE, | ||
}, | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
-- Register wrench support for the fancy_vend mod | ||
|
||
for _, vendor in ipairs({ | ||
"fancy_vend:player_vendor", | ||
"fancy_vend:player_depo", | ||
"fancy_vend:admin_vendor", | ||
"fancy_vend:admin_depo", | ||
}) do | ||
wrench.register_node(vendor, { | ||
lists = { "given_item", "main", "wanted_item" }, | ||
metas = { | ||
alerted = wrench.META_TYPE_STRING, | ||
configured = wrench.META_TYPE_STRING, | ||
infotext = wrench.META_TYPE_IGNORE, | ||
item = wrench.META_TYPE_STRING, | ||
log = wrench.META_TYPE_STRING, | ||
message = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
settings = wrench.META_TYPE_STRING, | ||
}, | ||
after_pickup = function(pos, node, meta_table, player) | ||
local above_node_pos = table.copy(pos) | ||
above_node_pos.y = above_node_pos.y + 1 | ||
core.remove_node(above_node_pos) | ||
fancy_vend.remove_item(above_node_pos) | ||
end, | ||
after_place = function(pos) | ||
-- This happens during vendor's on_place function is being run! | ||
-- So we need to hack around that race condition. | ||
-- At this time wrench has already set the meta, so we can stash | ||
-- it from the node with fancy_vend function | ||
local settings = fancy_vend.get_vendor_settings(pos) | ||
core.after(0, function(p, s) | ||
-- Use fancy_vend's own function to apply the stashed settings | ||
fancy_vend.set_vendor_settings(p, s) | ||
fancy_vend.refresh_vendor(p) | ||
end, pos, settings) | ||
end, | ||
}) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
-- Register wrench support for locator mod | ||
|
||
wrench.register_node("locator:radar", { | ||
lists = {}, | ||
metas = { | ||
formspec = wrench.META_TYPE_IGNORE, | ||
range = wrench.META_TYPE_INT, | ||
}, | ||
after_place = function(pos, player) | ||
local node_def = core.registered_nodes["locator:radar"] | ||
node_def.on_receive_fields(pos, nil, {}, player) | ||
end, | ||
}) | ||
|
||
for i = 1, 3 do | ||
local node_name = "locator:beacon_" .. i | ||
wrench.register_node(node_name, { | ||
lists = {}, | ||
metas = { | ||
active = wrench.META_TYPE_INT, | ||
formspec = wrench.META_TYPE_IGNORE, | ||
infotext = wrench.META_TYPE_IGNORE, | ||
name = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
range = wrench.META_TYPE_IGNORE, | ||
}, | ||
after_pickup = function(pos) | ||
locator.remove_beacon(pos) | ||
end, | ||
after_place = function(pos, player) | ||
local node_def = core.registered_nodes[node_name] | ||
node_def.on_receive_fields(pos, nil, {}, player) | ||
end, | ||
}) | ||
end |
Oops, something went wrong.