Instead of being specific to each level, Spray Cans are stored in a list on gamedata that will be stepped along each Spray Can you collect.
They are only assigned to a level on collection - which prevents you from farming the same easy location for every colour in the game.
In addition, this new system is one step short of dehardcoding them entirely. Now only Spray Cans specifically asked for by the existence of UC_SPRAYCAN will be put in the list, and if a secondary parameter is either "Yes" or "True", it will be put at the head of the list. This could technically support custom skincolours one day, but the author of this commit doesn't care to do the last bit of work necessary to make it happen.
There's a slight extra overhead in that skincolor_t now also holds a `cache_spraycan` (renamed from `cachedcan`, which maps had previously)
Currently, there's no safeguard against grabbing it on a custom course - you'll lose the Spray Can as soon as you load a fresh game again - but I consider that easy to fix (tomorrow) and necessary before merger, because the author of this commit does NOT want complaints on release because we forgot to protect users who keep on losing their skincolors.
A different solution to the issue reported on the SRB2 port of this branch. We don't care quite as much about exact game behaviour, so this permits lowercase sound effects (same as the source code) in maps' stringargs.
- New array of pointers to structures in memory (currently mixing static for base-game and Callocated for custom)
- Centralises a metric-ton of previously seperately handled properties into one struct
- Gametype_Names[]
- Gametype_ConstantNames[]
- gametypetol[]
- timelimits[]
- pointlimits[]
- gametypedefaultrules[]
- Don't attempt to guess custom gametype in Replay Hut (requires more work to make custom gametypes behave across the entire experience)
- I_Error if invalid gametype set
- gametyperules is deprecated since it will never be modified seperately from gametype (temporarily a #define, don't wanna bloat this commit too much)
- Refactor significantly (now has its own func, `G_GetNextMap`)
- If gametype uses cups, iterate through cups to find the current level, then grab the next valid level
- If not, get the next valid mapheader for your gametype
- SOC `nextmap`/`marathonnext` is not just deprecated but REMOVED
- Hide the NEXTMAP_ constants again, but leave support dummied out for if we have them publically accessible again
- Also get rid of a bunch of OTHER mapheader stuff we're never gonna use
- NiGHTS Grades? NOPE
- Vanilla titlecard patches? NOPE
- Boss music fadeout/replacement? NOPE
- Select Heading? NOPE
- You've been blocked.
- Don't show maps without lumps on the level select list
- this is me being petty, but making it NOTIMEATTACK in SOC instead of TIMEATTACK so we can reconsider the maps with/without them.
Allows for custom weather types.
In SOC:
```Freeslot
PRECIP_GROOVY
Weather PRECIP_GROOVY
Type = MT_PARTICLE
Effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING```
In Lua:
```freeslot("PRECIP_GROOVY")
precipprops[PRECIP_GROOVY] = {
type = MT_PARTICLE,
effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING
}```
Then in level header, simply set `Weather = PRECIP_GROOVY`.
Other properties are part of the object itself:
- Falling speed is set as the object's speed
- Sound ID is set via the object's SeeSound
- Sound frequency is set by the object's Mass.
* Rework HU_UpdatePatch to HU_UpdateOrBlankPatch with a "required" boolean.
* If desired graphic is not present in resources:
* If required is true, return `missingpat`.
* If false, return NULL as before (font compatibility).
* Add an alias with the previous function signature, so you don't need to add a million `true`s everywhere.
* Remove a ton of irrelevant graphics the game attempts to cache only because of code inherited from vanilla SRB2.
* Remove the unused hudinfo system, also inherited from vanilla SRB2.