mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-22 16:10:18 +01:00
signs_api support and various large banner registrations
This commit is contained in:
parent
1159a02f76
commit
93bdcda2dd
@ -18,6 +18,7 @@ read_globals = {
|
|||||||
"mesecon",
|
"mesecon",
|
||||||
"unifieddyes",
|
"unifieddyes",
|
||||||
"letters",
|
"letters",
|
||||||
|
"signs_api",
|
||||||
"stealthnode",
|
"stealthnode",
|
||||||
"slats",
|
"slats",
|
||||||
"mtt"
|
"mtt"
|
||||||
|
3
mod.conf
3
mod.conf
@ -16,5 +16,6 @@ unifieddyes,
|
|||||||
letters,
|
letters,
|
||||||
mesecons_stealthnode,
|
mesecons_stealthnode,
|
||||||
mtt,
|
mtt,
|
||||||
slats
|
slats,
|
||||||
|
signs_api
|
||||||
"""
|
"""
|
||||||
|
19
nodes.json
19
nodes.json
@ -8,7 +8,9 @@
|
|||||||
"white2": {
|
"white2": {
|
||||||
"description": "plastic",
|
"description": "plastic",
|
||||||
"colorable": true,
|
"colorable": true,
|
||||||
"sounds": "stone"
|
"sounds": "stone",
|
||||||
|
"signs_banner": true,
|
||||||
|
"signs_banner_color": "#000"
|
||||||
},
|
},
|
||||||
"super_white": {
|
"super_white": {
|
||||||
"description": "Super Plastic",
|
"description": "Super Plastic",
|
||||||
@ -68,7 +70,8 @@
|
|||||||
"description": "metal mesh"
|
"description": "metal mesh"
|
||||||
},
|
},
|
||||||
"black": {
|
"black": {
|
||||||
"description": "black wall"
|
"description": "black wall",
|
||||||
|
"signs_banner": true
|
||||||
},
|
},
|
||||||
"blackoct": {
|
"blackoct": {
|
||||||
"description": "black octagon"
|
"description": "black octagon"
|
||||||
@ -89,7 +92,8 @@
|
|||||||
"description": "blue bars"
|
"description": "blue bars"
|
||||||
},
|
},
|
||||||
"bluemetal": {
|
"bluemetal": {
|
||||||
"description": "blue metal"
|
"description": "blue metal",
|
||||||
|
"signs_banner": true
|
||||||
},
|
},
|
||||||
"bluetile": {
|
"bluetile": {
|
||||||
"description": "blue tile",
|
"description": "blue tile",
|
||||||
@ -148,7 +152,8 @@
|
|||||||
"colorable": true
|
"colorable": true
|
||||||
},
|
},
|
||||||
"greenmetal": {
|
"greenmetal": {
|
||||||
"description": "green metal wall"
|
"description": "green metal wall",
|
||||||
|
"signs_banner": true
|
||||||
},
|
},
|
||||||
"greenmetal2": {
|
"greenmetal2": {
|
||||||
"description": "green metal wall2"
|
"description": "green metal wall2"
|
||||||
@ -172,7 +177,8 @@
|
|||||||
"description": "green pipes"
|
"description": "green pipes"
|
||||||
},
|
},
|
||||||
"grey": {
|
"grey": {
|
||||||
"description": "grey wall"
|
"description": "grey wall",
|
||||||
|
"signs_banner": true
|
||||||
},
|
},
|
||||||
"greybolts": {
|
"greybolts": {
|
||||||
"description": "grey wall bolts"
|
"description": "grey wall bolts"
|
||||||
@ -276,7 +282,8 @@
|
|||||||
"slat": true
|
"slat": true
|
||||||
},
|
},
|
||||||
"purple": {
|
"purple": {
|
||||||
"description": "Purple node"
|
"description": "Purple node",
|
||||||
|
"signs_banner": true
|
||||||
},
|
},
|
||||||
"rock": {
|
"rock": {
|
||||||
"description": "Moonstone",
|
"description": "Moonstone",
|
||||||
|
20
nodes.lua
20
nodes.lua
@ -2,6 +2,7 @@ local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
|
|||||||
local has_moreblocks_mod = minetest.get_modpath("moreblocks")
|
local has_moreblocks_mod = minetest.get_modpath("moreblocks")
|
||||||
local has_slats_mod = minetest.get_modpath("slats")
|
local has_slats_mod = minetest.get_modpath("slats")
|
||||||
local has_advtrains_mod = minetest.get_modpath("advtrains")
|
local has_advtrains_mod = minetest.get_modpath("advtrains")
|
||||||
|
local has_signs_api_mod = minetest.get_modpath("signs_api")
|
||||||
|
|
||||||
--nodes
|
--nodes
|
||||||
|
|
||||||
@ -667,6 +668,25 @@ for name, def in pairs(nodes) do
|
|||||||
advtrains.register_platform("scifi_nodes", "scifi_nodes:" .. name)
|
advtrains.register_platform("scifi_nodes", "scifi_nodes:" .. name)
|
||||||
end
|
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
|
if has_slats_mod and def.slat then
|
||||||
slats.register_slat(
|
slats.register_slat(
|
||||||
name,
|
name,
|
||||||
|
Loading…
Reference in New Issue
Block a user