parent
65f18cff03
commit
7fdded1f64
|
@ -1,5 +1,5 @@
|
||||||
default
|
default
|
||||||
creative?
|
creative?
|
||||||
ilights
|
ilights?
|
||||||
gloopblocks?
|
gloopblocks?
|
||||||
homedecor?
|
homedecor?
|
||||||
|
|
72
init.lua
72
init.lua
|
@ -62,46 +62,58 @@ local function check_and_place(itemstack, placer, pointed_thing, pole, light)
|
||||||
minetest.set_node(pos4, { name = light, param2 = 0 })
|
minetest.set_node(pos4, { name = light, param2 = 0 })
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_tool("simple_streetlights:spawner_wood_white", {
|
minetest.register_tool("simple_streetlights:spawner_wood_meselamp", {
|
||||||
description = "Streetlight spawner (wooden pole, white light)",
|
description = "Streetlight spawner (wooden pole, Mese lamp cube)",
|
||||||
inventory_image = "simple_streetlights_spawner_wood_white.png",
|
inventory_image = "simple_streetlights_spawner_wood_meselamp.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
tool_capabilities = { full_punch_interval=0.1 },
|
tool_capabilities = { full_punch_interval=0.1 },
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
check_and_place(itemstack, placer, pointed_thing, "default:fence_wood", "ilights:light")
|
check_and_place(itemstack, placer, pointed_thing, "default:fence_wood", "default:meselamp")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("gloopblocks") then
|
if minetest.get_modpath("ilights") then
|
||||||
minetest.register_tool("simple_streetlights:spawner_steel_white", {
|
minetest.register_tool("simple_streetlights:spawner_wood_white", {
|
||||||
description = "Streetlight spawner (steel pole, white light)",
|
description = "Streetlight spawner (wooden pole, white light)",
|
||||||
inventory_image = "simple_streetlights_spawner_steel_white.png",
|
inventory_image = "simple_streetlights_spawner_wood_white.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
tool_capabilities = { full_punch_interval=0.1 },
|
tool_capabilities = { full_punch_interval=0.1 },
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
check_and_place(itemstack, placer, pointed_thing, "gloopblocks:fence_steel", "ilights:light")
|
check_and_place(itemstack, placer, pointed_thing, "default:fence_wood", "ilights:light")
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_modpath("homedecor") then
|
|
||||||
minetest.register_tool("simple_streetlights:spawner_wrought_iron_white", {
|
|
||||||
description = "Streetlight spawner (wrought iron pole, white light)",
|
|
||||||
inventory_image = "simple_streetlights_spawner_wrought_iron_white.png",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
tool_capabilities = { full_punch_interval=0.1 },
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
check_and_place(itemstack, placer, pointed_thing, "homedecor:fence_wrought_iron", "ilights:light")
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("simple_streetlights:spawner_brass_white", {
|
if minetest.get_modpath("gloopblocks") then
|
||||||
description = "Streetlight spawner (brass pole, white light)",
|
minetest.register_tool("simple_streetlights:spawner_steel_white", {
|
||||||
inventory_image = "simple_streetlights_spawner_brass_white.png",
|
description = "Streetlight spawner (steel pole, white light)",
|
||||||
use_texture_alpha = true,
|
inventory_image = "simple_streetlights_spawner_steel_white.png",
|
||||||
tool_capabilities = { full_punch_interval=0.1 },
|
use_texture_alpha = true,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
tool_capabilities = { full_punch_interval=0.1 },
|
||||||
check_and_place(itemstack, placer, pointed_thing, "homedecor:fence_brass", "ilights:light")
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
end
|
check_and_place(itemstack, placer, pointed_thing, "gloopblocks:fence_steel", "ilights:light")
|
||||||
})
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("homedecor") then
|
||||||
|
minetest.register_tool("simple_streetlights:spawner_wrought_iron_white", {
|
||||||
|
description = "Streetlight spawner (wrought iron pole, white light)",
|
||||||
|
inventory_image = "simple_streetlights_spawner_wrought_iron_white.png",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
tool_capabilities = { full_punch_interval=0.1 },
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
check_and_place(itemstack, placer, pointed_thing, "homedecor:fence_wrought_iron", "ilights:light")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("simple_streetlights:spawner_brass_white", {
|
||||||
|
description = "Streetlight spawner (brass pole, white light)",
|
||||||
|
inventory_image = "simple_streetlights_spawner_brass_white.png",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
tool_capabilities = { full_punch_interval=0.1 },
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
check_and_place(itemstack, placer, pointed_thing, "homedecor:fence_brass", "ilights:light")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in New Issue