diff --git a/src/dehacked.c b/src/dehacked.c index 49ad5dc67..5fa4902cb 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -3195,6 +3195,8 @@ static void readextraemblemdata(MYFILE *f, INT32 num) sizeof (extraemblems[num-1].description), va("Extra emblem %d: objective", num)); else if (fastcmp(word, "CONDITIONSET")) extraemblems[num-1].conditionset = (UINT8)value; + else if (fastcmp(word, "SHOWCONDITIONSET")) + extraemblems[num-1].showconditionset = (UINT8)value; else { strupr(word2); @@ -3281,6 +3283,8 @@ static void readunlockable(MYFILE *f, INT32 num) unlockables[num].height = (UINT16)i; else if (fastcmp(word, "CONDITIONSET")) unlockables[num].conditionset = (UINT8)i; + else if (fastcmp(word, "SHOWCONDITIONSET")) + unlockables[num].showconditionset = (UINT8)i; else if (fastcmp(word, "NOCECHO")) unlockables[num].nocecho = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y'); else if (fastcmp(word, "NOCHECKLIST")) diff --git a/src/m_cond.h b/src/m_cond.h index e9859cf11..f6d011a8f 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -97,12 +97,13 @@ typedef struct } emblem_t; typedef struct { - char name[20]; ///< Name of the goal (used in the "emblem awarded" cecho) - char description[40];///< Description of goal (used in statistics) - UINT8 conditionset; ///< Condition set that awards this emblem. - UINT8 sprite; ///< emblem sprite to use, 0 - 25 - UINT8 color; ///< skincolor to use - UINT8 collected; ///< Do you have this emblem? + char name[20]; ///< Name of the goal (used in the "emblem awarded" cecho) + char description[40]; ///< Description of goal (used in statistics) + UINT8 conditionset; ///< Condition set that awards this emblem. + UINT8 showconditionset; ///< Condition set that shows this emblem. + UINT8 sprite; ///< emblem sprite to use, 0 - 25 + UINT8 color; ///< skincolor to use + UINT8 collected; ///< Do you have this emblem? } extraemblem_t; // Unlockable information @@ -112,6 +113,7 @@ typedef struct char objective[64]; UINT16 height; // menu height UINT8 conditionset; + UINT8 showconditionset; INT16 type; INT16 variable; UINT8 nocecho; diff --git a/src/m_menu.c b/src/m_menu.c index 32efa3fed..df6a2d449 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6685,7 +6685,8 @@ static void M_DrawChecklist(void) while (i < MAXUNLOCKABLES) { if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist - || !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS) + || !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS + || (!unlockables[i].unlocked && unlockables[i].showconditionset && !M_Achieved(unlockables[i].showconditionset))) continue; V_DrawString(currentMenu->x, y, ((unlockables[i].unlocked) ? V_GREENMAP : V_TRANSLUCENT)|V_ALLOWLOWERCASE, ((unlockables[i].unlocked || !unlockables[i].nochecklist) ? unlockables[i].name : M_CreateSecretMenuOption(unlockables[i].name))); @@ -8901,7 +8902,10 @@ static void M_DrawStatsMaps(int location) else V_DrawSmallScaledPatch(292, y, 0, W_CachePatchName("NEEDIT", PU_CACHE)); - V_DrawString(20, y, V_YELLOWMAP|V_ALLOWLOWERCASE, va("%s", exemblem->description)); + V_DrawString(20, y, V_YELLOWMAP|V_ALLOWLOWERCASE, + (!exemblem->collected && exemblem->showconditionset && !M_Achieved(exemblem->showconditionset)) + ? M_CreateSecretMenuOption(exemblem->description) + : exemblem->description); } y += 8;