Commit graph

81 commits

Author SHA1 Message Date
Freaky Mutant Man
3dc57d5908 Expose multiple Grand Prix, cup and round queue related structs to Lua. 2025-10-20 14:01:27 -05:00
JugadorXEI
c79b8ea9ba Lua: expose various members from player_t and others into Lua 2025-10-10 16:51:34 -05:00
Eidolon
7febf53ec0 Merge public master 2025-08-23 11:34:18 -05:00
JugadorXEI
227c3fa3ad Respawn/Waypoints library for Lua 2025-08-23 00:14:38 +00:00
Eidolon
55388c17c2 Merge public master 2025-08-21 20:43:28 -05:00
JugadorXEI
1e2e833d80 Bot library for Lua (botvars getter/setter, bot functions) 2025-08-22 01:24:13 +00:00
Eidolon
d777e5e64c Merge public master 2025-08-21 19:55:55 -05:00
JugadorXEI
8c68fefa17 Lua library for t_splash_t, t_footstep_t, t_overlay_t and terrain_t (getter, setter and num) 2025-08-21 09:35:06 +02:00
Eidolon
43b93daaad Merge public master 2025-08-20 20:55:46 -05:00
JugadorXEI
67419a95de Expose loop variables to Lua (get only) 2025-08-08 13:51:00 +02:00
JugadorXEI
12ab7185e1 Item Roulette lib (includes getters and setters so far) 2025-07-04 15:16:24 -04:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
haya_underscore
ff035e0af5 Expose follower array and follower_t to lua 2024-08-22 13:05:41 +00:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
Oni
79796b00f5 Merge branch 'sprite-brightmaps' into 'master'
Rudimentary sprite brightmap support

See merge request KartKrew/Kart!801
2023-02-02 05:49:31 +00:00
Sally Coolatta
5b147f59ed Add sector action
Linedef actions, but on sectors. Including args, stringargs, and unique activator flags.
2023-01-06 05:31:53 -05:00
Sally Coolatta
a0adb05c9b Merge branch 'master' into acs 2022-12-31 15:04:51 -05:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
Sally Coolatta
3135d14387 Replace LinedefExecute hook
- It is now called the "SpecialExecute" hook, since it can be called from ACS in addition to linedef specials.
- The input arguments are completely different now. Instead of (line_t, mobj_t, sector_t), it's (activator_t, args array, stringargs array). activator_t is userdata containing valid, mo (mobj_t), line (line_t), side (side_t), sector (sector_t), and po (polyobject_t).
2022-12-27 09:24:59 -05:00
James R
c90d4f8b97 Lua spriteinfo brightmap support 2022-12-05 13:34:07 -08:00
Sally Coolatta
4c3f89cdf7 Allow freesloting & editing precipprops
Allows for custom weather types.

In SOC:
```Freeslot
PRECIP_GROOVY

Weather PRECIP_GROOVY
Type = MT_PARTICLE
Effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING```

In Lua:
```freeslot("PRECIP_GROOVY")

precipprops[PRECIP_GROOVY] = {
    type = MT_PARTICLE,
    effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING
}```

Then in level header, simply set `Weather = PRECIP_GROOVY`.

Other properties are part of the object itself:
- Falling speed is set as the object's speed
- Sound ID is set via the object's SeeSound
- Sound frequency is set by the object's Mass.
2022-05-31 09:03:06 -04:00
toaster
884064049e * Allocate the "MISSING" patch only once, statically, at first boot via missingpat, and prevent it from being freed.
* Rework HU_UpdatePatch to HU_UpdateOrBlankPatch with a "required" boolean.
    * If desired graphic is not present in resources:
        * If required is true, return `missingpat`.
        * If false, return NULL as before (font compatibility).
    * Add an alias with the previous function signature, so you don't need to add a million `true`s everywhere.
* Remove a ton of irrelevant graphics the game attempts to cache only because of code inherited from vanilla SRB2.
* Remove the unused hudinfo system, also inherited from vanilla SRB2.
2022-05-14 14:56:02 +01:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01: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
Latapostrophe
0657e1bb38 player.respawn wasn't pushed either?? 2021-01-31 22:24:41 +01:00
Latapostrophe
aee76fe88d expose karthud to lua. bruh. 2021-01-21 22:18:00 +01:00
Nev3r
9d99a7880e Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-tag-iterator
# Conflicts:
#	src/doomtype.h
2020-12-16 17:27:44 +01:00
James R
1c6133a39a Lua: taglist.add and taglist.remove for sector tag lists 2020-12-05 02:02:06 -08: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
Steel Titanium
acf0d768fb Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-skinsprites 2020-12-03 17:29:08 -05:00
Steel Titanium
e41d1632c5 Allow access to skin.sprites[]
Only numframes so far though, as there's already a function for what spriteframe provides.
2020-11-07 23:55:37 -05: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
Monster Iestyn
d3f61027f8 Added polyobj.vertices and polyobj.lines to Lua 2020-09-09 21:15:02 +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
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -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
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
SwitchKaze
77a501ecae Fix typo SKINCOLOT 2020-05-24 12:36:20 -05:00
SwitchKaze
afe56667b8 Update to 2.2.4 2020-05-22 16:47:51 -05:00
Nev3r
dec80cb2a7 Add mapthing arg support. 2020-04-11 12:54:34 +02: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
Nev3r
63fb8f846b Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-03-11 09:31:31 +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
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00