Commit graph

246 commits

Author SHA1 Message Date
toaster
93de95d8f8 Add a little more info to Host menu (text only)
So you have a representative idea of what each submenu contains
2024-03-29 22:04:16 +00:00
James R
a9e181cde5 Prevent CV_NOSHOWHELP cvars from being accessed or modified through the console at all 2024-03-01 07:34:20 -08:00
James R
ed832c5486 Rename Easy, Normal, Hard to Gear 1, 2, 3 in non-GP contexts 2024-02-27 06:18:36 -08:00
James R
4ee00d4333 Pass const pointer to all netxcmd handlers
Ensure buffer data is read-only and not modified by
handler
2024-02-11 05:42:07 -08:00
James R
30e8d1663d Register a bunch of commands with COM_AddDebugCommand, so they show up on the cheats menu
- angle
- archivetest
- assert
- bind
- causecfail
- clearscores
- countmobjs
- crash
- debugrender_highlight
- devmode
- displayplayer
- downloads
- eval
- gametype
- give
- god
- goto
- gravflip
- grayscale
- help
- hurtme
- isgamemodified
- listmapthings
- listwad
- memdump
- memfree
- minigen
- musicdef
- noclip
- numthinkers
- objectplace
- ping
- playsound
- randommap
- resetcamera
- respawnat
- restartaudio
- rteleport
- savecheckpoint
- scale
- setrings
- setscore
- setspheres
- showmap
- showscores
- showtime
- skynum
- teleport
- togglemodified
- tunes
- version
- view
- weather
2023-09-01 22:13:17 +01:00
James R
9dc277bc3d command.h: define xcommand_t, add COM_AddDebugCommand
This will become useful soon...
2023-09-01 22:13:17 +01:00
James R
e3da061192 cecho command: don't add trailing space
Fixes centering for cechos of only punctuation.
2023-08-27 15:11:14 -07:00
James R
ae2fdcbd12 cecho command: use titlecard font 2023-08-26 21:39:18 +01:00
James R
64a112e358 Pause menu: add cheats menu
Automatically populated with every cheat cvar.
2023-08-25 17:35:29 -07:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
James R
ccd1450b73 Add 'reset' command to reset a cvar to its default value 2023-08-11 13:10:27 -07:00
James R
7c3d3282f0 Merge branch 'console_sanity' into 'master'
Console Sanity

Closes #517

See merge request KartKrew/Kart!1344
2023-07-19 22:17:10 +00:00
SteelT
05b130b422 Add CV_TrueFalse as possible value types for console variables
This also adds support for using true/false as value aliases for On/Off, Yes/No or 1/0

# Conflicts:
#	src/command.c
2023-07-18 20:39:08 +01:00
toaster
a07a9e2191 Don't use skincolor unlocks in situations where gamedata is inappropriate
- Recieving a different client's XD_NAMEANDCOLOR
- Loading profiles on game boot
2023-07-18 10:50:25 +01:00
toaster
1ec5b74892 Implement SECRET_MEMETAUNTS
Permits "Meme" player taunt voice and "Meme" follower horn options
2023-06-28 19:31:40 +01:00
toaster
5036719280 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into seeecret-colors
# Conflicts:
#	src/k_menudraw.c
2023-06-26 23:25:47 +01:00
toaster
fde06aace2 CV_SetValueMaybeStealth: Correctly null terminate tmpskin for forcecharacter 2023-05-30 12:21:40 +01:00
toaster
0964ba5c7b COM_Help_f: Adjust Color_cons_t (and catch Followercolor_cons_t) per review 2023-04-25 14:19:53 +01:00
Sally Coolatta
c486ec19af SECRET_COLOR 2023-04-25 14:19:52 +01:00
toaster
5296ab1397 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-04 20:09:48 +00:00
James R
a2493bb9db Purge control characters from COM_Args 2023-03-02 22:56:09 -08:00
toaster
102ada37ca Unlock system: Imprement SECRET_MASTERMODE
- Locks Master difficulty in GP difficulty select.
- Remove SECRET_LEGACYBOXRUMMAGE at the same time, because that plan is long dead.
2023-02-27 13:39:47 +00:00
toaster
5a97dab6d4 Merge branch 'minor-cherrypicks-270123' into 'master'
Minor cherrypicks 270123

Closes STJr/SRB2#900

See merge request KartKrew/Kart!905
2023-02-06 22:19:32 +00:00
toaster
05301d0825 Repair demos that finish without crashing inexplicably returning to titlescreen after their completion
It's because of cv_cheats' default value in DEVELOP builds...
2023-01-28 23:18:50 +00:00
SteelT
236394f639 Fix "unknown command" not being printed on dedicated 2023-01-27 23:35:02 +00:00
toaster
e7c79ab461 M_CheckNetUnlockByID
System for netsyncing unlocks, inspired by but with nowhere near as many moving parts as (STJr/SRB2!1756).
* `gamedata->unlocked[MAXUNLOCKABLES]` is duplicated to `netUnlocked[MAXUNLOCKABLES]` (or all `true` in `dedicated`
* New `local` boolean for M_SecretUnlocked
* Removed last vestiges of SRB2 special stage token code because it occupied the spot in the netsave we wanted to use.
* Correct typing of multiple `m_cond` functions that returned `boolean` constants as `UINT8`s.
2022-12-09 17:26:52 +00:00
toaster
b074d6cbdd Fix the actual problem with saving in DEVELOP: cv_cheats didn't have CV_NOINIT
Also fixes a likely waiting-in-the-wings crash for the next time we make a non-DEVELOP build.
2022-11-28 19:21:02 +00:00
toaster
6d0637d39d Unlockable skins (in a way friendly to #define MAXSKINS 255)
Mammoth commit, sorry. I only realised halfway through writing it that SECRET_SKIN was only partially merged.

Ports from 2.2:
- Merge SECRET_SKIN (STJr/SRB2!1474)
    - Default skin is now handled by checking all skins for unlock status, and I_Erroring if none are available
    - Don't show skin names on game startup, to keep our secrets hidden
    - Unlockables now have string variables zallocated.
         - For skin names rather than numbers.
    - Correctly clean up memory when freeing unlockables and emblems.

Bespoke code:
- For temporary testing. `unlocks.pk3`
    - Using this for rapid testing gameboot SOC instead of patch.pk3 because of the intent to turn that into scripts.pk3
- Don't not save gamedata in DEVELOP builds, even if you've used cheats!
- `player->availabilities` is now an array of UINT8
    - (MAXSKINS + 7)/8 entries, or 32 bytes.
    - Included with XD_ADDPLAYER instead of XD_NAMEANDCOLOR.
         - Simplifies a lot of logic with respect to demos, skin changes mid-game, etc.
             - Seriously, there's a lot of random places in the code that just iterate over MAXSPLITSCREENPLAYERS and g_localplayers to update availabilities in real time in a way that's not particularly netsafe...
         - Lines up with the plan for handling unlocks when returning to menus.
         - Was included with XD_ADDBOT, but that actually overruns the netxcmd buffer at first mapload with 7 bots. We might need to consider expanding the size of the netxcmd buffer...
    - In demos, can be interpreted as both relative to the original replay and the current skin list depending on boolean context provided to R_SkinUsable.
    - Used for SF_IRONMAN (and will crash if all other skins are inaccessible).
- Grand Prix bot randomisation uses the host's unlocks.
- Don't show locked characters on the fancy new character select.
-  DXD_JOINDATA for demos
    - Replaces the dual-purpose behaviour of DXD_PLAYSTATE
    - Contains availabilities
    - Handles bot material in a different way
- Forceskin restrictions
    - Won't run in demos, because it's assumed recorded DXD_SKIN will handle all the conversions the original match had
    - Won't run if K_CanChangeRules says no
- Correctly set `mapvisited` on level visit, even in [fake gasp] MULTIPLAYER/NETGAMES!! 🥹
- Added updating unlockables and extra emblems on `mapvisited` update.
    - Currently fails to produce the cecho, but that'll be stripped out entirely in a future commit so I'm not bothered.
2022-11-27 22:53:29 +00:00
James R
a6e87ae82c Let toggle command multiple choice mode work on cvars lacking PossibleValue array 2022-11-03 05:46:22 -07:00
Sally Coolatta
80d9637dda devmode cheat online 2022-09-29 12:19:45 -04:00
James R
57a3c4109c Reset player cheat effects when disabling cheats cvar 2022-09-29 05:54:58 -07:00
James R
6426358377 Let some cheat commands work online
noclip
god
scale
gravflip
hurtme
2022-09-29 05:54:57 -07:00
James R
0444e70413 Rearrange player cheat flags
PC_GODMODE -> PF_GODMODE
PC_NOCLIP -> MF_NOCLIP
2022-09-29 02:23:07 -07:00
Sally Coolatta
b7bfa5a5c7 Don't try cheater warning if NULL netvar 2022-09-27 16:16:04 -04:00
Sally Coolatta
d61c9aefe1 Use cvar->string instead of svalue for the check 2022-09-27 15:57:31 -04:00
Sally Coolatta
e2b2b7785c Cheater warning 2022-09-27 15:22:59 -04:00
Sally Coolatta
562f5398a0 Properly say when a cvar is a cheat 2022-09-27 14:25:08 -04:00
James R
839f59a896 Make CV_CHEAT cheats disabled cvar override always work for real 2022-09-25 16:50:32 -07:00
Sally Coolatta
73aaa6baf8 As per jart suggestion 2022-09-25 18:16:07 -04:00
VelocitOni
1d2e1420f6 Merge branch 'master' into cheats-streamline 2022-09-25 14:27:17 -04:00
Sally Coolatta
1af7af8c62 Remove unused jump 2022-09-24 15:05:55 -04:00
toaster
fe49543456 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-24 19:53:36 +01:00
Sally Coolatta
a60d48202f Merge branch 'master' into cheats-streamline 2022-09-24 14:32:15 -04:00
Sally Coolatta
117d791424 Merge branch 'master' into cheats-streamline 2022-09-23 14:38:54 -04:00
toaster
abb567ab81 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-21 23:06:24 +01:00
James R
96c1c36821 Add a mode to the toggle command, cycle a set of values
toggle timescale 0.2 0.75 1

If timescale is 0.2, go to 0.75
If timescale is 0.75, go to 1
If timescale is 1 or any other value, go to 0.2
2022-09-20 08:29:22 -07:00
James R
4fb1eef8f1 command.c: refactor Setvalue, create CV_CompleteValue 2022-09-20 08:29:21 -07:00
James R
7a56e5ade6 Move choose and chooseweighted commands to command.c
Fixes disabled under dedicated and it's the appropriate
place for these. Effectively cherry pick of 35b82b6dd9
2022-09-20 08:29:14 -07:00
toaster
7e17f5456c I_Error in all situations where mapheaders were previously allocated outside of SOC.
Also:
- improved error prints for SOC condition definitions
- improved bounds checking to use `nummapheaders` for iterating over mapheaderinfo
There are still situations that use NUMMAPS like mapvisited, randmapbuffer, etc, which need to be addressed before merger.
2022-09-17 13:07:48 +01:00
toaster
acd777a77a Significant work into the play-starting experience
- Take the weird extra mini settings menu out of the Online Host Game sequence
- Make sure to actively use the server variables in Match Race creation
    - Hides the Auto options for Encore and Kartspeed on the Match Race menu specifically...
    - BUT if you leave it at the default it'll secretly set them to Auto!!!
2022-09-04 20:14:30 +01:00