From c93b72c800986deff7338d8ad3ba2e197ad8c4b7 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Tue, 13 Jul 2021 21:48:55 -0400 Subject: [PATCH] HUD: Show GLOW and LITH ctype as number, don't show ctype for elements which use it as data storage (such as PHOT or PRTI) --- src/gui/game/GameView.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index a74ed7965..3e0ef067a 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -2174,14 +2174,16 @@ void GameView::OnDraw() else { sampleInfo << c->ElementResolve(type, ctype); - if (wavelengthGfx) - sampleInfo << " (" << ctype << ")"; + if (wavelengthGfx || type == PT_EMBR || type == PT_PRTI || type == PT_PRTO) + { + // Do nothing, ctype is meaningless for these elements + } // Some elements store extra LIFE info in upper bits of ctype, instead of tmp/tmp2 else if (type == PT_CRAY || type == PT_DRAY || type == PT_CONV || type == PT_LDTC) sampleInfo << " (" << c->ElementResolve(TYP(ctype), ID(ctype)) << ")"; else if (type == PT_CLNE || type == PT_BCLN || type == PT_PCLN || type == PT_PBCN || type == PT_DTEC) sampleInfo << " (" << c->ElementResolve(ctype, sample.particle.tmp) << ")"; - else if (c->IsValidElement(ctype)) + else if (c->IsValidElement(ctype) && type != PT_GLOW && type != PT_WIRE && type != PT_SOAP && type != PT_LITH) sampleInfo << " (" << c->ElementResolve(ctype, 0) << ")"; else if (ctype) sampleInfo << " (" << ctype << ")";