Red and blue signs, node names tidy up

This commit is contained in:
Pierre-Yves Rollo 2018-11-26 21:05:58 +01:00
parent 52eb47626a
commit ba5b7aee52
10 changed files with 291 additions and 67 deletions

@ -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")

@ -19,26 +19,10 @@
along with signs_road. If not, see <http://www.gnu.org/licenses/>.
--]]
minetest.register_craft({
output = 'signs_road:blue_street_sign 2',
recipe = {
{'dye:blue', 'dye:white', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
-- Standard rectangle signs
minetest.register_craft({
output = 'signs_road:red_street_sign 2',
recipe = {
{'dye:white', 'dye:red', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
minetest.register_craft({
output = 'signs_road:white_street_sign 2',
output = 'signs_road:white_sign 2',
recipe = {
{'dye:white', 'dye:black', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
@ -47,13 +31,16 @@ minetest.register_craft({
})
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'},
output = 'signs_road:blue_sign 2',
recipe = {
{'dye:blue', 'dye:white', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', '', ''},
}
})
minetest.register_craft({
output = 'signs_road:green_street_sign 2',
output = 'signs_road:green_sign 2',
recipe = {
{'dye:green', 'dye:white', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
@ -62,7 +49,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'signs_road:yellow_street_sign 2',
output = 'signs_road:yellow_sign 2',
recipe = {
{'dye:yellow', 'dye:black', ''},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
@ -70,6 +57,16 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'signs_road:red_sign 2',
recipe = {
{'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',
@ -80,6 +77,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 = {
@ -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'},
})

@ -35,8 +35,8 @@ local models = {
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",
"signs_road_sides.png", "signs_road_blue_street.png" },
inventory_image = "signs_road_blue_street.png",
},
},
large_street_sign = {
@ -73,7 +73,7 @@ local models = {
inventory_image="signs_road_red_white.png",
},
},
white_street_sign = {
white_sign = {
depth = 1/16,
width = 1,
height = 7/16,
@ -90,7 +90,7 @@ local models = {
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"),
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"),
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,
@ -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,13 +425,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_right_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_right_sign",
on_place = signs_api.on_place_direction,
on_rightclick = signs_api.on_right_click_direction,
drawtype = "mesh",
@ -310,7 +439,7 @@ local models = {
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB