Skip to content

Commit

Permalink
feat/docs: add light command
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Feb 1, 2024
1 parent 38cc896 commit 8c2414c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions lc-hax/Scripts/Commands/LightCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Hax;

[Command("/light")]
public class LightCommand : ICommand {
public void Execute(StringArray _) {
if (Helper.FindObject<ShipLights>() is not ShipLights shipLights) return;
shipLights.SetShipLightsServerRpc(!shipLights.areLightsOn);
}
}

0 comments on commit 8c2414c

Please sign in to comment.