WhiteThunder
Changes wire & hose colors while they are providing insufficient power or fluid

Supported Games
GameServerKingsGameServerKings

Features

  • Changes the color of electrical wires while they are providing 0 or insufficient power (default: red)
  • Changes the color of hoses while they are providing 0 fluid (default: red)
  • Restores the original wire or hose color when sufficient power or fluid starts flowing

Permissions

  • dynamicwirecolors.use -- While the plugin is configured with "RequiresPermission": true (default), wires connecting player-owned entities will only be dynamically colored if at least one of the entities was deployed by a player with this permission.

Configuration

Default configuration:

{
  "InsufficientPowerColor": "Red",
  "InsufficientFluidColor": "Red",
  "RequiresPermission": true,
  "AppliesToUnownedEntities": false
}
  • InsufficientPowerColor -- Color to use for electrical wires that are providing 0 or insufficient power.
    • Allowed values: "Gray" | "Red" | "Green" | "Blue" | "Yellow" | "LightBlue" | "Orange" | "Pink" | "Purple" | "White"
  • InsufficientFluidColor -- Color to use while for hoses that are providing 0 fluid.
    • Allowed values: "Gray" | "Red" | "Green" | "Blue" | "Yellow" | "LightBlue" | "Orange" | "Pink" | "Purple" | "White"
  • RequiresPermission (true or false) -- While true (default), wires connecting player-owned entities will only be dynamically colored if at least one of the entities was deployed by a player with the dynamicwirecolors.use permission. While false, wires connected to any player-owned entity will be dynamically colored, as though you had granted the permission to all players.
  • AppliesToUnownedEntities (true or false) -- While true, wires and hoses connecting unowned entities (entities that have OwnerID set to 0) will be dynamically colored. For example, this applies to entities at monuments, as well as to modular car tanker modules. While false (default), wires connecting unowned entities will not be affected by the plugin.

Developer Hooks

OnDynamicWireColorChange

bool? OnDynamicWireColorChange(IOEntity ioEntity, IOEntity.IOSlot slot, WireTool.WireColour color)
  • Called when this plugin is about to change the wire or hose color of an entity's slot
  • Returning false will prevent the wire color from being changed
  • Returning null will allow the wire color to be changed
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.