Commit graph

3 commits

Author SHA1 Message Date
edf6a8a14e Map Module 0.2.5: icon culling, EOTD, gear menu icons, font fix
Icon culling hides car icons when zoomed out past a configurable threshold
(default 40%), keeping only locomotive icons visible. Locos scale up
automatically when culling is active (configurable boost). An option also
hides MU trailing units. All managed by the new MapIconCuller class with
smooth fade transitions.

EOTD (End-of-Train Device): a blinking red dot at the rear of each consist.
Shown by default when car icons are hidden. Dot size and visibility conditions
are configurable. Implemented in EotdSystem as a programmatically generated
circle texture to avoid asset dependencies.

Added an Icons submenu to the gear menu containing all icon and EOTD settings.
Controls grey out to reflect dependencies: culling sub-settings (MU hide, loco
boost, EOTD) grey out when culling is off; EOTD dot size and hide-when-visible
grey out when EOTD is off. Changes round-trip via UICmd events, persist to
PopoutSettings, and call MapIconCuller.Refresh(). Native state is seeded from
C# on window init via RRPOPOUT_SetIconCullingState.

Settings completeness: added Right-click recenters toggle and Map BG opacity
slider to the UMM settings panel (were only accessible from the gear menu).

Replaced four FindObjectOfType<MapWindow> calls with PanelFinder.GetMapWindow().

Fixed AV false-positive on release zips: ImGui's built-in font blob contained
the substring "UPX", matching the heuristic for UPX-packed binaries. Added
IMGUI_DISABLE_DEFAULT_FONT to strip the blob; ProggyClean.ttf is now shipped
as a separate file alongside the DLL and loaded at runtime instead.
2026-06-22 18:46:12 -04:00
a4d3cd1621 feat(map): S3 v0.2.1 - in-game overlay, M/F10, popout restore
Replace the bare-bones stock map with a full Dear ImGui in-game overlay
(M key). The overlay shares the same toolbar and compass as the OS popout
window: Follow, Pop Out, Gear, rotation compass.

Pop Out button is now in the bottom toolbar where it is actually visible.
Pressing it (or F10) closes the overlay, waits 0.5 s for the camera to
release, then opens the OS popout window. Closing the popout restores the
overlay if it was running when the launch was triggered. Pressing M while
the popout is open closes the popout and reopens the overlay.

Harmony patches intercept MapWindow.Toggle and Show so base-game "Show on
map" links and the map hotkey both route through the S3 overlay. MapBypass
lets internal S3 calls through without triggering the patch recursively.

Camera ownership is enforced in LateUpdate so no base-game script can reset
targetTexture before the camera renders. Object.Destroy replaces Release()
on both RT teardown paths so the D3D address stays live until end-of-frame
and cannot be recycled into a new RT mid-frame.
2026-06-17 22:25:48 -04:00
a1fcf01125 Initial commit: S3 - Seton's Special Sauce v0.2.0
Consolidates two standalone Railroader mods into one UMM "everything mod"
with an optional-module framework. Modules are disabled by default and
toggled per-module from the S3 settings page.

Core framework:
- IModule contract plus ModuleRegistry, with each module owning a Harmony
  instance scoped by its id so only enabled modules patch the game
- Per-module flat JSON settings (SettingsStore). On this Mono runtime
  JsonUtility silently drops nested custom-class fields, so settings stay flat
- Foldout-per-module settings panel plus a detector that offers to disable the
  old standalone mods if they are still installed

Modules (moved over to parity, verified in-game):
- Physics Optimizer (was RailroaderPhysicsOverhaul): LOD fast-path and
  auto-freeze, profiler overlay, debug car tinting, /rpf console commands
- Map Popout (was RRPopout): native map detach window. Pure-UMM install that
  drops the winhttp proxy and LoadLibrary's RRPopout.dll from the mod folder.
  Native Win32 + D3D11 + Dear ImGui engine included. Fixes a latent break where
  the now-private MapBuilder.UpdateForZoom() is reached via Traverse.

Build: dotnet for the managed assembly (netstandard2.1) and CMake for the
native DLL. build-local.ps1 installs into the game, build-release.ps1 packages
the UMM drag-install zip.
2026-06-17 14:17:41 -04:00