Skip to content

feat: station-interior zoom-out (interior_zoom_scale) - #332

Merged
netniV merged 1 commit into
STFC-Mod:devfrom
kcid9660:pr/interior-zoom
Oct 17, 2026
Merged

netniV merged 1 commit into
STFC-Mod:devfrom
kcid9660:pr/interior-zoom

Conversation

@kcid9660

@kcid9660 kcid9660 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What

The station-interior camera backs out only far enough to show about 40% of the base. This adds graphics.interior_zoom_scale (default 2.0) so you can pull back and frame the whole station. 1.0 keeps native behavior.
station-interior

How

The interior view is a BlendFrameProvider between a StaticFrameProvider (zoomed-in) and an OrbitFrameProvider pinned at a fixed radius (zoomed-out); zoom slides the blend ratio, so the far stop is that orbit endpoint's radius. The hook on OrbitFrameProvider.UpdateConstrains scales that pinned endpoint outward by the multiplier.

That same OrbitFrameProvider instance is the exterior station camera (the interior's fully-zoomed-out end is the exterior view), so the hook widens it only while the active section is Starbase_Interior and restores its native radius otherwise, leaving the exterior view and its component-level labels completely stock.

Why a multiplier (not an absolute distance)

Unlike zoom/haven_zoom, the interior's far stop is a single pinned radius, so a factor stays correct across resolutions, so no hard-coded offsets, and it self-heals if the game ever changes that radius.

Safety

The native range is captured once per provider before any widening and every frame's value is derived from that capture, so reasserting each frame cannot compound. Behind [patches].interiorzoomhooks; if the constraint fields don't resolve it logs and keeps native behavior. Field-resolution pattern follows haven_zoom.cc.

Validation

Built release and tested live at 2.0: interior frames the whole base, and the exterior station view with its green/blue component-level upgrade labels stays stock.

The station-interior camera backs out only far enough to show part of the
base. Hook OrbitFrameProvider.UpdateConstrains to scale the interior blend's
pinned far endpoint by graphics.interior_zoom_scale (default 2.0) so the whole
station fits on screen.

That orbit endpoint is the same instance as the exterior station camera (the
interior's fully-zoomed-out end is the exterior view), so the hook only widens
while the section is Starbase_Interior and restores the native radius
otherwise, leaving the exterior view and its component-level labels stock.

A multiplier (not an absolute distance like zoom/haven_zoom) keeps it
resolution-independent: the native stop is a single pinned radius. Gated by
[patches].interiorzoomhooks.
@netniV
netniV merged commit 44958fe into STFC-Mod:dev Oct 17, 2026
6 checks passed
netniV pushed a commit that referenced this pull request Oct 26, 2026
…m) (#349)

The interior zoom-out hook keyed its native-radius capture and restore by the
OrbitFrameProvider instance. That provider is recreated across scene/section
transitions, but the Constraint.FloatData radius object it drives persists and is
shared with the exterior station camera. When a widened provider was torn down
before it next ticked outside the interior, the widened radius was inherited by a
freshly created exterior provider the hook had never captured, so the restore
branch (find(provider) miss) never fired and the exterior stayed pinned at
scale*native: zoomed out and un-zoomable.

Key the capture and restore by the radius object instead of the provider, so any
provider that later presents that radius restores it to native on its first
exterior frame (and a stuck state self-heals). The map key stays compare-only and
the stored value is plain floats, so no stale-object access is introduced.

Follow-up to #332.
@netniV netniV modified the milestones: 1.2.0, 1.1.10 Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants