Add [easyvend] support (#24)

This commit is contained in:
Luke aka SwissalpS 2024-12-29 18:08:56 +01:00 committed by GitHub
parent 637f0f7644
commit 7fd0dd9453
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 0 deletions

View File

@ -34,6 +34,7 @@ local mods = {
"digistuff",
"digtron",
"drawers",
"easyvend",
"mesecons_commandblock",
"mesecons_detector",
"mesecons_luacontroller",

View File

@ -13,6 +13,7 @@ optional_depends = """
digiscreen,
digistuff,
drawers,
easyvend,
mesecons_commandblock,
mesecons_detector,
mesecons_luacontroller,

27
nodes/easyvend.lua Normal file
View File

@ -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