
MapClickCodes
Click code markers on the main ship radar to activate terminal codes (doors, turrets, mines, traps).MapClickCodes
Click a terminal code marker (door / turret / mine / trap / etc.) on the main ship radar screen to activate that object's code — same effect as typing the code into the terminal.
Features
- Main radar only — uses
StartOfRound.mapScreenmesh (not CrewMonitors clones, not other cameras). - Precise hits — raycast → mesh UV →
mapCameraviewport, then tests against eachTerminalAccessibleObject.mapRadarObjectRectTransform (code box size + small configurable padding). Empty map areas do nothing. - Vanilla-friendly — missing a marker still allows normal monitor / radar target switching.
- Host-gated — click-to-code is active only when the lobby host has this mod enabled (same fairness pattern as other MrGlim advantage QoL mods).
- SFX — plays the terminal code-broadcast animation/sound when available.
How to use
- Stand in the ship and look at the large main map / radar monitor.
- Aim at a green/red code box on the radar feed.
- Press Interact (E) — that object's terminal code runs (
CallFunctionFromTerminal).
Config (BepInEx/config/com.benhough.lethal.MapClickCodes.cfg)
| Key | Default | Notes |
|---|---|---|
| Enabled | true | Master toggle |
| VerboseLogging | false | UV / match traces |
| HitRadius | 0.012 | Extra UV padding around marker rects |
| FlipUvV | true | Flip V when mapping mesh UV → viewport (toggle if vertically inverted) |
| InteractRange | 4.5 | Max ray distance to the screen mesh |
Networking
CallFunctionFromTerminal() is what the terminal itself calls after a typed code. Door/turret/mine behaviour continues to use the object's own UnityEvents / ServerRpcs, so activation syncs like typing a code.
Host must install and enable the mod for click-to-code to work for anyone in the lobby. Clients without the mod still get synced activations when someone with the mod clicks. Both host and clients should install so everyone can use the QoL.
This is a convenience over walking to the terminal — treat it as an advantage feature for your lobby rules.
Dependencies
- BepInExPack only (no OpenBodyCams).
Credits
Ben Hough (MrGlim) — Thunderstore team MrGlim.