Commit graph

21979 commits

Author SHA1 Message Date
toaster
967ad3662d M_DrawMapMedals: Only shows ET_MAP medals with ME_ENCORE and/or ME_SPBATTACK if you've unlocked those two things 2023-03-14 20:28:36 +00:00
toaster
22e17fd881 Statistics respects cups now
- Adds headers to the list
- Adds indentation
- Doesn't show extra medals if there are none available
- Cleans up some of the undesired duplication in the drawer
2023-03-14 20:27:58 +00:00
toaster
4db0affd2b Addons menu: Show unlocks after backing out
- For the Addons unlock condition.
- Also forbids having menu flow interrupted with challenges if you're in-game
2023-03-14 17:04:46 +00:00
toaster
558d3dc842 M_DrawChallenges: Change offset of Chao Keys 2023-03-14 12:48:34 +00:00
toaster
107acf34d3 Fix some softlock circumstances caused by the Chao Key system
- Nonzero keys pending, but zero pending rounds
- Nonzero keys pending, but too many keys already earned
2023-03-14 12:28:52 +00:00
toaster
5b48c52b65 G_DoCompleted: Call S_StopSounds earlier so legitimate exit condition sound isn't insta-wiped 2023-03-14 11:52:54 +00:00
toaster
276b19e871 M_ChallengesTick: Speed up digesting pending rounds into Chao Keys if there's lots of them remaining 2023-03-14 11:35:08 +00:00
toaster
1fb0e0454f M_ChallengesTick: Fix no in-fade if only Chao Keys are pending 2023-03-14 11:34:07 +00:00
toaster
db1b3dd7c9 GDCONVERT_ROUNDSTOKEY: Make 20 in DEVELOP builds instead of 4, for a closer-to-realistic progression 2023-03-14 11:31:09 +00:00
toaster
492babd73d Linear Level Select polish
- Even if there's only one level in the group, only skip over the mini linear list in a Time Attack mode
    - Improves some of the jumpscare of looking into Lost and Found and being blasted to TEST RUN
- Fix lists of one map being wedged against the bottom of the screen
- Precache valid map count
2023-03-13 18:20:50 +00:00
toaster
0f14079555 levellist: Fix type of choosemap 2023-03-13 17:34:14 +00:00
toaster
60fee59c54 Adjust Test Run's exceptions for lock checks
- Revert the blanket exception so Lost and Found won't always have it available
- Won't be considered cheating to go to Test Run on game boot even if not unlocked
- Made the lack of exception for Test Run in Command_Map_f's cheat check more intentional
2023-03-13 17:28:55 +00:00
toaster
bfb939161a M_DrawChallengePreview: Improve SECRET_MAP
- Change scale and offsets of map icon to match other unlock types that show a single map
- Show a gametype string
    - Fudges GT_VERSUS into GT_SPECIAL just like the menu does
    - Shows "Match Race/Online" for a level with no preferred gametype like TEST RUN
2023-03-13 17:22:25 +00:00
toaster
1701662b6b Lost and Found
- When selecting levels:
    - If the gametype uses cups
    - and a map has no cup
    - and you're not in Grand Prix mode
- show those maps in a quasi-cup called "Lost and Found".
- Implementation details:
    - a few == checks for the pointer to `cupheader_t dummy_lostandfound`
    - Otherwise most of the apparatus was built as part of prior art!
2023-03-13 16:44:21 +00:00
toaster
1d3b5adfdf "Monitor" parameter for cups
- Defaults to 1, AKA Sonic 1/2 monitor
- Set to 2 for Sonic 3k monitor
- Supports a range of 1-9 and A-Z
- Permits fine-grained rapid-prototype stretch goal Chaotix monitor stuff later in development
2023-03-13 16:18:07 +00:00
toaster
07f7be03a1 M_CupSelectHandler: Fix data types 2023-03-13 15:11:14 +00:00
toaster
b5be97cbfc level-select.c: Fix incorrect responses for level-finding functions
- Fix the case where invalid levelsearch_t were providing values of false instead of NEXTMAP_INVALID
- Fix the case where M_GetFirstLevelInList was not returning NEXTMAP_INVALID for rearching nummapheaders
2023-03-13 15:10:43 +00:00
toaster
756feaa20b M_CanShowLevelInList: Do not permit Test Run in time attack
Also improves the associated comment and indentation
2023-03-13 13:35:23 +00:00
toaster
45891ac22f G_GetNextMap: Go to TEST RUN when the next Race map in a GP is invalid
Resolves #366
2023-03-12 20:53:46 +00:00
toaster
425f260914 Never consider TEST RUN locked
- Repairs access to TEST RUN cup
- We want to make it an unlockable later, so...
- M_MapLocked data types corrected
2023-03-12 20:41:00 +00:00
toaster
241475155b Rename "Break the Capsules" to "Prison Break"
We had this collective consciousness bigbrain moment in VC together, and it can literally only happen in this branch because unlocks.pk3 is the only main-game asset that needs to change for it
Solves the big problem we had with mixing up Item Capsules and ~~Battle Capsules~~ PRISON EGGS
2023-03-12 20:17:46 +00:00
toaster
0b71b2f71f M_DrawStatistics: Fix "Hours/Minutes/Seconds" plurality if there's only 1 2023-03-12 20:16:03 +00:00
toaster
03b6f50ab8 M_DrawChallengePreview: Selection assistance icons
- SECRET_SKIN:
    - Shows the character icon you'd have to pick (Eggman for Eggrobo, etc)
    - Shows the Engine Class section of the charsel grid you'd have to pick
- SECRET_FOLLOWER:
    - Shows the category icon you'd have to pick (3DB for Whirl, etc)
- SECRET_CUP:
    - Shows the position on the cup grid, INCLUDING previous pages
2023-03-12 18:10:14 +00:00
toaster
84e807cfa0 UCRP_ISENGINECLASS
Checks for the player's character's engine class
As before, A-I and J are valid classes
2023-03-12 15:55:14 +00:00
toaster
65a4f33b6f R_GetEngineClass
Before unlockable conditions dependent on Engine Class are added, standardise the system.
- enum constant in r_skins.h from A-I + J
    - Engine Class J is for SF_IRONMAN
        - The Joker in the pack of cards
        - Also immediately after I in the alphabet
        - It's a Jape that works on multiple levels
- Integrate into K_UpdateEngineSounds
    - Ignores Engine Class J
- Show the Engine Class in character select extrainfo mode, even in situations character name would have been the only thing shown
2023-03-12 14:41:15 +00:00
toaster
01f6eb71f5 Optimisation: reduce the number of calls to M_CheckUnlockConditions
- For P_Ticker()'s calls to M_UpdateUnlockablesAndExtraEmblems
    - Do not check non-UCRP_REQUIRESPLAYING conditions
        - Controlled by a new `boolean doall` parameter to M_UpdateUnlockablesAndExtraEmblems
        - Most other contexts have this as true
        - Forced true if update is meant to be silent
    - Only check UCRP_REQUIRESPLAYING conditions if a relevant property has been touched
        - Controlled by a new `boolean checkthisframe` property on roundcondition_t
        - Set in all contexts where roundcondition_t is modified
        - Would also be set on lap change, but that case is already covered by the following
- Check all conditions, both UCRP_REQUIRESPLAYING and not, on:
    - local player K_HandleLapIncrement
    - local player P_DoPlayerExit
    - local player P_DoTimeOver
    - Controlled by a new `boolean deferredconditioncheck` property on gamedata_t
2023-03-12 13:52:28 +00:00
toaster
5a9281ecfb Three new UCRP's
- UCRP_ISDIFFICULTY
    - Example: IsDifficulty Hard - "on Hard difficulty"
    - Does what it says on the tin
    - You can't specify Easy because there is nothing easier than Easy
    - Does it based on the GPsetting if in grand prix, or the level setting otherwise
- UCRP_PODIUMCUP
    - Example: PodiumCup Ring - "complete RING CUP"
    - Example: PodiumCup Barrier Silver - "get Silver or better on BARRIER CUP"
    - Example: PodiumCup Goggles S - "get grade S on GOGGLES CUP"
    - Basically a monolithic cup completion handler.
    - Only happens after rankings begins in Podium ceremony.
- UCRP_PODIUMEMERALD
    - Example: PodiumEmerald - "collect the Emerald"
    - Get the Emerald to the ceremony and this is yours.
- UCRP_PODIUMPRIZE
    - Example: PodiumPrize - "collect the prize"
    - LITERALLY identical to PodiumEmerald except the string
    - Doing it seperately from PodiumCup means we can't check whether that cup uses an Emerald or another Catcher Prize automagically
2023-03-11 23:56:58 +00:00
toaster
3abba2bd26 G_LoadGameData: Add -resetchallengegrid command line parameter for DEVELOP builds only 2023-03-11 21:19:42 +00:00
toaster
4d88923173 UC_ALLCHAOS, UC_ALLSUPER, UC_ALLEMERALDS: Provide a ??? tease for Master difficulty if not unlocked 2023-03-11 21:09:43 +00:00
toaster
6f62abc1ef UCRP_FINISHPLACE: Don't permit messed up position of 0 2023-03-11 21:06:37 +00:00
toaster
f411ca1e85 UC_ALLCHAOS, UC_ALLSUPER, UC_ALLEMERALDS: Move to using KARTSPEED/KARTGP constants directly 2023-03-11 19:42:20 +00:00
toaster
c67412f6ef Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-11 12:42:55 +00:00
SteelT
d9ef9514fa Merge branch 'altmusic-autoload' into 'master'
Auto load altmusic.pk3 on startup

See merge request KartKrew/Kart!1038
2023-03-11 03:03:57 +00:00
SteelT
43991dd798 Auto load altmusic.pk3 on startup 2023-03-10 21:43:51 -05:00
toaster
6129d810cc UC_ALLCHAOS, UC_ALLSUPER, and UC_ALLEMERALDS
Measures whether you have all 7 Chaos Emeralds, 7 Super Emeralds, or 14 Emeralds
- Hidden if you haven't entered a special stage yet
- Checks all cups and all relevant difficulties outside of GS_LEVEL
    - You can specify a difficulty of Normal, Hard, or Master
2023-03-10 22:50:08 +00:00
toaster
b3aa2520bc gamedata->everseenspecial
Record whether you've ever successfully entered a special stage
Used for conditions which were previously checking for whether you'd completed a special stage - which I think is a bit too restrictive for someone figuring out what next to lab
2023-03-10 22:43:06 +00:00
toaster
cbebfe5a62 UC_POWERLEVEL: Do not iterate over your profiles in GS_LEVEL 2023-03-10 22:41:03 +00:00
toaster
fea235d8a7 UC_REPLAY
Save a replay after finishing a round.
Basically another tutorial unlock condition like UC_ADDON
2023-03-10 21:44:48 +00:00
toaster
dfe75726df cupwindata_t
Save your best GP stats across sessions.
- Saved into gamedata
- Deliniated per difficulty option
- Draw onto cupgrid in GP cup select
    - Best grade
    - Whether you've ever gotten the Emerald
        - TODO: Always shows Chaos Emerald, will need updating when Super Emerald graphics are created
    - Monitor status changes depending on recorded position
        - 1st: Gold, shiny
        - 2nd: Silver, shiny
        - 3rd: Bronze, shiny
        - 4th and downwards: Beige, barely different
- Wiped with G_ClearRecords

Also, to avoid circular dependencies:
- KARTSPEED/KARTGP constants moved from command.h to doomstat.h
- gp_rank_e enums moved from k_rank.h to doomstat.h
2023-03-10 20:20:48 +00:00
toaster
f3cde6140a G_GetNextMap: Do not permit entering GPEVENT_SPECIAL if you're on Easy 2023-03-10 20:15:33 +00:00
toaster
304a7dce72 K_InitGrandPrixRank: Accomodate cv_gptest 2023-03-10 20:14:48 +00:00
toaster
8b437d5a32 Minimum viable product of Chao Keys condition bypass
- Start with 3, per Sakurai's prior art.
- Earn them per certain number of rounds
    - DEVELOP builds: once every 4 rounds
    - Release builds: once every 50 rounds
    - Has an internal cap based on the maximum number of unlockables supported.
        - Possible future work could adjust this to restrict based on the maximum number of unlockables unlocks.pk3 actually has set.
- Use on the Challenges screen to bust open small tiles with hints (or the very first tile, if you haven't unlocked anything yet).
    - Will do a funny shake if you try anything else.
- Interrupts menu flow just like getting an unlock.
    - The matches you've played will tick upwards, giving you keys as they loop over.
2023-03-09 22:33:10 +00:00
toaster
328ab0059a F_StartIntro: Disable sound credit (was relevant during routine gamedata deletion) 2023-03-09 21:47:16 +00:00
toaster
40786a006c P_MobjCheckWater: Remove wet player test print 2023-03-09 16:40:39 +00:00
James R
600063f46b Merge branch 'bot-improvements-round-12' into 'master'
Bots Again: Round 12

See merge request KartKrew/Kart!1034
2023-03-09 10:29:14 +00:00
Oni
60863a88a3 Merge branch 'quieter-wavedash' into 'master'
Quieter wavedashing

See merge request KartKrew/Kart!1035
2023-03-09 09:05:55 +00:00
AJ Martinez
85c492e848 Wavedashing no longer puts everyone in your netgame into a hurricane 2023-03-09 02:01:57 -07:00
Sally Coolatta
f2afc65af4 Merge branch 'bot-improvements-round-12' of https://git.do.srb2.org/KartKrew/Kart into bot-improvements-round-12 2023-03-09 03:07:38 -05:00
Sally Coolatta
d7256aa5f6 Give bots friction rubberband again 2023-03-09 03:06:30 -05:00
Sally Coolatta
cd2dd1315a Reduce waypoint radius for bots on turns 2023-03-09 03:06:30 -05:00