About Extended Switch
The Extended Switch plugin enhances the functionality of Rust's deployable switches by automatically attaching them to various entities like turrets, SAM sites, electric furnaces, and electrical heaters. With this plugin, players can control these entities easily while ensuring that their functionality respects server permissions and configurations.
Features:
Automatic Switch Attachment:
Attaches an electric switch to specific entities upon their spawn:
Auto Turrets
SAM Sites
Electric Furnaces
Electrical Heaters
Toggle Functionality:
Players can use the attached switch to toggle the state of the parent entity (e.g., turning a turret or SAM site on/off).
Includes support for toggling furnaces and heaters without requiring direct interaction with the entity.
Permission-Based Control:
Separate permissions for controlling each type of entity ensure players can only toggle entities they're authorized for:
extendedswitch.turretuse: Toggle Auto Turrets.
extendedswitch.samuse: Toggle SAM Sites.
extendedswitch.electricfurnaceuse: Toggle Electric Furnaces.
extendedswitch.electricalheateruse: Toggle Electrical Heaters.
Configurable Power Requirement:
Need Electric? setting determines if entities require electricity to function when toggled by the switch.
Disabling this option allows toggling entities even if they're unpowered.
Pickup Restriction:
Prevents players from picking up switches attached to specific entities, ensuring the setup remains intact.
Configuration:
The plugin includes a simple configuration file with the following option:
Need Electric? (Boolean): Determines if entities require electricity to toggle. Default: true.
Example Configuration File:
{
"Need Electric?": true
}
How It Works:
Entity Spawn Handling:
When an Auto Turret, SAM Site, Electric Furnace, or Electrical Heater spawns, a switch is automatically created and attached to the entity.
Switch Interaction:
Players interact with the switch to toggle the parent entity's state.
The plugin checks permissions and configuration settings before executing the toggle action.
Power Control:
If power is required (Need Electric? is true), the plugin prevents toggling when the entity lacks electricity.
Otherwise, toggling works regardless of the power status.
Benefits:
Simplifies management of deployable entities with automated switch attachment.
Improves gameplay by providing players with convenient control over their entities.
Customizable power requirements allow for flexibility in server rules and playstyle.
This plugin is ideal for Rust server administrators who want to enhance the usability of deployable switches and streamline control over critical entities like turrets and furnaces.