GenericHeroGuy
c91eaa5e0b
Make compatmode writable, fix compatmode in nested hooks
2026-01-01 21:15:39 +01:00
GenericHeroGuy
a9c66ec217
Set lua_compatmode for console commands and cvar functions
...
Thanks Indev for finding this oopsie and the patch for command code
2025-12-16 23:23:16 +01:00
GenericHeroGuy
eb2cb338db
Add compatibility for KRITEM constants
2025-12-16 22:10:20 +01:00
NepDisk
151bb79d85
Combine LUA_Archive and LUA_Unarchive
2025-10-07 12:36:36 -04:00
Anonimus
bb1f65fcc1
Fix compiler/linker fussing and inconsistencies
...
Some things got lost in translation in the revert
2025-09-18 04:10:34 -04:00
LJ Sonic
8b2626165b
Add lua_tofixed() and luaL_optfixed()
2025-09-17 22:13:35 -04:00
GenericHeroGuy
aa1ccafaea
Use G_GamestateUsesLevel everywhere (and actually use levelloaded)
2025-08-27 22:03:05 +02:00
GenericHeroGuy
0ab3957717
Add compat to Lua unarchiving
2025-08-02 00:11:27 +02:00
NepDisk
63c244b381
Entirely remove player iterate loops from getting the dedicated server player
...
This was very annoying for writing lua and kind of redundent when you can already get the serverplayer from server
2025-07-04 03:05:35 -04:00
NepDisk
2f84779d41
Update rest of the existing files to use blankart branding
2025-07-01 00:23:30 -04:00
GenericHeroGuy
71ab72c85e
Add lua_compatmode
2025-01-24 18:25:04 +01:00
Eidolon
d08b923f06
Merge branch 'extern-c-everything' into 'master'
...
Add extern "C" in C++ to all headers
See merge request KartKrew/Kart!842
2024-10-15 14:14:43 -04:00
James R
3fb806ed71
Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive
2024-10-15 07:43:52 -04:00
Sally Coolatta
07cdd2f461
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.
2024-10-15 06:41:25 -04:00
Sal
1d8475a958
Merge branch 'hooklib-port' into 'master'
...
Hooklib refactor ported and (mostly) squashed
See merge request KartKrew/Kart!662
2024-07-31 02:30:20 -04:00
James R
8c237ae452
Replace LUA_PushLightUserdata with LUA_PushUserdata
...
See c92378fa and a7e20f70 . I didn't realize that light
userdata's metatable is shared--like numbers or strings.
So it cannot be paired with a metatable.
I also made a few minor tweaks to Lua cvars, other than
accounting for the double pointer in the userdata.
2022-03-18 12:54:22 +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
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
James R
01e7c48630
Lua tag lists
...
Index and take length of tag lists like a table, 1-indexed. There are three
methods which may be used on tag lists:
list:iterate() - returns an iterator over the tags in the list
list:has(tag) - returns a boolean whether the tag is in the list
list.shares(list2) - returns whether two lists share a tag
"find" is also an alias to "has". Each method may be accessed from the global
taglist library too, e.g. taglist.iterate(list)
Tag lists may be compared with an equality operator too. This will tell you if
the two lists are composed of identical tags.
Accessible from sector.taglist, line.taglist and mapthing.taglist.
2020-12-04 13:53:27 -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
Louis-Antoine
05ae84bd09
Fix Lua stacktrace not showing in various situations
2020-11-13 19:12:25 +01:00
Sally Coolatta
fc934b38e1
Merge public next
2020-11-10 15:32:48 -05:00
James R
745b293c47
Always allow access to the serverplayer
2020-11-05 20:00:21 -08:00
James R
cedb09bd92
Fix pointers on LUA_Archive and LUA_UnArchive
...
(servers joinable again)
2020-08-21 19:47:53 -07:00
Sally Coolatta
0dc21106e5
Lua stuff is done
2020-08-15 07:47:18 -04:00
SteelT
2b2596b4b3
Merge lua_script.h
2020-08-10 12:34:38 -04:00
Sally Coolatta
e296e1309a
YAY, round 2
2020-08-09 21:02:56 -04:00
Sally Coolatta
cc1afaa838
Merge lua_script.h
2020-08-05 14:03:53 -04: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
James R
0e25e9a074
Merge branch 'more-lua-map-names' into 'next'
...
G_BuildMapTitle for Lua, G_BuildMapName outside of levels
See merge request STJr/SRB2!694
2020-05-19 23:13:35 -04: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
Louis-Antoine
46df2b9551
Use HAVE_BLUA as fuel for my fireplace
2020-03-19 18:36:14 +01:00
Latapostrophe
6fe54eafba
Fix Lua crashes when loading without addons
2020-03-12 16:03:12 +01:00
James R
2274129f57
Update copyright year to 2020
2020-02-19 14:08:45 -08:00
James R
0f3a44887c
LUA_PushLightUserdata takes the fun out of lib_cvFindVar
2020-02-02 15:19:19 -08:00
James R
77433dd500
Allow G_BuildMapName outside of levels
2020-01-15 19:25:48 -08:00
Jaime Passos
4ebbe4e518
Move ALL the Lua global variable stuff into lua_script.c.
2019-12-23 18:49:23 -03:00
Steel Titanium
a5cdb0a4b3
Update copyright date on source files
2019-12-06 13:49:42 -05:00
Latapostrophe
0599d23254
get replays to save player lua vars
2019-09-10 11:59:17 +02:00
toaster
3b99335605
* Strip the word "function" from INLEVEL error messages, since they're now shared between access and function cases.
...
* Move it into lua_script.h, so it's available to everything that needs it.
2019-07-30 17:57:57 +01:00
mazmazz
81352aece1
WIP 20190101 merge
...
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
mazmazz
c91b2b4456
Update source copyrights to 2018
2018-11-25 07:35:38 -05:00
Monster Iestyn
1462c638cb
Added the "lua_lumploading" variable for restricting certain Lua functions to lump load time only
2017-04-25 21:45:53 +01:00
Monster Iestyn
aa146dee41
Disabled all seg_t/node_t-related Lua code for now
...
To re-enable support for the above, uncomment the define HAVE_LUA_SEGS line in lua_script.h. Plain bbox userdata stuff is not disabled (though currently it's not used anyway)
2016-11-24 21:11:44 +00:00
Inuyasha
f07585191b
copyright dates/statements updated and such
...
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Inuyasha
3235351b99
And now Lua yells at you for doing what I just fixed
2016-05-11 14:33:50 -07:00
Alam Arias
771c1ecb8a
Merge pull request #68 from Yukitty/revert-Lua-angles
...
Revert "Change angle_t handling in Lua."
2016-03-09 11:58:51 -05:00