mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Unlocks: add IsGear condition, restrict IsDifficulty to GP
- IsDifficulty is a GP difficulty requirement - IsGear is a gear game speed requirement
This commit is contained in:
parent
ed832c5486
commit
96543a537a
3 changed files with 21 additions and 5 deletions
|
|
@ -2777,7 +2777,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
||||||
x2 = KARTGP_MASTER;
|
x2 = KARTGP_MASTER;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deh_warning("gamespeed requirement \"%s\" invalid for condition ID %d", params[3], id+1);
|
deh_warning("difficulty requirement \"%s\" invalid for condition ID %d", params[3], id+1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2801,7 +2801,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
||||||
re = KARTGP_MASTER;
|
re = KARTGP_MASTER;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deh_warning("gamespeed requirement \"%s\" invalid for condition ID %d", params[1], id+1);
|
deh_warning("difficulty requirement \"%s\" invalid for condition ID %d", params[1], id+1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2986,11 +2986,22 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
||||||
re = KARTGP_MASTER;
|
re = KARTGP_MASTER;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deh_warning("gamespeed requirement \"%s\" invalid for condition ID %d", params[1], id+1);
|
deh_warning("difficulty requirement \"%s\" invalid for condition ID %d", params[1], id+1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (fastcmp(params[0], "ISGEAR"))
|
||||||
|
{
|
||||||
|
PARAMCHECK(1);
|
||||||
|
ty = UCRP_ISGEAR;
|
||||||
|
re = atoi(params[1]) - 1;
|
||||||
|
if (re < KARTSPEED_NORMAL || re > KARTSPEED_HARD)
|
||||||
|
{
|
||||||
|
deh_warning("gear requirement \"%s\" invalid for condition ID %d", params[1], id+1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (fastcmp(params[0], "PODIUMCUP"))
|
else if (fastcmp(params[0], "PODIUMCUP"))
|
||||||
{
|
{
|
||||||
PARAMCHECK(1);
|
PARAMCHECK(1);
|
||||||
|
|
|
||||||
|
|
@ -1612,10 +1612,12 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
||||||
return (cn->requirement != -1 && player->followerskin == cn->requirement);
|
return (cn->requirement != -1 && player->followerskin == cn->requirement);
|
||||||
case UCRP_ISDIFFICULTY:
|
case UCRP_ISDIFFICULTY:
|
||||||
if (grandprixinfo.gp == false)
|
if (grandprixinfo.gp == false)
|
||||||
return (gamespeed >= cn->requirement);
|
return false;
|
||||||
if (cn->requirement == KARTGP_MASTER)
|
if (cn->requirement == KARTGP_MASTER)
|
||||||
return (grandprixinfo.masterbots == true);
|
return (grandprixinfo.masterbots == true);
|
||||||
return (grandprixinfo.gamespeed >= cn->requirement);
|
return (grandprixinfo.gamespeed >= cn->requirement);
|
||||||
|
case UCRP_ISGEAR:
|
||||||
|
return (gamespeed >= cn->requirement);
|
||||||
|
|
||||||
case UCRP_PODIUMCUP:
|
case UCRP_PODIUMCUP:
|
||||||
if (grandprixinfo.gp == false || K_PodiumSequence() == false)
|
if (grandprixinfo.gp == false || K_PodiumSequence() == false)
|
||||||
|
|
@ -2527,6 +2529,8 @@ static const char *M_GetConditionString(condition_t *cn)
|
||||||
|
|
||||||
return speedtext;
|
return speedtext;
|
||||||
}
|
}
|
||||||
|
case UCRP_ISGEAR:
|
||||||
|
return va("in Gear %d", cn->requirement + 1);
|
||||||
|
|
||||||
case UCRP_PODIUMCUP:
|
case UCRP_PODIUMCUP:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,8 @@ typedef enum
|
||||||
UCRP_ISCHARACTER, // character == [skin]
|
UCRP_ISCHARACTER, // character == [skin]
|
||||||
UCRP_ISENGINECLASS, // engine class [class]
|
UCRP_ISENGINECLASS, // engine class [class]
|
||||||
UCRP_HASFOLLOWER, // follower == [followerskin]
|
UCRP_HASFOLLOWER, // follower == [followerskin]
|
||||||
UCRP_ISDIFFICULTY, // difficulty >= [difficulty]
|
UCRP_ISDIFFICULTY, // GP difficulty >= [difficulty]
|
||||||
|
UCRP_ISGEAR, // gear speed >= [speed]
|
||||||
|
|
||||||
UCRP_PODIUMCUP, // cup == [cup] [optional: >= grade OR place]
|
UCRP_PODIUMCUP, // cup == [cup] [optional: >= grade OR place]
|
||||||
UCRP_PODIUMEMERALD, // Get to podium sequence with that cup's emerald
|
UCRP_PODIUMEMERALD, // Get to podium sequence with that cup's emerald
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue