aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Yves Rollo <dev@pyrollo.com>2018-11-26 21:05:58 +0100
committerPierre-Yves Rollo <dev@pyrollo.com>2018-11-26 21:05:58 +0100
commitba5b7aee52af1280fdb3c019bba3b5b92c001e96 (patch)
treeaef39558800aa8b87a93d2e319129783728559a6
parent52eb47626adc56c7fa188e1bae2c98ee1c98a723 (diff)
downloaddisplay_modpack-ba5b7aee52af1280fdb3c019bba3b5b92c001e96.tar.gz
display_modpack-ba5b7aee52af1280fdb3c019bba3b5b92c001e96.tar.bz2
display_modpack-ba5b7aee52af1280fdb3c019bba3b5b92c001e96.zip
Red and blue signs, node names tidy up
-rw-r--r--signs_road/compatibility.lua7
-rw-r--r--signs_road/crafts.lua130
-rw-r--r--signs_road/nodes.lua207
-rw-r--r--signs_road/textures/signs_road_blue.pngbin436 -> 302 bytes
-rw-r--r--signs_road/textures/signs_road_blue_dir_inventory.pngbin0 -> 377 bytes
-rw-r--r--signs_road/textures/signs_road_blue_direction.pngbin0 -> 1108 bytes
-rw-r--r--signs_road/textures/signs_road_blue_street.pngbin0 -> 436 bytes
-rw-r--r--signs_road/textures/signs_road_red.pngbin0 -> 282 bytes
-rw-r--r--signs_road/textures/signs_road_red_dir_inventory.pngbin0 -> 289 bytes
-rw-r--r--signs_road/textures/signs_road_red_direction.pngbin0 -> 1071 bytes
10 files changed, 284 insertions, 60 deletions
diff --git a/signs_road/compatibility.lua b/signs_road/compatibility.lua
index 9e6b29b..5fb673a 100644
--- a/signs_road/compatibility.lua
+++ b/signs_road/compatibility.lua
@@ -22,7 +22,7 @@
------------------------------------
local wallmounted_to_facedir = {
- [0]=1, -- Should not happend with signs
+ [0]=1, -- Should not happend with signs
[1]=1, -- Should not happend with signs
[2]=1,
[3]=3,
@@ -82,4 +82,9 @@ minetest.register_lbm({ name = "signs_road:conpatibility_2",
action = compatibility_check_2,
})
+-- Node name tidy up
+--------------------
+minetest.register_alias("signs_road:green_street_sign", "signs_road:green_sign")
+minetest.register_alias("signs_road:yellow_street_sign", "signs_road:yellow_sign")
+minetest.register_alias("signs_road:white_street_sign", "signs_road:white_sign")
diff --git a/signs_road/crafts.lua b/signs_road/crafts.lua
index 3c15437..314a91a 100644
--- a/signs_road/crafts.lua
+++ b/signs_road/crafts.lua
@@ -19,57 +19,54 @@
along with signs_road. If not, see <http://www.gnu.org/licenses/>.
--]]
+-- Standard rectangle signs
+
minetest.register_craft({
- output = 'signs_road:blue_street_sign 2',
+ output = 'signs_road:white_sign 2',
recipe = {
- {'dye:blue', 'dye:white', ''},
+ {'dye:white', 'dye:black', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
minetest.register_craft({
- output = 'signs_road:red_street_sign 2',
+ output = 'signs_road:blue_sign 2',
recipe = {
- {'dye:white', 'dye:red', ''},
+ {'dye:blue', 'dye:white', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
minetest.register_craft({
- output = 'signs_road:white_street_sign 2',
+ output = 'signs_road:green_sign 2',
recipe = {
- {'dye:white', 'dye:black', ''},
+ {'dye:green', 'dye:white', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
minetest.register_craft({
- type = "shapeless",
- output = 'signs_road:large_street_sign',
- recipe = {'signs_road:white_street_sign', 'signs_road:white_street_sign', 'signs_road:white_street_sign', 'signs_road:white_street_sign'},
-})
-
-minetest.register_craft({
- output = 'signs_road:green_street_sign 2',
+ output = 'signs_road:yellow_sign 2',
recipe = {
- {'dye:green', 'dye:white', ''},
+ {'dye:yellow', 'dye:black', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
minetest.register_craft({
- output = 'signs_road:yellow_street_sign 2',
+ output = 'signs_road:red_sign 2',
recipe = {
- {'dye:yellow', 'dye:black', ''},
+ {'dye:red', 'dye:white', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
+-- Standard direction signs
minetest.register_craft({
output = 'signs_road:black_right_sign 2',
@@ -81,6 +78,24 @@ minetest.register_craft({
})
minetest.register_craft({
+ output = 'signs_road:white_right_sign 2',
+ recipe = {
+ {'dye:white', 'dye:black', 'default:steel_ingot'},
+ {'default:steel_ingot', 'default:steel_ingot', ''},
+ {'', '', ''},
+ }
+})
+
+minetest.register_craft({
+ output = 'signs_road:blue_right_sign 2',
+ recipe = {
+ {'dye:blue', 'dye:white', 'default:steel_ingot'},
+ {'default:steel_ingot', 'default:steel_ingot', ''},
+ {'', '', ''},
+ }
+})
+
+minetest.register_craft({
output = 'signs_road:green_right_sign 2',
recipe = {
{'dye:green', 'dye:white', 'default:steel_ingot'},
@@ -92,18 +107,95 @@ minetest.register_craft({
minetest.register_craft({
output = 'signs_road:yellow_right_sign 2',
recipe = {
- {'dye:yellow', 'dye:white', 'default:steel_ingot'},
+ {'dye:yellow', 'dye:black', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', ''},
{'', '', ''},
}
})
minetest.register_craft({
- output = 'signs_road:white_right_sign 2',
+ output = 'signs_road:red_right_sign 2',
recipe = {
- {'dye:white', 'dye:black', 'default:steel_ingot'},
+ {'dye:red', 'dye:white', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', ''},
{'', '', ''},
}
})
+-- Transform Rectangle <-> Direction
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:white_right_sign',
+ recipe = {'signs_road:white_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:white_sign',
+ recipe = {'signs_road:white_right_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:blue_right_sign',
+ recipe = {'signs_road:blue_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:blue_sign',
+ recipe = {'signs_road:blue_right_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:green_right_sign',
+ recipe = {'signs_road:green_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:green_sign',
+ recipe = {'signs_road:green_right_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:yellow_right_sign',
+ recipe = {'signs_road:yellow_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:yellow_sign',
+ recipe = {'signs_road:yellow_right_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:red_right_sign',
+ recipe = {'signs_road:red_sign'},
+})
+
+minetest.register_craft({
+ type = 'shapeless', output = 'signs_road:red_sign',
+ recipe = {'signs_road:red_right_sign'},
+})
+
+-- Various signs
+
+minetest.register_craft({
+ output = 'signs_road:blue_street_sign 4',
+ recipe = {
+ {'dye:blue', 'dye:white', 'dye:blue'},
+ {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+ {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+ }
+})
+
+minetest.register_craft({
+ output = 'signs_road:red_street_sign 2',
+ recipe = {
+ {'dye:white', 'dye:red', 'dye:black'},
+ {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+ {'', '', ''},
+ }
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = 'signs_road:large_street_sign',
+ recipe = {'signs_road:white_street_sign', 'signs_road:white_street_sign', 'signs_road:white_street_sign', 'signs_road:white_street_sign'},
+})
diff --git a/signs_road/nodes.lua b/signs_road/nodes.lua
index b560e96..74eca23 100644
--- a/signs_road/nodes.lua
+++ b/signs_road/nodes.lua
@@ -33,10 +33,10 @@ local models = {
},
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 = {
@@ -50,8 +50,8 @@ local models = {
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",
},
@@ -67,13 +67,13 @@ local models = {
},
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,
@@ -84,13 +84,13 @@ local models = {
},
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,
@@ -100,14 +100,31 @@ local models = {
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("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 = {
+ size = { x = 1, y = 6/16 },
+ maxlines = 2,
+ color = "#fff",
+ },
+ node_fields = {
+ 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,
@@ -117,13 +134,30 @@ local models = {
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,
@@ -136,8 +170,8 @@ local models = {
},
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",
@@ -157,8 +191,8 @@ local models = {
},
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",
@@ -168,7 +202,102 @@ local models = {
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,
@@ -265,7 +394,7 @@ local models = {
drop = "signs_road:yellow_right_sign",
},
},
- white_right_sign = {
+ red_right_sign = {
depth = 1/16,
width = 14/16,
height = 7/16,
@@ -273,13 +402,13 @@ local models = {
right = -3/32,
size = { x = 12/16, y = 6/16 },
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",
+ 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",
@@ -288,7 +417,7 @@ local models = {
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,
@@ -296,21 +425,21 @@ local models = {
right = 3/32,
size = { x = 12/16, y = 6/16 },
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_api.on_place_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",
},
},
}
@@ -320,5 +449,3 @@ for name, model in pairs(models)
do
signs_api.register_sign("signs_road", name, model)
end
-
-
diff --git a/signs_road/textures/signs_road_blue.png b/signs_road/textures/signs_road_blue.png
index 540a390..51dc83b 100644
--- a/signs_road/textures/signs_road_blue.png
+++ b/signs_road/textures/signs_road_blue.png
Binary files differ
diff --git a/signs_road/textures/signs_road_blue_dir_inventory.png b/signs_road/textures/signs_road_blue_dir_inventory.png
new file mode 100644
index 0000000..426c997
--- /dev/null
+++ b/signs_road/textures/signs_road_blue_dir_inventory.png
Binary files differ
diff --git a/signs_road/textures/signs_road_blue_direction.png b/signs_road/textures/signs_road_blue_direction.png
new file mode 100644
index 0000000..bba2b00
--- /dev/null
+++ b/signs_road/textures/signs_road_blue_direction.png
Binary files differ
diff --git a/signs_road/textures/signs_road_blue_street.png b/signs_road/textures/signs_road_blue_street.png
new file mode 100644
index 0000000..540a390
--- /dev/null
+++ b/signs_road/textures/signs_road_blue_street.png
Binary files differ
diff --git a/signs_road/textures/signs_road_red.png b/signs_road/textures/signs_road_red.png
new file mode 100644
index 0000000..5614f6f
--- /dev/null
+++ b/signs_road/textures/signs_road_red.png
Binary files differ
diff --git a/signs_road/textures/signs_road_red_dir_inventory.png b/signs_road/textures/signs_road_red_dir_inventory.png
new file mode 100644
index 0000000..4d9d559
--- /dev/null
+++ b/signs_road/textures/signs_road_red_dir_inventory.png
Binary files differ
diff --git a/signs_road/textures/signs_road_red_direction.png b/signs_road/textures/signs_road_red_direction.png
new file mode 100644
index 0000000..632a925
--- /dev/null
+++ b/signs_road/textures/signs_road_red_direction.png
Binary files differ