1
0
mirror of https://github.com/Sokomine/cottages.git synced 2024-11-13 05:50:30 +01:00

manage well entity w/ node entity queue, if present

This commit is contained in:
flux 2022-10-09 14:42:16 -07:00
parent 763f2bd5bf
commit 9b0258d8be
No known key found for this signature in database
GPG Key ID: 9333B27816848A15

View File

@ -163,12 +163,17 @@ cottages.api.register_machine("cottages:water_gen", {
use = water.use_well,
})
minetest.register_lbm({
name = "cottages:add_well_entity",
label = "Initialize entity to cottages well",
nodenames = {"cottages:water_gen"},
run_at_every_load = true,
action = function(pos, node)
water.initialize_entity(pos)
end
})
if cottages.has.node_entity_queue then
node_entity_queue.api.register_node_entity_loader("cottages:water_gen", water.initialize_entity)
else
minetest.register_lbm({
name = "cottages:add_well_entity",
label = "Initialize entity to cottages well",
nodenames = {"cottages:water_gen"},
run_at_every_load = true,
action = function(pos, node)
water.initialize_entity(pos)
end
})
end