From e519d3c6e09258f3f23d316cfd07d9cff7183f46 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Sun, 15 Sep 2024 19:42:47 +0200 Subject: [PATCH] add advtrains platform registration for `stripes` node --- .luacheckrc | 1 + mod.conf | 1 + nodes.json | 3 ++- nodes.lua | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.luacheckrc b/.luacheckrc index ab44472..08b730a 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -15,6 +15,7 @@ read_globals = { "dump", -- optional deps + "advtrains", "default", "stairsplus", "xpanes", diff --git a/mod.conf b/mod.conf index 8a4629e..460683e 100644 --- a/mod.conf +++ b/mod.conf @@ -1,6 +1,7 @@ name = scifi_nodes description = Minetest mod that adds scifi themed blocks, doors, materials, plants and other assets. optional_depends = """ +advtrains, default, xpanes, mesecons, diff --git a/nodes.json b/nodes.json index 668d05a..0f54545 100644 --- a/nodes.json +++ b/nodes.json @@ -58,7 +58,8 @@ }, "stripes": { "description": "hazard stripes", - "slat": true + "slat": true, + "advtrains_platform": true }, "rust": { "description": "rusty metal" diff --git a/nodes.lua b/nodes.lua index 940bc16..e42fb7b 100644 --- a/nodes.lua +++ b/nodes.lua @@ -1,6 +1,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") --nodes @@ -661,6 +662,11 @@ for name, def in pairs(nodes) do }) end + -- advtrains platform registration + if has_advtrains_mod and def.advtrains_platform then + advtrains.register_platform("scifi_nodes", "scifi_nodes:" .. name) + end + if has_slats_mod and def.slat then slats.register_slat( name,