diff --git a/README b/README index 8fd0293..b37797e 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Mod: by RuneAlbut and Etwas +Mod: by RuneAlbut Textures by sdzen http://minetest.net/forum/viewtopic.php?id=1567 diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..3a7daa1 --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +default + diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..d691a7a --- /dev/null +++ b/init.lua @@ -0,0 +1,54 @@ +minetest.register_craft({ + output = 'street:lamp 4', + recipe = { + {'default:coal_lump'}, + {'default:torch'}, + } +}) + +minetest.register_node("street:lamp", { + description = "Lamp", + drawtype = "plantlike", + tile_images = {"lamp.png"}, + inventory_image = "lamp.png", + wield_image = "lamp.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = true, + light_source = LIGHT_MAX-1, + selection_box = { + type = "wallmounted", + wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1}, + wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1}, + wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1}, + }, + material = minetest.digprop_constanttime(0.0), + legacy_wallmounted = true, +}) + +minetest.register_craft({ + output = 'street:lamppost 12', + recipe = { + {'default:coal_lump'}, + {'default:fence_wood'}, + } +}) + +minetest.register_node("street:lamppost", { + description = "Lamppost", + drawtype = "fencelike", + tile_images = {"pfosten_1.png"}, + inventory_image = "pfosten_1.png", + wield_image = "pfosten_1.png", + paramtype = "light", + is_ground_content = true, + sunlight_propagates = true, + walkable = false, + light_source = LIGHT_MAX-1, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + material = minetest.digprop_woodlike(0.75), +}) diff --git a/screenshots/lamp_day.png b/screenshots/lamp_day.png new file mode 100644 index 0000000..5f16581 Binary files /dev/null and b/screenshots/lamp_day.png differ diff --git a/screenshots/lamp_night.png b/screenshots/lamp_night.png new file mode 100644 index 0000000..5677a8a Binary files /dev/null and b/screenshots/lamp_night.png differ diff --git a/textures/lamp.png b/textures/lamp.png new file mode 100644 index 0000000..9478157 Binary files /dev/null and b/textures/lamp.png differ diff --git a/textures/lamppost.png b/textures/lamppost.png new file mode 100644 index 0000000..acd6cfc Binary files /dev/null and b/textures/lamppost.png differ