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
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
GoldenTails
d673604b48
Split dehacked.c into multiple files.
2020-11-23 21:42:26 -06:00
GoldenTails
8a9c3c57f7
Fix a dumb typo of luaL_checklstring i made whoops
2020-11-23 21:20:17 -06:00
James R
85bf84193d
Merge branch 'make-some-lua-globals-rw' into 'next'
...
Make several Lua global variables writable.
See merge request STJr/SRB2!1233
2020-11-22 18:47:53 -05:00
Louis-Antoine
ff7ca5450f
Only call the Lua API for overridden actions
2020-11-15 01:15:58 +01:00
Louis-Antoine
05ae84bd09
Fix Lua stacktrace not showing in various situations
2020-11-13 19:12:25 +01:00
Louis-Antoine
4938015253
Replace lua_pop(-1) with lua_settop(0)
2020-11-13 15:31:11 +01:00
Sally Coolatta
fc934b38e1
Merge public next
2020-11-10 15:32:48 -05:00
James R
a247719adf
Merge branch 'register-metatables' into 'next'
...
Improve support for metatables in netgames
See merge request STJr/SRB2!1224
2020-11-08 19:30:51 -05:00
Louis-Antoine
88408619aa
Show a console error if the gamestate contains too many tables
2020-11-08 17:33:49 +01:00
James R
745b293c47
Always allow access to the serverplayer
2020-11-05 20:00:21 -08:00
GoldenTails
6126e8badf
Make mapmusflags and mapmusname writable.
2020-11-05 18:12:35 -06:00
GoldenTails
fbd20c9591
Make skincolor_* CTF color variables writable.
2020-11-05 17:38:32 -06:00
GoldenTails
cf3d6eb0af
Make stoppedclock writable.
2020-11-05 15:22:45 -06:00
GoldenTails
3125128be7
Make displayplayer writable.
2020-11-05 13:43:33 -06:00
GoldenTails
4a0fd2309e
Make gravity writable.
2020-11-05 12:39:03 -06:00
GoldenTails
69f24e34ad
Make token writable.
2020-11-05 12:38:47 -06:00
GoldenTails
7bf8a4d056
Make emeralds writable.
2020-11-05 12:37:49 -06:00
Steel Titanium
00f9e777af
Expose gamestate to Lua
2020-10-31 16:36:15 -04:00
Louis-Antoine
bbd09eace1
Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2.git into register-metatables
2020-10-30 14:46:04 +01:00
Sally Coolatta
7c2bd0d1c2
Merge remote-tracking branch 'srb2/next' into the-scary-22-merge
2020-10-24 20:50:58 -04:00
Louis-Antoine
6f707dfbda
Let Lua scripts relink tables to their metatables when unarchiving
...
This is done through the new "registermetatable" function,
in a somewhat similar fashion to "freeslot" but for metatables:
it must be called at script load to tell SRB2 your metatable
can be automatically relinked during the unarchiving process.
2020-10-03 16:31:04 +02:00
Sally Coolatta
b5fcd74ef9
Merge master
...
Slopes in a few maps are really broken ... think it's anchors, I'm gonna leave that to jart :V
2020-09-25 12:00:50 -04:00
Monster Iestyn
d3f61027f8
Added polyobj.vertices and polyobj.lines to Lua
2020-09-09 21:15:02 +01:00
Monster Iestyn
9e37ef5473
lua_script.c fixes:
...
* make sure polyobj_t userdata is invalidated at level load
* add support for syncing polyobj_t Lua variables in netgames
2020-09-09 16:09:08 +01:00
Monster Iestyn
d5030f8a02
Begin work on adding access to polyobjects in Lua:
...
* create new file lua_polyobjlib.c
* made a stub LUA_PolyObjLib function
* added META_POLYOBJ to lua_libs.h
* updated makefile, CMake and MSVC project files for lua_polyobjlib.c
2020-09-08 18:08:08 +01:00
James R
cedb09bd92
Fix pointers on LUA_Archive and LUA_UnArchive
...
(servers joinable again)
2020-08-21 19:47:53 -07:00
FlykeSpice
2424418390
Remove ESLOPE #ifdef(backport from srb2 2.2)
2020-08-20 13:02:13 -04:00
SteelT
d98aee5a8d
Restore many missing Kart globals
2020-08-18 13:01:12 -04:00
Sally Coolatta
0dc21106e5
Lua stuff is done
2020-08-15 07:47:18 -04:00
Sally Coolatta
9efdc98de6
Makes it through all kart files
...
All that's left is SDL, OGL, maybe also Lua
2020-08-15 04:42:56 -04:00
Sally Coolatta
5a6263c36b
Make it past p_mobj
2020-08-14 20:48:06 -04:00
Sally Coolatta
8731c6b7a4
Another round of fixing up
...
- gametyperules are now fitting for kart, not applied to the whole codebase though
- a few more files compile
2020-08-11 16:13:17 -04:00
Sally Coolatta
e296e1309a
YAY, round 2
2020-08-09 21:02:56 -04:00
SteelT
a7f2ab7dea
Merge lua_script.c
2020-08-04 00:45:49 -04:00
Nev3r
3d90a6aebe
Merge branch 'udmf-next' into 'next'
...
Merge udmf-next into next
See merge request STJr/SRB2!1075
2020-07-28 14:03:59 -04:00
James R
f4989f36bd
Fix a lot of stuff related to the version automation
2020-07-10 22:39:46 -07:00
Nev3r
e301d268ec
Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next
...
# Conflicts:
# src/hardware/hw_main.c
2020-06-30 20:29:48 +02:00
Louis-Antoine
9e770ceec4
Expose "server" and "dedicated" to Lua scripts
...
Careful! Both are local variables and are always false for clients,
and therefore should obviously not be used in anything gamelogic-related.
2020-06-27 15:30:23 +02:00
SteelT
dbd5198ac2
Merge branch 'marathonmode' into 'next'
...
MARATHON RUN
See merge request STJr/SRB2!941
2020-06-17 19:36:10 -04:00
MascaraSnake
3ce62d7780
Merge branch 'next' into udmf-next
...
# Conflicts:
# src/p_mobj.c
# src/p_polyobj.c
2020-06-09 09:38:01 +02:00
Louis-Antoine
c1bdfea582
Fix dofile() return incorrect values
2020-06-01 15:43:14 +02:00
LJ Sonic
ba9df9b574
Merge branch 'next' into 'dofile'
...
# Conflicts:
# src/lua_script.c
# src/lua_script.h
2020-06-01 09:28:56 -04:00
Louis-Antoine
a71f690241
Show the traceback when a Lua script error happens
2020-05-30 20:24:33 +02:00
Sally Coolatta
63917ffccc
The start of the scary 2.2 merge
...
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
Louis-Antoine
808b7b17cc
Add dofile() to Lua
2020-05-29 17:35:07 +02:00
SwitchKaze
afe56667b8
Update to 2.2.4
2020-05-22 16:47:51 -05:00
toaster
4c412d931a
Introducing Marathon Run. (I was going to call it Marathon Mode, but NiGHTS Mode being right next to it on the menu looked terrible.)
...
Basically a dedicated Record Attack-like experience for speedrunning the game as a continuous chunk rather than ILs. Has several quality of life features.
Benefits include:
* An unambiguous real-time bar across the bottom of the screen, always displaying the current time, ticking up until you reach the ending.
* Disable the console (pausing is still allowed, but the timer will still increment).
* Automatically skip intermissions as if you're holding down the spin button.
* Show centiseconds on HUD automatically, like record attack.
* "Live Event Backups" - a category of run fit for major events like GDQ, where recovery from crashes or chokes makes for better entertainment. Essentially a modified SP savefile, down to using the same basic functions, but has its own filename and tweaked internal layout.
* "spmarathon_start" MainCfg block parameter and "marathonnext" mapheader parameter, allowing for a customised flow (makes this fit for purpose for an eventual SUGOI port).
* Disabling inter-level custom cutscenes by default with a menu option to toggle this (won't show up if the mod doesn't *have* any custom cutscenes), although either way ending cutscenes (vanilla or custom) remain intact since is time is called before them.
* Won't show up if you have a mod that consists of only one level (determined by spmarathon_start's nextlevel; this won't trip if you manually set its marathonnext).
* Unconditional gratitude on the evaluation screen, instead of a negging "Try again..." if you didn't get all the emeralds (which you may not have been aiming for).
* Gorgeous new menu (no new assets required, unless you wanna give it a header later).
Changes which were required for the above but affect other areas of the game include:
* "useBlackRock" MainCFG block parameter, which can be used to disable the presence of the Black Rock or Egg Rock in both the Evaluation screen and the Marathon Run menu (for total conversions with different stories).
* Disabling Continues in NiGHTS mode, to match the most common singleplayer experience post 2.2.4's release (is reverted if useContinues is set to true).
* Hiding the exitmove "powerup" outside of multiplayer. (Okay, this isn't really related, I just saw this bug in action a lot while doing test runs and got annoyed enough to fix it here.)
* The ability to use V_DrawPromptBack (in hardcode only at the moment, but) to draw in terms of pixels rather than rows of text, by providing negative instead of positive inputs).
* A refactoring of redundant game saves smattered across the ending, credits, and evaluation - in addition to saving the game slightly earlier.
* Minor m_menu.c touchups and refactorings here and there.
Built using feedback from the official server's #speedruns channel, among other places.
2020-05-14 23:10:00 +01:00
MascaraSnake
c2037391d2
Merge branch 'next' into udmf-next
2020-05-13 10:01:12 +02:00
LJ Sonic
8b5becfcba
Merge branch 'optimise-archiving' into 'next'
...
Optimise net-archiving of Lua strings, numbers and booleans
See merge request STJr/SRB2!904
2020-05-09 16:40:28 -04:00
MascaraSnake
7f74258951
Merge branch 'next' into udmf-next
...
# Conflicts:
# src/p_saveg.c
# src/p_slopes.c
# src/p_spec.c
2020-05-01 12:44:39 +02:00
Louis-Antoine
1f830836ba
Optimise number archiving
2020-04-28 23:12:02 +02:00
Louis-Antoine
9ce73e9790
Optimise boolean archiving
2020-04-28 23:11:28 +02:00
Louis-Antoine
6ec3ec4933
Optimise string archiving and allow for longer strings
2020-04-28 22:19:44 +02:00
Monster Iestyn
a1a7c3785c
Do the same with writing ARCH_FFLOOR values in Lua archiving code (reading was already dealt with years ago)
2020-04-24 22:43:23 +01:00
MascaraSnake
d2e21afaf1
Merge branch 'next' into udmf-next
...
# Conflicts:
# src/p_mobj.c
# src/r_segs.c
2020-04-24 21:15:53 +02:00
Louis-Antoine
74e8d7f733
Rename lumpinfo_t.name2 to lumpinfo_t.fullname
2020-04-20 23:40:41 +02:00
Nev3r
860c44d953
Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next
...
# Conflicts:
# src/lua_hooklib.c
2020-04-12 09:57:19 +02:00
James R
7ff3e7f18b
Merge branch 'lightmemedata' into 'next'
...
Cvars returned by CV_FindVar did not work with userdataType
See merge request STJr/SRB2!754
2020-04-09 19:48:39 -04:00
MascaraSnake
9b76d3af6f
Merge branch 'next' into udmf-next
...
# Conflicts:
# extras/conf/Includes/SRB222_linedefs.cfg
# extras/conf/Includes/SRB222_misc.cfg
# src/p_spec.c
2020-03-21 20:04:31 +01:00
Louis-Antoine
4e7605f0e2
Make SRB2 flat like Earth
2020-03-20 18:55:29 +01:00
Louis-Antoine
46df2b9551
Use HAVE_BLUA as fuel for my fireplace
2020-03-19 18:36:14 +01:00
MascaraSnake
6645030a39
Add boolean variable that indicates if current map is in UDMF format
2020-03-15 16:23:15 +01:00
Latapostrophe
6fe54eafba
Fix Lua crashes when loading without addons
2020-03-12 16:03:12 +01:00
Latapostrophe
9abbd2d1b3
Fix Demo lua archive crash for real this time
2020-03-12 15:31:58 +01:00
Latapostrophe
ba8b962f61
Fix tiny conflict because I forgot to merge
2020-03-11 19:55:56 +01:00
Latapostrophe
5f11f7b8df
Remove debug prints
2020-03-11 19:53:52 +01:00
Latapostrophe
778ab0a2bb
Attempt to fix replay loading crash
2020-03-11 19:33:22 +01:00
SwitchKaze
99a1840101
Merge branch 'next' of https://github.com/STJr/SRB2 into next-luacolors
2020-02-23 11:50:13 -05:00
James Hale
51137837c4
Custom skincolors
2020-02-21 21:56:39 -05:00
Steel Titanium
fc042e90f0
Merge branch 'master' into next
2020-02-21 21:01:29 -05:00
James R
2274129f57
Update copyright year to 2020
2020-02-19 14:08:45 -08:00
fickleheart
b87cea3272
Expose stoppedclock to Lua
2020-02-10 00:07:01 -06:00
James R
21794e7a94
lua_pushvalue is unneeded
2020-02-02 17:22:28 -08:00
James R
0f3a44887c
LUA_PushLightUserdata takes the fun out of lib_cvFindVar
2020-02-02 15:19:19 -08:00
James R
2c9ea284a7
Kill Lua adminplayer
2020-01-12 20:04:05 -08:00
Jaime Passos
41e5789e04
Remove debugging stuff.
2019-12-28 19:50:14 -03:00
Jaime Passos
ba5516b99f
Add gametyperules to LUA_CheckGlobals.
2019-12-23 19:16:10 -03:00
Jaime Passos
62f2fcc57e
Add sstimer to LUA_PushGlobals.
2019-12-23 19:08:57 -03:00
Jaime Passos
4ebbe4e518
Move ALL the Lua global variable stuff into lua_script.c.
2019-12-23 18:49:23 -03:00
Jaime Passos
15a403c39b
Turn noglobals into setglobals, move the extra global variable handling to gamestateglobals.
2019-12-23 18:33:39 -03:00