1
0
mirror of https://github.com/D00Med/scifi_nodes.git synced 2024-12-22 08:00:18 +01:00

signs_api support and various large banner registrations

This commit is contained in:
BuckarooBanzay 2024-09-15 20:45:28 +02:00
parent 1159a02f76
commit 93bdcda2dd
4 changed files with 36 additions and 7 deletions

View File

@ -18,6 +18,7 @@ read_globals = {
"mesecon",
"unifieddyes",
"letters",
"signs_api",
"stealthnode",
"slats",
"mtt"

View File

@ -16,5 +16,6 @@ unifieddyes,
letters,
mesecons_stealthnode,
mtt,
slats
slats,
signs_api
"""

View File

@ -8,7 +8,9 @@
"white2": {
"description": "plastic",
"colorable": true,
"sounds": "stone"
"sounds": "stone",
"signs_banner": true,
"signs_banner_color": "#000"
},
"super_white": {
"description": "Super Plastic",
@ -68,7 +70,8 @@
"description": "metal mesh"
},
"black": {
"description": "black wall"
"description": "black wall",
"signs_banner": true
},
"blackoct": {
"description": "black octagon"
@ -89,7 +92,8 @@
"description": "blue bars"
},
"bluemetal": {
"description": "blue metal"
"description": "blue metal",
"signs_banner": true
},
"bluetile": {
"description": "blue tile",
@ -148,7 +152,8 @@
"colorable": true
},
"greenmetal": {
"description": "green metal wall"
"description": "green metal wall",
"signs_banner": true
},
"greenmetal2": {
"description": "green metal wall2"
@ -172,7 +177,8 @@
"description": "green pipes"
},
"grey": {
"description": "grey wall"
"description": "grey wall",
"signs_banner": true
},
"greybolts": {
"description": "grey wall bolts"
@ -276,7 +282,8 @@
"slat": true
},
"purple": {
"description": "Purple node"
"description": "Purple node",
"signs_banner": true
},
"rock": {
"description": "Moonstone",

View File

@ -2,6 +2,7 @@ local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
local has_moreblocks_mod = minetest.get_modpath("moreblocks")
local has_slats_mod = minetest.get_modpath("slats")
local has_advtrains_mod = minetest.get_modpath("advtrains")
local has_signs_api_mod = minetest.get_modpath("signs_api")
--nodes
@ -667,6 +668,25 @@ for name, def in pairs(nodes) do
advtrains.register_platform("scifi_nodes", "scifi_nodes:" .. name)
end
if has_signs_api_mod and def.signs_banner then
signs_api.register_sign("scifi_nodes", name .. "_banner", {
depth = 1/16,
width = 5,
height = 1,
entity_fields = {
maxlines = 1,
color = def.signs_banner_color or "#fff",
},
node_fields = {
visual_scale = 1,
description = name .. " banner",
tiles = tiles,
inventory_image = "scifi_nodes_" .. name .. ".png",
use_texture_alpha = "clip",
},
})
end
if has_slats_mod and def.slat then
slats.register_slat(
name,