From 8c2414cf354571b929af063eb098b72e27828175 Mon Sep 17 00:00:00 2001 From: winstxnhdw Date: Thu, 1 Feb 2024 16:45:16 +0800 Subject: [PATCH] feat/docs: add `light` command --- README.md | 1 + lc-hax/Scripts/Commands/LightCommand.cs | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 lc-hax/Scripts/Commands/LightCommand.cs diff --git a/README.md b/README.md index a5d7cd62..1141fffc 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ The complete feature set includes the following. | Upset all turrets | `/berserk` | | Turn invisible to players | `/invis` | | Clear the chat for everyone | `/clear` | +| Toggle ship lights | `/light` | ### Binds diff --git a/lc-hax/Scripts/Commands/LightCommand.cs b/lc-hax/Scripts/Commands/LightCommand.cs new file mode 100644 index 00000000..a8147385 --- /dev/null +++ b/lc-hax/Scripts/Commands/LightCommand.cs @@ -0,0 +1,9 @@ +using Hax; + +[Command("/light")] +public class LightCommand : ICommand { + public void Execute(StringArray _) { + if (Helper.FindObject() is not ShipLights shipLights) return; + shipLights.SetShipLightsServerRpc(!shipLights.areLightsOn); + } +}