Commit graph

20940 commits

Author SHA1 Message Date
toaster
94bcf79710 Restrict collecting rings in GTR_SPHERES, not GTR_BUMPERS! 2022-12-31 22:34:19 +00:00
toaster
98646ef65b Fix arrangement of gametype rules between SOC and constants 2022-12-31 22:33:09 +00:00
toaster
36d6fcaba4 Add a preview for Special Attack unlock type 2022-12-31 21:43:39 +00:00
toaster
05241341b8 Remove the last few instances of gametype-specific colorisation 2022-12-31 21:38:52 +00:00
toaster
a2c5ff6ac8 Remove the duplication of levellist.netgame into cupgrid.netgame 2022-12-31 20:56:00 +00:00
toaster
e0c4c235df Move "return" in "Are you sure you want to return to the menu?" to the next line, to balance the lines out a little better 2022-12-31 20:34:11 +00:00
toaster
76ea72ceac Prevent entering the cup or level select if there's no valid maps to pick from. 2022-12-31 20:33:31 +00:00
toaster
c857153c29 Unstaged closing brace 2022-12-31 19:03:13 +00:00
toaster
6b18f869b9 Prevent a special stage win by sneaking ahead of the UFO to the goal line 2022-12-31 19:02:22 +00:00
toaster
5b027ff2fe Instead of preventing lives for GTR_CAPSULES, prevent them for it being GPEVENT_BONUS 2022-12-31 19:00:52 +00:00
toaster
a86ed5c6cb Rework the conditions for the previous commit
- The "never force a retry" condition is now `!G_GametypeUsesLives()`
- In GT_SPECIAL *and* GT_VERSUS, check for K_IsPlayerLosing before retry, instead of bespoke check
2022-12-31 18:59:56 +00:00
toaster
39e68d1ae3 Clear UFO pointer if its object was removed (matches up with general mobjthinker P_SetTarget handling) 2022-12-31 18:45:04 +00:00
toaster
44555be704 Change the conditions for forced retry at end of round
- If modeattacking, never
- If Sealed Star, if the UFO still exists or the emerald hasn't been picked up
2022-12-31 17:57:22 +00:00
toaster
36b1f5f488 Have a Cup visibly locked if no levels are accessible by the current rules of menusearch_t
- Solved by leveraging M_GetFirstLevelInList alongside existing M_CountLevelsInList calls
- Also optimises the above calls in the M_CupLocked case, since that's no longer being directly used otherwise
2022-12-31 17:50:49 +00:00
toaster
2db7562c24 LF2_FINISHNEEDED
- Replacement for LF2_VISITNEEDED, which was itself a Kart-specific inversion of LF2_NOVISITNEEDED
- Prevents selection in time attack before you've beaten the level in another context (GP, or MP if applicable)
- Should be used for Sealed Stars (and Adventure Example) exclusively IMO, but usable for others too
Related adjustments:
- Allow a map to have a `TypeOfLevel` of 0 without error
- Change the Condition String for UC_MAPVISITED to "Finish a round on X" (previously "Beat X")
2022-12-31 16:22:46 +00:00
toaster
dc7222821c Move M_Init() to fix saving of some menu-specific cvars 2022-12-31 16:05:04 +00:00
toaster
21858082d2 EXPERIMENTAL: Use yellowmap for all pause menu icons (except Try Again/Restart Map) instead of custom
Will make long-term management of this menu easier, and pushes aside some inconsistencies between graphics
May be reverted in part or full if it doesn't work for particular assets
2022-12-31 00:01:44 +00:00
toaster
b09045f657 Dehardcode menu gametype selection, part 3
Multiplayer map select now uses the value of `menugametype` accessible just above it on the menu, instead of having to select from a hardcoded set of options
2022-12-30 23:58:22 +00:00
toaster
be49e99a9e Guarantee menugametype's value is good before it's relevant 2022-12-30 23:42:50 +00:00
toaster
ebb2a79666 Dehardcode menu gametype selection, part 2
- Add "Gametype" toggle option to pause menu for admins
    - A/Confirm button on any gametype other than current to do random map in new gametype
    - C/Extra button to return to current gametype
    - A/Confirm button on current gametype does a funny noise and nothing else right now, idk what to do
- `randomlevel` supports the same `-gametype` parameter as `map`
- Both `randomlevel` and `map`'s `-gametype` parameter prohibits `GTR_FORBIDMP` mask gametype changes in netgames
- `randomlevel` properly sets encore based on `cv_kartencore`'s value (and permitting `GTR_ENCORE`)
- Split out `menugametype` change functions
- `yellowmap` now remaps all intermediary shades of grey to match funny pause menu remaps
2022-12-30 20:35:55 +00:00
toaster
3ee8713e46 Dehardcode menu gametype selection, part 1
- Introduce `menugametype`
    - Controlled by IT_KEYHANDLER/M_HandleMenuGametype
    - Excludes gametypes that do not support multiplayer by default
        - GTR_CAPSULES and GTR_BOSS for now, but also user-specifiable GTR_NOMP
- Remove gametype_cons_t and G_UpdateGametypeSelections, an obstacle in the way of infinitely allocatable custom gametypes
2022-12-30 15:23:26 +00:00
toaster
52040c1248 Replays (net and timeeattack) now recognise gametypes by name
- Should support custom gametypes, but haven't been thoroughly testing those
- Custom gametypes must now be unique by name
- Custom gametypes now have a maximum name length of 31
2022-12-29 23:13:51 +00:00
toaster
834150585b Rework demo time/laptime handling
* `ATTACKING_` constants have been changed to be flags
    - `ATTACKING_TIME` contains time data for all gametypes
    - `ATTACKING_LAPS` contains laps data for `GTR_CIRCUIT` on maps with more than 1 lap
* `demoflags` now contains raw `ATTACKING_` flags
* Best time/best lap demo files will now be saved properly again (broken since `new-menus`)
* Ghosts will now be loaded properly again (broken since `unlockables-undefeatable`)
2022-12-29 21:30:04 +00:00
toaster
d1852adf30 Forgot to stage this 2022-12-29 17:46:11 +00:00
toaster
df3624d96c Executor calls for UFO Catcher special events
Requested by Charyb.
- LE_PINCHPHASE (-2 or 65534) for busting open the Catcher
- LE_BOSSDEAD (-4 or 65532) for grabbing the emerald
Would like to use args for UDMF compatibility but there is no spawnpoint for the Catcher so it's hardcoded for now
2022-12-29 17:44:19 +00:00
toaster
7482e11992 SPB special stage experiment
If you smuggle an SPB to after the death of the UFO Catcher, spawn a single, free-on-straightways manta ring before it blows up.
Testing shows that you can get hit by the SPB's explosion only if you use the free manta ring just before a sneaker panel... but also Sal thinks it's cool and I think it adds depth
2022-12-28 23:35:27 +00:00
toaster
e45282bdff K_GetPossibleSpecialTarget()
* Standardises conditions under which the UFO Catcher can be "targeted" (Jawz, SPB, tether)
* Makes SPBs explode a little ahead of driving distance if UFO Catcher is no longer targetable
2022-12-28 23:31:46 +00:00
toaster
c992438e3c Only tether off UFO if it's not just a teeny emerald 2022-12-27 23:13:02 +00:00
toaster
c47faa37ab ONLY have Super Ring in item reel if UFO is busted 2022-12-27 23:12:04 +00:00
toaster
edea4e2110 Message says return to menu instead of title screen 2022-12-27 22:56:07 +00:00
toaster
03c6eb3e30 Another bugbear: start on the Start for timeattack menu flow 2022-12-27 22:41:30 +00:00
toaster
978040ca3f Two menu bugbears
- Clear console prints immediately after menu clear (fixes the prints on the black screen before loading level from menu)
- Last kart standing, not last hedgehog standing 🥹
2022-12-27 22:36:20 +00:00
toaster
04f2ac4121 "Special" time attack mode for 1P.
* Both GT_SPECIAL and GT_VERSUS.
* Access controlled by SECRET_SPECIALATTACK. (You're blue now.)

Related changes to precipitate:
* Cups that only have one map in them get selected immediately, rather than off-the-cuff.
    * Done by seperating out a new function M_LevelSelected from M_LevelSelectHandler
* Maps that only have one lap in them don't have a visible lap timestamp sticker.
* Fix a cup with *no* valid maps for the current ruleset being hypothetically selectable
2022-12-27 22:34:02 +00:00
toaster
15587417c7 Coherency changes to special stage behaviour in anticipation of timeattack support
* Make everyone PF_NOCONTEST (but not explode) if the UFO/emerald reaches the end of its waypoint path.
    - Possibly temporary: Make the UFO/emerald go straight up at its final waypoint
* If you have PF_NOCONTEST, K_IsPlayerLosing is true
* If special stage in action and the only reason you'd be behind is your position, nobody loses
* Never eliminate last in special stage
* Time Over funny camera no longer occurs when PF_NOCONTEST but not dead
2022-12-27 22:24:18 +00:00
toaster
03c8fd543f More fun rules for Special Stages
- GTR_ROLLINGSTART
    * Initial instathrust, as before
    * Forced MAXPLMOVE forward
    * Disable finish line beam
    * "Super transformation" sound
        - Reference to the previous entry in the series' Perfect Startboost mechanic
- GTR_SPECIALSTART
    * Instant white fade
    * No titlecard (overridden by Boss intro)
    * Starting warp sound
- Match slidein time with no traditional titlecard to the end of the playsim intro fade
- Remove G_IsSpecialStage
2022-12-27 17:58:35 +00:00
toaster
f8999bea36 Changes to tab rankings
* No longer has gametype-specific highlight
* Shows Grand Prix and Capsules instead of gametype name if relevant
* Operates on a heirarchy for important information
    * Shows grand prix round on left if in GP (resolves #360)
    * Shows capsules remaining on right if in BTC
    * Attempts to draw timelimit and pointlimit on both left and right
    * Number of laps remaining/gamespeed is least priority for left and right sides
2022-12-27 16:06:10 +00:00
toaster
1ac0c44f77 Permit using the gametype option for Command_Map_f when not playing multiplayer 2022-12-27 14:34:54 +00:00
toaster
470f82104d Rework intertype_t
- Now you select based on whether you want to rank by
    - Time always (Race, Special)
    - Score always (might be useful for custom gametypes..?)
    - Time in 1P, Score otherwise (Battle, Versus)
- No longer has gametype-specific text colours on the intermission
- Also cleans up a case where invalid music could play for winning a custom gametype without GTR_CIRCUIT *or* GTR_BUMPERS
2022-12-27 14:33:58 +00:00
toaster
63f75fcba1 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify 2022-12-27 11:36:03 +00:00
toaster
d86c677ee7 Merge branch 'fix-cmake-git-cache' into 'master'
QOL fixes for CMake and Git integration

See merge request KartKrew/Kart!838
2022-12-27 11:35:28 +00:00
James R
cc30118e3b Adjust formatting of git branch in game
- Detect and highlight detached HEAD on title screen and in console
- Remove '-' between branch and commit in console
2022-12-27 01:00:57 -08:00
James R
cff0def2a4 cmake: reconfigure if git HEAD changes 2022-12-27 00:59:29 -08:00
James R
5395194ed6 cmake: generate config.h at build time, always rebuild comptime.c 2022-12-27 00:59:28 -08:00
James R
aaecabf4d6 cmake: refactor GitUtilities.cmake
Remote branch name can now be resolved from detached HEAD.
2022-12-27 00:40:59 -08:00
toaster
2b32baffbb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify 2022-12-26 23:31:50 +00:00
toaster
38a515f8e5 Also make Grand Prix bots spectators if the gametype doesn't support them (or if the initialisation happens into a GPEVENT) 2022-12-26 23:11:33 +00:00
toaster
a3d0c197ec Fix GAMETYPERULE_LIST 2022-12-26 23:08:06 +00:00
toaster
8bb29e340c Fix a crash in K_drawBossHealthBar exposed by the new random functions 2022-12-26 23:07:32 +00:00
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* The existing structs are now exclusively for handling extra data.
    * `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
    * `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
        * These are turned on when the gametype extra data is successfully initialised, not on map start.
            * `K_InitBossHealthBar(...)` for `bossinfo.valid`
            * `K_InitSpecialStage(void)` for `specialstageinfo.valid`
        * `K_CanChangeRules(...)` no longer checks these
    * No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
    * Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
2022-12-26 23:06:24 +00:00
Sal
2533ebba23 Merge branch 'testers-extras' into 'master'
Extra changes for TESTERS builds

See merge request KartKrew/Kart!835
2022-12-26 22:44:43 +00:00