mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
fix(cockpit): a provider member that throws when read (a getter) leaves that provider out with one warning and keeps the rest; a worded member that starts throwing keeps its last good words; a candidate, frame or HUD view whose getter throws reads as null, so the view ends or keeps its last HUD
This commit is contained in:
1 parent
22f43aab01
commit
fbc1a9a0ec
6 files changed
+264
-92
No files matched your search
@@ -154,9 +154,9 @@ const SUBJECT_SIGNAL_TONES = Object.freeze({
|
||||
/**
|
||||
* Present a provider subject's HUD: its view model (cockpitSubjectHudView)
|
||||
* in the generic readouts, the compass at the camera's heading, the route
|
||||
* card, and its signals in Live Signals. A HUD view that is null, or a
|
||||
* `hud()` that throws, keeps the last one. Contact navigation stays with
|
||||
* aircraft, so the Contact card is withdrawn.
|
||||
* card, and its signals in Live Signals. A HUD view that is null, a `hud()`
|
||||
* that throws, or a view whose reading throws keeps the last one. Contact
|
||||
* navigation stays with aircraft, so the Contact card is withdrawn.
|
||||
*/
|
||||
function updateSubjectHud(info, nowMs, forceContext) {
|
||||
const provider = this.subjectProvider;
|
||||
@@ -176,7 +176,8 @@ function updateSubjectHud(info, nowMs, forceContext) {
|
||||
null,
|
||||
)
|
||||
: null;
|
||||
if (raw != null) this.subjectHud = cockpitSubjectHudView(raw);
|
||||
if (raw != null)
|
||||
this.subjectHud = cockpitSubjectHudView(raw) ?? this.subjectHud;
|
||||
const hud = this.subjectHud ?? cockpitSubjectHudView(null);
|
||||
const view = this.instruments;
|
||||
view.kind = 'subject';
|
||||
|
||||
Reference in new issue
Block a user