Features
- Automatically adds a search light to deployable drones (requires permission)
- Allows remotely toggling the light on and off
- Allows remotely aiming the light with mouse movements (requires permission)
Installation
- Add the plugin to the
oxide/pluginsdirectory of your Rust server installation - Grant the
dronelights.searchlight.autodeploypermission to players or groups whose drones should have search lights - Reload the plugin if you want to automatically add lights to any existing drones (if they were deployed by players with the above permission)
Note: The search light entity may not be visible in most cases due to client-side issues with parenting entities. However, rest assured it is present and the light can be toggled while the drone is being controlled at a computer station. The light beam will be visible even if the search light entity is not.
Permissions
dronelights.searchlight.autodeploy-- Drones deployed by players with this permission will automatically have a search light.- Note: Reloading the plugin will automatically add search lights to existing drones owned by players with this permission.
dronelights.searchlight.move-- Allows the player to aim the search light vertically using mouse movements while controlling the drone.- Note: Moving the search light has a small performance cost. This is intentionally reported to Oxide as part of the plugin's total hook time so that you can measure the performance impact on your server.
Configuration
Default configuration:
{
"SearchLight": {
"DefaultAngle": 75
}
}
SearchLightDefaultAngle(0-180) -- The default angle that the search light will be aiming when spawned.0= Down90= Forward180= Up
FAQ
How do I toggle the light on and off?
Press your secondary fire button. Previously, the plugin was able to detect the vanilla action for toggling lights, but a Rust update made it so that command is no longer sent to the server while the player is mounted to a computer station, so that can no longer be detected.
Recommended compatible plugins
Drone balance:
- Drone Settings -- Allows changing speed, toughness and other properties of RC drones.
- Targetable Drones -- Allows RC drones to be targeted by Auto Turrets and SAM Sites.
- Limited Drone Range -- Limits how far RC drones can be controlled from computer stations.
Drone fixes and improvements:
- Better Drone Collision -- Overhauls RC drone collision damage so it's more intuitive.
- Auto Flip Drones -- Auto flips upside-down RC drones when a player takes control.
- Drone Hover -- Allows RC drones to hover in place while not being controlled.
Drone attachments:
- Drone Lights (This plugin) -- Adds controllable search lights to RC drones.
- Drone Turrets -- Allows players to deploy auto turrets to RC drones.
- Drone Storage -- Allows players to deploy a small stash to RC drones.
- Ridable Drones -- Allows players to ride RC drones by standing on them or mounting a chair.
Developer Hooks
OnDroneSearchLightDeploy
- Called when this plugin is about to deploy a search light onto a drone
- Returning
falsewill prevent the search light from being deployed - Returning
nullwill result in the default behavior
object OnDroneSearchLightDeploy(Drone drone)
OnDroneSearchLightDeployed
- Called after this plugin has deployed a search light onto a drone
- No return behavior
void OnDroneSearchLightDeployed(Drone drone, SearchLight searchLight)
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.
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.

