summaryrefslogtreecommitdiff
path: root/roadsigns/init.lua
blob: e44b68a9fc4dcca9d2ae6f5cae2ca4eab9fc2a63 (plain)
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
33
34
35
36
37
38
39
40
41
42
--[[
	StreetsMod: Poles and signs
]]
streets.workshop = {}

streets.workshop.register_sign  = function(nodename, desc, img, rrecipe, rtime)
	
	minetest.register_node(nodename,{
		description = desc,
		tiles = {img},
		inventory_image = img,
		wield_image = img,
		groups = {snappy = 1,attached_node = 1},
		on_construct = function(pos)
			local meta = minetest.get_meta(pos)
			meta:set_string("infotext", desc)
		end,
		drawtype = "nodebox",
		node_box = {
		type = "wallmounted",
		fixed = {
		{-0.4,-0.5,-0.4,0.4,-0.4,0.4}
		}
		},
		paramtype = "light",
		paramtype2 = "wallmounted",
		walkable = false,
		sunlight_propagates = true,
		selection_box = {
		type = "wallmounted"
		},
		streets = {
		signworkshop = {
		recipe = rrecipe,
		time = rtime
		}
		}
	})
end

dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/signs.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/workshop.lua")