1
0
mirror of https://github.com/mt-mods/signs_lib.git synced 2024-12-24 08:10:17 +01:00
signs_lib/standard_signs.lua

69 lines
3.0 KiB
Lua
Raw Normal View History

-- Definitions for standard minetest_game wooden and steel wall signs
signs_lib.register_sign("default:sign_wall_wood", {
description = "Wooden wall sign",
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
tiles = {
"signs_lib_sign_wall_wooden.png",
"signs_lib_sign_wall_wooden_edges.png",
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
-- items 3 - 5 are not set, so signs_lib will use its standard pole
-- mount, hanging, and yard sign stick textures.
},
entity_info = "standard",
allow_hanging = true,
allow_widefont = true,
allow_onpole = true,
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
allow_onpole_horizontal = true,
allow_yard = true
})
signs_lib.register_sign("default:sign_wall_steel", {
description = "Steel wall sign",
inventory_image = "signs_lib_sign_wall_steel_inv.png",
tiles = {
"signs_lib_sign_wall_steel.png",
"signs_lib_sign_wall_steel_edges.png",
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
nil, -- not set, so it'll use the standard pole mount texture
nil, -- not set, so it'll use the standard hanging chains texture
"default_steel_block.png" -- for the yard sign's stick
},
groups = signs_lib.standard_steel_groups,
sounds = signs_lib.standard_steel_sign_sounds,
locked = true,
entity_info = "standard",
allow_hanging = true,
allow_widefont = true,
allow_onpole = true,
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
allow_onpole_horizontal = true,
allow_yard = true
})
minetest.register_alias("signs:sign_hanging", "default:sign_wood_hanging")
minetest.register_alias("basic_signs:hanging_sign", "default:sign_wood_hanging")
minetest.register_alias("signs:sign_yard", "default:sign_wood_yard")
minetest.register_alias("basic_signs:yard_sign", "default:sign_wood_yard")
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
minetest.register_alias("default:sign_wall_wood_onpole", "default:sign_wood_onpole")
minetest.register_alias("default:sign_wall_wood_onpole_horiz", "default:sign_wood_onpole_horiz")
minetest.register_alias("default:sign_wall_wood_hanging", "default:sign_wood_hanging")
minetest.register_alias("default:sign_wall_wood_yard", "default:sign_wood_yard")
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
minetest.register_alias("default:sign_wall_steel_onpole", "default:sign_steel_onpole")
minetest.register_alias("default:sign_wall_steel_onpole_horiz", "default:sign_steel_onpole_horiz")
minetest.register_alias("default:sign_wall_steel_hanging", "default:sign_steel_hanging")
minetest.register_alias("default:sign_wall_steel_yard", "default:sign_steel_yard")
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
table.insert(signs_lib.lbm_restore_nodes, "signs:sign_hanging")
table.insert(signs_lib.lbm_restore_nodes, "basic_signs:hanging_sign")
API changes to allow for more mounting styles NODE NAMES: The base name of a node can be whatever you want. The basic wall sign will keep the node name you give, while its hanging, on-pole, and yard variants will, where applicable, use the same name, with "_onpole", "_hanging", or "_yard" appended. One exception: If your node has "_wall" in its name, that bit will be stripped-out when generating the above node variations. For example: "default:sign_wall_wood" ...will become... "default:sign_wood_onpole" "default:sign_wood_hanging" "default:sign_wood_yard" MODELS: The base sign model and entity files must now be named: sign: mymod_foosign_wall.obj mymod_foosign_facedir_wall.obj entity: mymod_foosign_entity_wall.obj their other variants, where applicable, must be: mymod_foosign_onpole.obj mymod_foosign_hanging.obj mymod_foosign_yard.obj mymod_foosign_entity_onpole.obj mymod_foosign_entity_hanging.obj mymod_foosign_entity_yard.obj For `facedir` signs, the "_facedir" in the base sign model filename is automatically stripped from the name when generating the entity model filename, as entities don't have a concept of wallmounted/facedir/etc. For example: "mymod_foosign_facedir_wall.obj" ...will become... "mymod_foosign_entity_wall.obj" * allow passing custom onpole, hanging, and yard sign models, for situations where the filename(s) thereof can't be derived from the base sign model filename. * allow passing a custom pole mount, hanging, and yard sign stick textures as the third, fourth, and fifth tiles{} entries, respectively (independent of the above model file option) * fine-tuned the pole mount on the standard sign models to eliminate overlapping faces (so it looks better with basic_signs' glass sign. * Move basic_signs wooden yard sign back to signs_lib.
2019-09-26 06:48:53 +02:00
table.insert(signs_lib.lbm_restore_nodes, "signs:sign_yard")
table.insert(signs_lib.lbm_restore_nodes, "basic_signs:yard_sign")
table.insert(signs_lib.lbm_restore_nodes, "default:sign_wood_yard")
table.insert(signs_lib.lbm_restore_nodes, "default:sign_wall_wood_yard")
-- insert the old wood sign-on-fencepost into signs_lib's conversion LBM
table.insert(signs_lib.old_fenceposts_with_signs, "signs:sign_post")
signs_lib.old_fenceposts["signs:sign_post"] = "default:fence_wood"
signs_lib.old_fenceposts_replacement_signs["signs:sign_post"] = "default:sign_wall_wood_onpole"