MrGlim-MapClickCodes icon

MapClickCodes

Click code markers on the main ship radar to activate terminal codes (doors, turrets, mines, traps).

Last updated 18 hours ago
Total downloads 117
Total rating 0 
Categories Mods Tweaks & Quality Of Life AI Generated
Dependency string MrGlim-MapClickCodes-1.0.3
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

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.mapScreen mesh (not CrewMonitors clones, not other cameras).
  • Robust hits (1.0.3)RaycastAll prefers the real map mesh; falls back to mesh Collider.Raycast, Bounds.IntersectRay, and (under force context) closest-on-bounds so map interacts almost never miss the screen. Multi-UV scoring (axis orientations × flips) plus ray-to-marker world distance.
  • Precise markers — mesh UV → mapCamera viewport, then AABB (+ padding), nearest-center, or viewport-ray distance against each TerminalAccessibleObject.mapRadarObject. 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). Clients retry hello sync until the host acknowledges.
  • Host-authoritative activate — non-host players hit-test locally, then the host runs CallFunctionFromTerminal (local SFX on the clicker is fine).
  • SFX — plays the terminal code-broadcast animation/sound when available.
  • Diagnostics — one Info line per map click / radar-switch attempt (colliders, via= path, UV, markers, hit/miss), including resolve failures. Enable VerboseLogging for extra detail.

How to use

  1. Stand in the ship and look at the large main map / radar monitor.
  2. Aim at a green/red code box on the radar feed.
  3. 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 Extra UV / match traces
HitRadius 0.022 Extra UV padding around marker rects (old 0.012 still works; internal min size raised)
FlipUvV true Prefer V-flip when ranking UV candidates (all flip/orientation variants are still tried)
InteractRange 4.5 Max ray distance to the screen mesh

Networking

Non-host clients with the mod send a named Netcode activate request to the host after a successful marker hit. The host validates the TerminalAccessibleObject (NetworkObjectId, with object-code fallback) and calls CallFunctionFromTerminal(). Door/turret/mine behaviour continues to use the object's own UnityEvents / ServerRpcs, so activation syncs like typing a code.

Both host and clients should install this mod from Thunderstore so everyone can click markers. Host must enable it for the lobby. Clients without the mod still see synced activations when someone else clicks, but cannot click themselves.

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.