mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-18 22:12:31 +00:00
Merge branch 'emeraldnum-restrict' into 'master'
Emeraldnum and playcredits can only be set when initialising a new gamedata See merge request KartKrew/Kart!2271
This commit is contained in:
commit
45583b1944
1 changed files with 18 additions and 4 deletions
|
|
@ -4087,14 +4087,28 @@ void readcupheader(MYFILE *f, cupheader_t *cup)
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "EMERALDNUM"))
|
else if (fastcmp(word, "EMERALDNUM"))
|
||||||
{
|
{
|
||||||
if (i >= 0 && i <= 14)
|
if (!mainwads || (refreshdirmenu & REFRESHDIR_GAMEDATA))
|
||||||
cup->emeraldnum = (UINT8)i;
|
{
|
||||||
|
if (i >= 0 && i <= 14)
|
||||||
|
cup->emeraldnum = (UINT8)i;
|
||||||
|
else
|
||||||
|
deh_warning("%s Cup: invalid emerald number %d", cup->name, i);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
deh_warning("%s Cup: invalid emerald number %d", cup->name, i);
|
{
|
||||||
|
deh_warning("You must define a custom gamedata to use \"%s\"", word);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "PLAYCREDITS"))
|
else if (fastcmp(word, "PLAYCREDITS"))
|
||||||
{
|
{
|
||||||
cup->playcredits = (i != 0 || word2[0] == 'T' || word2[0] == 'Y');
|
if (!mainwads || (refreshdirmenu & REFRESHDIR_GAMEDATA))
|
||||||
|
{
|
||||||
|
cup->playcredits = (i != 0 || word2[0] == 'T' || word2[0] == 'Y');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
deh_warning("You must define a custom gamedata to use \"%s\"", word);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
deh_warning("%s Cup: unknown word '%s'", cup->name, word);
|
deh_warning("%s Cup: unknown word '%s'", cup->name, word);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue