Commit graph

208 commits

Author SHA1 Message Date
James R
d3f9c6e826 Remove mapmusflags 2023-11-27 05:38:20 -08:00
toaster
0762b93ef2 Tutorial skipping challenge - first pass
- Go to a MainCfg-specified map on its guessed gametype
    - `TutorialChallengeMap = RR_ZonedCity`
- Some unique settings
    - K_CanChangeRules() == false
    - If GTR_CIRCUIT, make it Hard Speed
    - If GTR_BUMPERS, die in one hit
    - If GTR_BOTS, make them all difficulty 13 of the default bot skin
    - No Medals or Spray Cans during the Tutorial Challenge
- Complete the stage in 1st place or don't bother at all
- Has the "Give up" menu option available, but no "Try Again"
- Condition for successfully completing the Tutorial Skip
    - `Condition1 = TutorialSkip`

Related bugfixes:
- Correctly wipe skipstats when returning to the Title/menus
- Typing of `ultimatemode` (hey this isn't accessible by anything right now I wonder)
2023-11-16 21:44:52 +00:00
Sally Coolatta
f02e6dbe3c Final thing args code cleanup
- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
2023-08-22 02:14:09 -04:00
toaster
45f8f1c89f Remove a bunch of unused emerald stuff inherited from SRB2
All superseded by M_CheckCupEmeralds + GTR_POWERSTONES stuff
2023-06-25 23:49:20 +01:00
Sally Coolatta
9d80323a3a Read-only mapthing_t
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.

So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
2023-05-25 14:40:55 -04:00
toaster
24d8b20124 GT_TUTORIAL
- Replaces `tutorialmode`.
- Forces gamespeed to Easy, with no POSITION.
    - Laps are currently disabled as well, but this can be changed if necessary.
- Hides Free Play.
- Does not count as a played round (except for Chao Keys).

`tutorialmap` has also been removed. This will be replaced in a later commit with something that plays nicer with Ring Racers' existing systems.
2023-04-03 00:28:37 +01:00
James R
542e5b1cdf Add -nolua command line parameter
Disables loading Lua scripts entirely.
2023-03-29 09:03:37 -07:00
Sally Coolatta
ffb65a3583 Experimental: Improve level load processing
- P_PreTicker ("defrosting") is dead. Levels now actually start on tic 0 instead of tic 2.
- Netxcmds are ran before G_Ticker, instead of after.
- All netxcmds are required to be processed before the level will finish loading (up to 5 gametics, to prevent any possible lock-up from malicious clients).
2023-03-22 10:59:29 -04:00
Sally Coolatta
f78b3f7794 Fixes for CEREMONY gamestate
- Made titlemap + ceremony code more straight-forward by being able to set gamestate in G_DoLoadLevel directly
- Demos are only recorded on GS_LEVEL (fixes crash for ceremony + titlemaps)
- Added G_GamestateUsesLevel to encapsulate all checks for using level rendering
- Added GS_CEREMONY to wipedefs
- K_PodiumSequence just checks for GS_CEREMONY now (optimization)

The game can now properly go to the podium after GP
2023-03-03 16:09:51 -05:00
Sally Coolatta
4a8dd02320 Podium cutscene basics
- Bots follow a slightly more strict path via waypoints
- Bots decide their starting waypoint path depending on their position. (The 1st place winner will start by chasing waypoint ID 1, etc)
- The map used for podium sequence can be decided via `PodiumMap = x` in MainCfg.

TODO:
- Camera work
- Add Lose / Win animation states when stopping at final waypoint
- Adjust physics so that the bots can follow the path more strictly in this mode
- Actually go to it after GP
2023-03-03 16:09:49 -05:00
James R
971d686437 LUA_EvalMath: load math lib 2023-03-02 22:56:55 -08:00
James R
917acfd16b Refactor pointlimit to be delayed until next round, like timelimit 2023-02-23 18:37:30 -08:00
wolfy852
b76557045f Change mapmusrng to UINT8 2023-02-11 08:23:57 -06:00
wolfy852
2c162b50a3 mapmusrng variable, proper sync, cleanup 2023-02-11 08:16:37 -06:00
toaster
80d19a8458 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into save_p-unglobal-alt
# Conflicts:
#	src/g_demo.c
2023-01-03 19:45:18 +00:00
James R
77d54a09fe Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2023-01-01 00:23:23 -08:00
Sally Coolatta
38a35b6f78 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2023-01-01 00:22:56 -08:00
toaster
42a6b03e48 Remove "circuitmap"
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
2022-12-31 23:27:59 +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
243f38227c Rework time limit a bit
- Make timelimitintics handled a bit more like gamespeed, encore, frantic, etc - update on mapload/starttime, not during gameplay
    - Use default setting if can't change rules - this is a surprise tool that will help us later
- Have it properly update when adjusting gametype from the menu
    - Cleaned up SV_StartSinglePlayerServer to do this
- Remove CV_SAVE to prevent time limit bruh moments
2022-10-11 23:00:44 +01:00
James R
08f9628e6c Remove kartminimap, kartcheck, kartcomeback cvars 2022-10-01 17:04:48 -07: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
toaster
a4c73b204a Kill spstage_start and spmarathon_start 2022-09-23 13:07:59 +01:00
Sally Coolatta
f89d8d15c2 Properly separate SPB & Shrink cooldowns
Also refactors some of the result -> type & amount code
2022-09-23 03:35:18 -04:00
toaster
48e9138dda Refactoring ahoy
* Instead of doing constant G_MapNumbers when finding the relationship between maps and cups...
    * Add a cache of level IDs to cups, to go with the strings.
    * Add a cache of the cup pointer to maps, so we don't have to search through all cups to find our map. (done in P_InitMapData)
    * Pre-emptive work: G_IsSpecialStage and P_GetNextEmerald now reference cup data instead of a hardcoded ID set.
* Remove a bunch of old stuff from mapheaderinfo_t/associated, and reorder what stays
    * Countdowntimer? 💥
    * Startrings? 💥
    * sstimer/ssspheres? 💥
    * forcecharacter? 💥 (distinct from forceskin)
    * interscreen? 💥
    * sstage_start/end and smpstage_start/end? 💥💥💥💥
    * You've been blocked
* G_MapNumber now returns a special NEXTMAP_INVALID if not found, for more consistent reference.
* Incorporate a good chunk of the `edit-headers` branch. Can't clear maps individually because of the new restrictions on sequential mapheaders, but we can add a "disable in vote screen, not even for map hell/archive" flag to a map at some future juncture for equivalent functionality...
2022-09-22 17:14:41 +01:00
toaster
1a284ec7c6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers
# Conflicts:
#	src/d_netcmd.c
2022-09-17 13:57:26 +01:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
James R
37c3a55dda Fix conflicts 522467a88 2022-09-05 11:56:30 -07:00
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
Sally Coolatta
c8718b25ff REMOVE hyubgone + all of the other bullshit we did to try and make it show up less 2022-05-22 21:17:14 -04:00
LJ Sonic
c977a7d451 Fix again 2022-03-18 18:31:46 +00:00
LJ Sonic
ef1ff6c94b Fix incorrect error message during Lua archiving 2022-03-18 18:31:38 +00:00
Nev3r
2e7e61f787 Remove &, since args and stringargs are arrays 2022-03-18 17:28:15 +00:00
Nev3r
de0119fd78 Forgot the stringargs. 2022-03-18 17:28:06 +00:00
Nev3r
7c8beb9229 Bugfix - Fix sporadically occurring incorrect userdata types in Lua, caused by previously loaded userdata which didn't get invalidated in previous sessions.
Invalidate userdata for line and mapthing args.
Invalidate userdata for slopes and their normal, origin and direction vectors.
2022-03-18 17:27:57 +00:00
James R
b1890385f4 Revert "Merge branch 'lightmemedata' into 'next'"
This reverts commit 7ff3e7f18b, reversing
changes made to dc37cdf2a6.
2022-03-18 12:54:13 +00:00
toaster
c1f3237157 Boss API + assorted relevant bugfixes, will go over the featureset of this branch with a fine toothed comb when it's time to write the merge request description so this is all you're getting right now 2022-02-24 21:19:03 +00:00
Sally Coolatta
e5d899412c FIX PARTIES 2021-04-23 03:53:35 -04:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
Sally Coolatta
de1f67b72a Use strings in the map header for next level, marathon next, thumbnails, minimaps, encoremaps, and tweakmaps 2021-04-09 21:10:46 -04:00
Sally Coolatta
d165e723be Make it through Lua 2021-03-01 01:49:05 -05:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
Sally Coolatta
d63b428565 Merge Kart-Public next 2021-02-27 02:16:21 -05:00
LJ Sonic
c5f8454093 Fix consoleplayer returning the server player during joining phase 2021-02-11 00:10:15 +01:00
Sally Coolatta
d627da7510 Fix lap executors not happening, and also edit it so they act like Each Time rather than Once
Allows for simplified executor logic on Desert Palace and Chrome Gadget, possibly Egg Zeppelin too
2021-02-01 14:34:48 -05:00
James R
a4ea83b1dc Invalidate taglist userdata 2020-12-05 02:26:00 -08:00
James R
775cb46f75 Lua taglib for accessing taggroups
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)

For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
2020-12-04 00:30:08 -08:00
LJ Sonic
079df8df4d Merge branch 'fix-stacktrace' of https://git.do.srb2.org/STJr/SRB2.git into next
# Conflicts:
#	src/dehacked.c
#	src/dehacked.h
2020-11-29 21:54:15 +01:00
Nev3r
17955311b9 Merge branch 'dehacked-hell' into 'next'
Split dehacked.c into multiple files.

See merge request STJr/SRB2!1222
2020-11-29 05:18:45 -05:00
James R
fe031088ae Lua: "defrosting" global to tell how many tics are processing in the preticker 2020-11-24 19:32:01 -08:00