mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-19 16:51:53 +00:00
Merge branch 'hidden_unlocks' into 'next'
Adds 'hidden' SOC value for Unlockables to absolutely hide unlockable from checklist See merge request STJr/SRB2!2500
This commit is contained in:
commit
a64b1afdea
3 changed files with 10 additions and 7 deletions
|
@ -3260,6 +3260,8 @@ void readunlockable(MYFILE *f, INT32 num)
|
|||
unlockables[num].nocecho = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y');
|
||||
else if (fastcmp(word, "NOCHECKLIST"))
|
||||
unlockables[num].nochecklist = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y');
|
||||
else if (fastcmp(word, "HIDDEN"))
|
||||
unlockables[num].hidden = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y');
|
||||
else if (fastcmp(word, "TYPE"))
|
||||
{
|
||||
if (fastcmp(word2, "NONE"))
|
||||
|
|
|
@ -120,6 +120,7 @@ typedef struct
|
|||
char *stringVar;
|
||||
UINT8 nocecho;
|
||||
UINT8 nochecklist;
|
||||
UINT8 hidden; // Completely hide unlockable from the checklist whether or not it's unlocked.
|
||||
} unlockable_t;
|
||||
|
||||
#define SECRET_NONE -6 // Does nil. Use with levels locked by UnlockRequired
|
||||
|
|
14
src/m_menu.c
14
src/m_menu.c
|
@ -7053,8 +7053,8 @@ static void M_HandleChecklist(INT32 choice)
|
|||
{
|
||||
if (!unlockables[j].name[0])
|
||||
continue;
|
||||
// if (unlockables[j].nochecklist)
|
||||
// continue;
|
||||
if (unlockables[j].hidden)
|
||||
continue;
|
||||
if (!unlockables[j].conditionset)
|
||||
continue;
|
||||
if (unlockables[j].conditionset > MAXCONDITIONSETS)
|
||||
|
@ -7078,8 +7078,8 @@ static void M_HandleChecklist(INT32 choice)
|
|||
{
|
||||
if (!unlockables[j].name[0])
|
||||
continue;
|
||||
// if (unlockables[j].nochecklist)
|
||||
// continue;
|
||||
if (unlockables[j].hidden)
|
||||
continue;
|
||||
if (!unlockables[j].conditionset)
|
||||
continue;
|
||||
if (unlockables[j].conditionset > MAXCONDITIONSETS)
|
||||
|
@ -7132,7 +7132,7 @@ static void M_DrawChecklist(void)
|
|||
|
||||
while (i < MAXUNLOCKABLES)
|
||||
{
|
||||
if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist
|
||||
if (unlockables[i].name[0] == 0 || unlockables[i].hidden
|
||||
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS
|
||||
|| (!data->unlocked[i] && unlockables[i].showconditionset && !M_Achieved(unlockables[i].showconditionset, data)))
|
||||
{
|
||||
|
@ -7144,11 +7144,11 @@ static void M_DrawChecklist(void)
|
|||
|
||||
for (j = i+1; j < MAXUNLOCKABLES; j++)
|
||||
{
|
||||
if (!(unlockables[j].name[0] == 0 //|| unlockables[j].nochecklist
|
||||
if (!(unlockables[j].name[0] == 0 || unlockables[j].hidden
|
||||
|| !unlockables[j].conditionset || unlockables[j].conditionset > MAXCONDITIONSETS))
|
||||
break;
|
||||
}
|
||||
if ((j != MAXUNLOCKABLES) && (unlockables[i].conditionset == unlockables[j].conditionset))
|
||||
if ((j != MAXUNLOCKABLES) && (unlockables[i].conditionset == unlockables[j].conditionset) && !unlockables[j].hidden)
|
||||
addy(8)
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue