P2: A ship-specific HUD with "$Load Retail Configuration: YES" loses most of its retail gauges
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
Direzione di ricerca
Leggi load_missing_retail_gauges e confronta il ciclo dell'HUD predefinito con quello delle classi di navi. L'issue identifica la durata e il comportamento di reset del flag come causa; verifica come ciascun ciclo controlla l'elenco dei gauge della nave. Il lavoro è completato quando un HUD di nave con un gauge personalizzato riceve tutti i gauge standard che non definisce, anche per le classi di navi successive.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
A mod can give one ship class its own HUD and have the game fill in the rest of the standard gauges with $Load Retail Configuration: YES. When that HUD defines even one gauge itself, most of the standard gauges never get added: in my test the player kept only the radar and the message box, and lost the reticle, target box, weapons, energy, escort list and the rest.
In the ship-class half of load_missing_retail_gauges, retail_gauge_loaded is set to true as soon as one built-in gauge is found in the ship's own list, and is never set back to false for the next built-in gauge (the default-HUD loop above it does reset it). So every built-in gauge after the first match is treated as already loaded and skipped. By reading the code (not run): the flag also isn't reset between ship classes, so later ship classes with their own HUD should lose their fill-in entirely once any earlier one matched.
Steps to reproduce
- Current master (I used 8afa31842, Debug build), MediaVPs 5.0.2.
- Make a mod with a
data/tables/zz-hdg.tbmcontaining:#Gauge Config $Ships: ("GTF Myrmidon") $Load Retail Configuration: YES $Base: (1024, 768) $Gauges: +Messages: $End Gauges #End - Start SM1-01 (the player flies a GTF Myrmidon) and compare the HUD with a run without the mod.
What I got: without the mod, the full retail HUD. With it, only the radar and the message box.
Expected vs. actual behavior
Expected: the ship's own gauges plus every standard gauge it didn't define.
Actual: the standard gauges after the first one the ship defines are missing, for that ship and for every later ship class with its own HUD.
Proposed fixes
- Set
retail_gauge_loaded = false;at the top of the per-gauge loop in the ship-class half, as the default-HUD loop already does. - Declare the flag inside that loop instead of once for the whole function, so it can't carry over between gauges or ship classes.
- Replace the inner search with
std::any_ofover the ship's gauge list, which removes the flag altogether.
- Lingua principale
- C++
- Stelle
- 488
- Fork
- 184
- Merge medio
- 1g 19h
- PR unite (30g)
- 33
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scp-fs2open/fs2open.github.com
-
bug HUD LLM-suggested
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
scp-fs2open/fs2open.github.com#7953 ·
I maintainer di solito rispondono entro 1 giorno
-
bug controls LLM-suggested
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
scp-fs2open/fs2open.github.com#7946 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 66/100
scp-fs2open/fs2open.github.com#7932 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
scp-fs2open/fs2open.github.com#7924 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
scp-fs2open/fs2open.github.com#7918 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di scp-fs2open/fs2open.github.com
Issue simili
-
Missing icon for .cpp2 filesAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
madskristensen/FileIcons#385 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoft/SysmonCommon#26 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
espressif/esp-matter#1913 ·
-
bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
chipsalliance/verible#2644 ·