Access to map hell maps in record attack. Currently dependent on 50 emblems.

Also: temporarily cleaned up the M_CanShowLevelInList record attack conditions to automatically match what we want, instead of requiring us to apply a bunch of vanilla flags just to emulate our "available unless explicitly hidden" MP mechanism like is currently in maps.kart.
This commit is contained in:
toaster 2018-10-06 21:08:09 +01:00
parent 5a80d036e7
commit 41ad3de999
4 changed files with 36 additions and 18 deletions

View File

@ -2428,6 +2428,8 @@ static void readunlockable(MYFILE *f, INT32 num)
unlockables[num].type = SECRET_SOUNDTEST;
else if (fastcmp(word2, "ENCORE"))
unlockables[num].type = SECRET_ENCORE;
else if (fastcmp(word2, "HELLATTACK"))
unlockables[num].type = SECRET_HELLATTACK;
else
unlockables[num].type = (INT16)i;
}

View File

@ -97,13 +97,14 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
unlockable_t unlockables[MAXUNLOCKABLES] =
{
// Name, Objective, Showing Conditionset, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
/* 01 */ {"Egg Cup", "", -1, 1, SECRET_NONE, 0, false, false, 0},
/* 02 */ {"SMK Cup", "", -1, 2, SECRET_NONE, 0, false, false, 0},
/* 03 */ {"Chao Cup", "", -1, 3, SECRET_NONE, 0, false, false, 0},
/* 01 */ {"Record Attack", "", -1, -1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 04 */ {"Encore Mode", "", 3, 4, SECRET_ENCORE, 0, false, false, 0},
/* 02 */ {"Egg Cup", "", -1, 1, SECRET_NONE, 0, false, false, 0},
/* 03 */ {"SMK Cup", "", -1, 2, SECRET_NONE, 0, false, false, 0},
/* 04 */ {"Chao Cup", "", -1, 3, SECRET_NONE, 0, false, false, 0},
/* 05 */ {"Record Attack", "", -1, -1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 05 */ {"Encore Mode", "", 3, 4, SECRET_ENCORE, 0, false, false, 0},
/* 06 */ {"Hell Attack", "", 5, 5, SECRET_HELLATTACK, 0, false, false, 0},
};
// Default number of emblems and extra emblems
@ -127,10 +128,13 @@ void M_SetupDefaultConditionSets(void)
M_AddRawCondition(3, 1, UC_TOTALEMBLEMS, 30, 0, 0);
M_AddRawCondition(3, 2, UC_MATCHESPLAYED, 50, 0, 0);
// -- 4: Collect 50 emblems OR play 150 matches
M_AddRawCondition(4, 1, UC_TOTALEMBLEMS, 50, 0, 0);
// -- 4: Collect 40 emblems OR play 150 matches
M_AddRawCondition(4, 1, UC_TOTALEMBLEMS, 40, 0, 0);
M_AddRawCondition(4, 2, UC_MATCHESPLAYED, 150, 0, 0);
// -- 4: Collect 50 emblems ONLY
M_AddRawCondition(5, 1, UC_TOTALEMBLEMS, 50, 0, 0);
// -- 10: Play 100 matches
M_AddRawCondition(10, 1, UC_MATCHESPLAYED, 100, 0, 0);
}

View File

@ -125,6 +125,7 @@ typedef struct
#define SECRET_SOUNDTEST 3 // Sound Test
#define SECRET_CREDITS 4 // Enables Credits
#define SECRET_ENCORE 5 // Enables Encore mode cvar
#define SECRET_HELLATTACK 6 // Map Hell in record attack
// If you have more secrets than these variables allow in your game,
// you seriously need to get a life.

View File

@ -3969,7 +3969,7 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
if (M_MapLocked(mapnum+1))
return false; // not unlocked
if (gt == GT_COOP && (mapheaderinfo[mapnum]->typeoflevel & TOL_COOP))
/*if (gt == GT_COOP && (mapheaderinfo[mapnum]->typeoflevel & TOL_COOP))
return true;
if (gt == GT_COMPETITION && (mapheaderinfo[mapnum]->typeoflevel & TOL_COMPETITION))
@ -3978,10 +3978,10 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
if (gt == GT_CTF && (mapheaderinfo[mapnum]->typeoflevel & TOL_CTF))
return true;
if ((gt == GT_MATCH || gt == GT_TEAMMATCH) && (mapheaderinfo[mapnum]->typeoflevel & TOL_MATCH))
return true;
if ((gt == GT_TAG || gt == GT_HIDEANDSEEK) && (mapheaderinfo[mapnum]->typeoflevel & TOL_TAG))
return true;*/
if ((gt == GT_MATCH || gt == GT_TEAMMATCH) && (mapheaderinfo[mapnum]->typeoflevel & TOL_MATCH))
return true;
if (gt == GT_RACE && (mapheaderinfo[mapnum]->typeoflevel & TOL_RACE))
@ -3989,29 +3989,38 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
return false;
case LLM_LEVELSELECT:
/*case LLM_LEVELSELECT:
if (mapheaderinfo[mapnum]->levelselect != maplistoption)
return false;
if (M_MapLocked(mapnum+1))
return false; // not unlocked
return true;
return true;*/
case LLM_RECORDATTACK:
if (!(mapheaderinfo[mapnum]->menuflags & LF2_RECORDATTACK))
/*if (!(mapheaderinfo[mapnum]->menuflags & LF2_RECORDATTACK))
return false;*/
if (!(mapheaderinfo[mapnum]->typeoflevel & TOL_RACE))
return false;
if (M_MapLocked(mapnum+1))
return false; // not unlocked
if (mapheaderinfo[mapnum]->menuflags & LF2_NOVISITNEEDED)
if (M_SecretUnlocked(SECRET_HELLATTACK))
return true; // now you're in hell
if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU)
return false; // map hell
/*if (mapheaderinfo[mapnum]->menuflags & LF2_NOVISITNEEDED)
return true;
if (!mapvisited[mapnum])
return false;
return false;*/
return true;
case LLM_NIGHTSATTACK:
/*case LLM_NIGHTSATTACK:
if (!(mapheaderinfo[mapnum]->menuflags & LF2_NIGHTSATTACK))
return false;
@ -4024,7 +4033,9 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
if (!mapvisited[mapnum])
return false;
return true;
return true;*/
default:
return false;
}
// Hmm? Couldn't decide?