2018-11-03 13:48:04 -04:00
|
|
|
-- simple streetlight spawner mod
|
2018-09-21 03:05:26 -04:00
|
|
|
|
2018-11-03 13:48:04 -04:00
|
|
|
local modpath = minetest.get_modpath("simple_streetlights")
|
2018-09-21 03:05:26 -04:00
|
|
|
|
2019-05-03 02:22:32 -04:00
|
|
|
streetlights = {}
|
|
|
|
streetlights.basic_materials = minetest.get_modpath("basic_materials")
|
2019-05-31 23:27:54 -04:00
|
|
|
streetlights.concrete = "basic_materials:concrete_block"
|
|
|
|
streetlights.distributor = "streets:digiline_distributor"
|
|
|
|
streetlights.vert_digiline = "digistuff:vertical_bottom"
|
|
|
|
|
|
|
|
function streetlights.rightclick_pointed_thing(pos, placer, itemstack, pointed_thing)
|
|
|
|
local node = minetest.get_node_or_nil(pos)
|
|
|
|
if not node then return false end
|
|
|
|
local def = minetest.registered_nodes[node.name]
|
|
|
|
if not def or not def.on_rightclick then return false end
|
|
|
|
return def.on_rightclick(pos, node, placer, itemstack, pointed_thing) or itemstack
|
|
|
|
end
|
2019-05-03 02:22:32 -04:00
|
|
|
|
2018-11-03 13:48:04 -04:00
|
|
|
dofile(modpath.."/simple.lua")
|
2019-05-03 02:22:32 -04:00
|
|
|
if minetest.get_modpath("homedecor_lighting") and minetest.get_modpath("streetspoles") then
|
2018-11-03 13:48:04 -04:00
|
|
|
dofile(modpath.."/minedot.lua")
|
2018-09-21 03:05:26 -04:00
|
|
|
end
|