aboutsummaryrefslogtreecommitdiff
path: root/signs_road/nodes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'signs_road/nodes.lua')
-rw-r--r--signs_road/nodes.lua283
1 files changed, 202 insertions, 81 deletions
diff --git a/signs_road/nodes.lua b/signs_road/nodes.lua
index c5d92b6..74eca23 100644
--- a/signs_road/nodes.lua
+++ b/signs_road/nodes.lua
@@ -27,16 +27,16 @@ local models = {
width = 14/16,
height = 12/16,
entity_fields = {
- resolution = { x = 144, y = 64 },
+ size = { x = 14/16, y = 10/16 },
maxlines = 3,
color = "#fff",
},
node_fields = {
description = S("Blue street sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_blue.png" },
- inventory_image = "signs_road_blue.png",
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_blue_street.png" },
+ inventory_image = "signs_road_blue_street.png",
},
},
large_street_sign = {
@@ -44,106 +44,139 @@ local models = {
width = 64/16,
height = 12/16,
entity_fields = {
- resolution = { x = 30, y = 20 },
maxlines = 1,
color = "#000",
},
node_fields = {
visual_scale = 1,
description = S("Large banner"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_large_white.png" },
inventory_image = "signs_road_white.png",
},
},
-
red_street_sign = {
depth = 1/16,
width = 1,
height = 7/16,
entity_fields = {
- resolution = { x = 96, y = 64 },
+ size = { x = 1, y = 4/16 },
maxlines = 1,
color = "#000",
},
node_fields = {
description = S("Red and white town sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_red_white.png" },
inventory_image="signs_road_red_white.png",
},
},
- white_street_sign = {
+ white_sign = {
depth = 1/16,
width = 1,
height = 7/16,
entity_fields = {
- resolution = { x = 96, y = 64 },
+ size = { x = 1, y = 6/16 },
maxlines = 2,
color = "#000",
},
node_fields = {
description = S("White street sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_white.png" },
inventory_image = "signs_road_white.png",
},
},
- green_street_sign = {
+ blue_sign = {
+ depth = 1/16,
+ width = 1,
+ height = 7/16,
+ entity_fields = {
+ size = { x = 1, y = 6/16 },
+ maxlines = 2,
+ color = "#fff",
+ },
+ node_fields = {
+ description = S("Blue road sign"),
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_blue.png" },
+ inventory_image = "signs_road_blue.png",
+ },
+ },
+ green_sign = {
depth = 1/16,
width = 1,
height = 7/16,
entity_fields = {
- resolution = { x = 96, y = 64 },
+ size = { x = 1, y = 6/16 },
maxlines = 2,
color = "#fff",
},
node_fields = {
- description = S("Green street sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ description = S("Green road sign"),
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_green.png" },
inventory_image = "signs_road_green.png",
},
},
- yellow_street_sign = {
+ yellow_sign = {
depth = 1/16,
width = 1,
height = 7/16,
entity_fields = {
- resolution = { x = 96, y = 64 },
+ size = { x = 1, y = 6/16 },
maxlines = 2,
color = "#000",
},
node_fields = {
- description = S("Yellow street sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ description = S("Yellow road sign"),
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_yellow.png" },
inventory_image="signs_road_yellow.png",
},
},
+ red_sign = {
+ depth = 1/16,
+ width = 1,
+ height = 7/16,
+ entity_fields = {
+ size = { x = 1, y = 6/16 },
+ maxlines = 2,
+ color = "#fff",
+ },
+ node_fields = {
+ description = S("Red road sign"),
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_red.png" },
+ inventory_image = "signs_road_red.png",
+ },
+ },
black_right_sign = {
depth = 1/32,
width = 1,
height = 0.5,
entity_fields = {
- resolution = { x = 96, y = 64 },
+ aspect_ratio = 3/4,
+ size = { x = 1, y = 3/16 },
maxlines = 1,
color = "#000",
},
node_fields = {
description = S("Black direction sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_black_dir_right.png" },
inventory_image = "signs_road_black_dir_inventory.png",
signs_other_dir = "signs_road:black_left_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
},
},
black_left_sign = {
@@ -151,32 +184,127 @@ local models = {
width = 1,
height = 0.5,
entity_fields = {
- resolution = { x = 96, y = 64 },
+ aspect_ratio = 3/4,
+ size = { x = 1, y = 3/16 },
maxlines = 1,
color = "#000",
},
node_fields = {
description = S("Black direction sign"),
- tiles = { "signs_road_sides.png", "signs_road_sides.png",
- "signs_road_sides.png", "signs_road_sides.png",
+ tiles = { "signs_road_sides.png", "signs_road_sides.png",
+ "signs_road_sides.png", "signs_road_sides.png",
"signs_road_sides.png", "signs_road_black_dir_left.png" },
inventory_image = "signs_road_black_dir_inventory.png",
signs_other_dir = "signs_road:black_right_sign",
groups = { not_in_creative_inventory = 1 },
drop = "signs_road:black_right_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
+ },
+ },
+ white_right_sign = {
+ depth = 1/16,
+ width = 14/16,
+ height = 7/16,
+ entity_fields = {
+ right = -3/32,
+ size = { x = 12/16, y = 6/16 },
+ maxlines = 2,
+ color = "#000",
+ },
+ node_fields = {
+ description = S("White direction sign"),
+ tiles = { "signs_road_white_direction.png" },
+ inventory_image = "signs_road_white_dir_inventory.png",
+ signs_other_dir = "signs_road:white_left_sign",
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
+ drawtype = "mesh",
+ mesh = "signs_dir_right.obj",
+ selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ },
+ },
+ white_left_sign = {
+ depth = 1/16,
+ width = 14/16,
+ height = 7/16,
+ entity_fields = {
+ right = 3/32,
+ size = { x = 12/16, y = 6/16 },
+ maxlines = 2,
+ color = "#000",
+ },
+ node_fields = {
+ description = S("White direction sign"),
+ tiles = { "signs_road_white_direction.png" },
+ inventory_image = "signs_road_white_dir_inventory.png",
+ signs_other_dir = "signs_road:white_right_sign",
+ on_place=signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
+ drawtype = "mesh",
+ mesh = "signs_dir_left.obj",
+ selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
+ groups = { not_in_creative_inventory = 1 },
+ drop = "signs_road:white_right_sign",
+ },
+ },
+ blue_right_sign = {
+ depth = 1/16,
+ width = 14/16,
+ height = 7/16,
+ entity_fields = {
+ right = -3/32,
+ size = { x = 12/16, y = 6/16 },
+ maxlines = 2,
+ color = "#fff",
+ },
+ node_fields = {
+ description = S("Blue direction sign"),
+ tiles = { "signs_road_blue_direction.png" },
+ inventory_image = "signs_road_blue_dir_inventory.png",
+ signs_other_dir = "signs_road:blue_left_sign",
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
+ drawtype = "mesh",
+ mesh = "signs_dir_right.obj",
+ selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ },
+ },
+ blue_left_sign = {
+ depth = 1/16,
+ width = 14/16,
+ height = 7/16,
+ entity_fields = {
+ right = 3/32,
+ size = { x = 12/16, y = 6/16 },
+ maxlines = 2,
+ color="#fff",
+ },
+ node_fields = {
+ description = S("Blue direction sign"),
+ tiles = { "signs_road_blue_direction.png" },
+ inventory_image = "signs_road_blue_dir_inventory.png",
+ signs_other_dir = "signs_road:blue_right_sign",
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
+ drawtype = "mesh",
+ mesh = "signs_dir_left.obj",
+ selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
+ groups = { not_in_creative_inventory = 1 },
+ drop = "signs_road:blue_right_sign",
},
},
-
green_right_sign = {
depth = 1/16,
width = 14/16,
height = 7/16,
entity_fields = {
- right = -3/32,
+ right = -3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
color = "#fff",
},
@@ -185,12 +313,12 @@ local models = {
tiles = { "signs_road_green_direction.png" },
inventory_image = "signs_road_green_dir_inventory.png",
signs_other_dir = "signs_road:green_left_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
mesh = "signs_dir_right.obj",
selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
- collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
},
},
green_left_sign = {
@@ -198,9 +326,8 @@ local models = {
width = 14/16,
height = 7/16,
entity_fields = {
- right = 3/32,
+ right = 3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
color="#fff",
},
@@ -209,8 +336,8 @@ local models = {
tiles = { "signs_road_green_direction.png" },
inventory_image = "signs_road_green_dir_inventory.png",
signs_other_dir = "signs_road:green_right_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
mesh = "signs_dir_left.obj",
selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
@@ -224,9 +351,8 @@ local models = {
width = 14/16,
height = 7/16,
entity_fields = {
- right = -3/32,
+ right = -3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
color = "#000",
},
@@ -235,12 +361,12 @@ local models = {
tiles = { "signs_road_yellow_direction.png" },
inventory_image = "signs_road_yellow_dir_inventory.png",
signs_other_dir = "signs_road:yellow_left_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
mesh = "signs_dir_right.obj",
selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
- collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
},
},
yellow_left_sign = {
@@ -248,9 +374,8 @@ local models = {
width = 14/16,
height = 7/16,
entity_fields = {
- right = 3/32,
+ right = 3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
color = "#000",
},
@@ -259,64 +384,62 @@ local models = {
tiles = { "signs_road_yellow_direction.png" },
inventory_image = "signs_road_yellow_dir_inventory.png",
signs_other_dir = "signs_road:yellow_right_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
mesh = "signs_dir_left.obj",
selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
groups = { not_in_creative_inventory = 1 },
- drop = "signs_road:yellow_left_sign",
+ drop = "signs_road:yellow_right_sign",
},
},
- white_right_sign = {
+ red_right_sign = {
depth = 1/16,
width = 14/16,
height = 7/16,
entity_fields = {
- right = -3/32,
+ right = -3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
- color = "#000",
+ color = "#fff",
},
node_fields = {
- description = S("White direction sign"),
- tiles = { "signs_road_white_direction.png" },
- inventory_image = "signs_road_white_dir_inventory.png",
- signs_other_dir = "signs_road:white_left_sign",
- on_place = signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ description = S("Red direction sign"),
+ tiles = { "signs_road_red_direction.png" },
+ inventory_image = "signs_road_red_dir_inventory.png",
+ signs_other_dir = "signs_road:red_left_sign",
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
mesh = "signs_dir_right.obj",
selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
- collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
+ collision_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } },
},
},
- white_left_sign = {
+ red_left_sign = {
depth = 1/16,
width = 14/16,
height = 7/16,
entity_fields = {
- right = 3/32,
+ right = 3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
- color = "#000",
+ color = "#fff",
},
node_fields = {
- description = S("White direction sign"),
- tiles = { "signs_road_white_direction.png" },
- inventory_image = "signs_road_white_dir_inventory.png",
- signs_other_dir = "signs_road:white_right_sign",
- on_place=signs.on_place_direction,
- on_rightclick = signs.on_right_click_direction,
+ description = S("Red direction sign"),
+ tiles = { "signs_road_red_direction.png" },
+ inventory_image = "signs_road_red_dir_inventory.png",
+ signs_other_dir = "signs_road:red_right_sign",
+ on_place = signs_api.on_place_direction,
+ on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
mesh = "signs_dir_left.obj",
selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } },
groups = { not_in_creative_inventory = 1 },
- drop = "signs_road:white_right_sign",
+ drop = "signs_road:red_right_sign",
},
},
}
@@ -324,7 +447,5 @@ local models = {
-- Node registration
for name, model in pairs(models)
do
- signs.register_sign("signs_road", name, model)
+ signs_api.register_sign("signs_road", name, model)
end
-
-