forked from ChimneySwift/fancy_vend
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdisplay_node.lua
More file actions
32 lines (26 loc) · 901 Bytes
/
display_node.lua
File metadata and controls
32 lines (26 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- Register a copy of the display node with no drops to make players separating
-- the obsidian glass with something like a piston a non-issue.
local display_node_def = table.copy(core.registered_nodes[fancy_vend.display_node])
display_node_def.drop = ""
display_node_def.pointable = false
display_node_def.groups.not_in_creative_inventory = 1
display_node_def.description = "Fancy Vendor Display Node (you hacker you!)"
if pipeworks then
display_node_def.digiline = {
wire = {
rules = pipeworks.digilines_rules
}
}
end
core.register_node("fancy_vend:display_node", display_node_def)
-- LBM to refresh entities after clearobjects
core.register_lbm({
label = "Refresh vendor display",
name = "fancy_vend:display_refresh",
nodenames = {"fancy_vend:display_node"},
run_at_every_load = true,
action = function(pos, node)
pos.y = pos.y - 1
fancy_vend.update_item(pos, node)
end
})