There is.
The easiest way requires the following:
1) A big switch NPC that registers a new palace switch color:
Code: Select all
local bigSwitch = {}
local npcManager = require("npcManager")
local palaceSwitch = require("npcs/ai/palaceswitch")
local npcID = NPC_ID
local settings = {id=npcID, color="purple", speed = 1, blockon=999, blockoff=1000, iscustomswitch = true}
palaceSwitch.registerSwitch(settings)
return bigSwitch
It sets the IDs of palace switch blocks here in blockon and blockoff. You can set them to any ID of block you want. If you add your own, make sure to use the
custom range.
2) The particles for its emission.
These are easily added by having a "particles" folder in your episode folder, with a "switch" subfolder and "part_purple.png" for the texture. Or "part_orange" if it's orange switch, etc... Whatever you set color to in the lua file up there ^^
Once these things are prepared, your added global switch should work.