Commit graph

60 commits

Author SHA1 Message Date
Lactozilla
5203133f72 Remove Lua lighttable 2023-11-30 19:13:26 -03:00
Lactozilla
0a3f2ec4f8 Merge remote-tracking branch 'stjr/next' into lua-extracolormap 2023-11-23 13:38:31 -03:00
LJ Sonic
4fa4d6e076 Implement input.ignoregameinputs 2023-10-27 17:34:29 +02:00
Lactozilla
b670f97ed1 Add lighttable_t support 2023-08-04 00:36:11 -03:00
Lactozilla
4ea2887d7f Lua colorlib: extracolormap support 2023-08-04 00:31:51 -03:00
spherallic
1470d099e3 Update copyright year & credits 2023-03-31 14:53:31 +02:00
Eidolon
366ee4ad92 Revert "Merge branch 'gamepad-refactor-lua-features' into 'next'"
This reverts commit 7f1cafcd3d, reversing
changes made to 696e2ab909.
2023-01-26 19:26:24 -06:00
Jaime Ita Passos
f0c3de6976 Add gamepad library and hooks for Lua scripting 2022-11-14 02:18:24 -03:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
LJ Sonic
9b7263855e Prevent input.setMouseGrab from interfering with window focus 2021-08-18 20:58:13 +02:00
LJ Sonic
5b949a6751 Expose keyevent_t to Lua 2021-08-14 20:33:42 +02:00
LJ Sonic
cfa48574be Merge branch 'next' into 'lua-inputs'
# Conflicts:
#   src/lua_script.c
2021-06-19 10:34:48 -04:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
SwitchKaze
3faa98cf4a Expose inputs to Lua 2021-04-02 15:45:59 -05:00
Nev3r
b642682dde 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
8dd964e3a7 Lua: taglist.add and taglist.remove for sector tag lists 2020-12-05 02:02:06 -08:00
James R
314fd2783a 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
621efbfa15 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
7d45a7c91a Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-skinsprites 2020-12-03 17:29:08 -05:00
Steel Titanium
1320f10839 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
f943f247af Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2.git into register-metatables 2020-10-30 14:46:04 +01:00
Louis-Antoine
121c7da809 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
78f7998618 Added polyobj.vertices and polyobj.lines to Lua 2020-09-09 21:15:02 +01:00
Monster Iestyn
d5beae9738 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
MascaraSnake
4a0206b38d Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/p_polyobj.c
2020-06-09 09:38:01 +02:00
SwitchKaze
f508f5b881 Fix typo SKINCOLOT 2020-05-24 12:36:20 -05:00
SwitchKaze
46191cade7 Update to 2.2.4 2020-05-22 16:47:51 -05:00
Nev3r
21de33bd08 Add mapthing arg support. 2020-04-11 12:54:34 +02:00
MascaraSnake
1580e14cbc 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
892a8dd6e7 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
Louis-Antoine
e3cbdf8fab Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
Nev3r
68f60f3c29 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-03-11 09:31:31 +01:00
SwitchKaze
6415e10216 Merge branch 'next' of https://github.com/STJr/SRB2 into next-luacolors 2020-02-23 11:50:13 -05:00
James Hale
56b67a3b4f Custom skincolors 2020-02-21 21:56:39 -05:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
MascaraSnake
2d7b43c244 Implement linedef string arguments 2020-01-08 08:42:35 +01:00
MascaraSnake
68da1856da Implement linedef args (unused and untested so far) 2020-01-02 12:23:14 +01:00
Jaime Passos
c6f36fc470 un-ROTSPRITE rollangle and spriteinfo 2019-12-17 13:09:25 -03:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
Jaime Passos
c4d7fe7c5a finish lua spriteinfo :] 2019-11-07 23:42:14 -03:00
Jaime Passos
f739956e89 spriteinfo lua support 2019-11-07 03:11:16 -03:00
toaster
4e256b73b2 Lua save-banks!
* Array of 8 INT32's natively embedded into savedata (net and SP)!
* Initialised to zero whenever a new save (or equivalent) is started, otherwise untouched by the base game.
* Requires reservation to avoid clobber-conflicts.
    * Access via `reserveLuabanks()` - returns a read-write userdata.
    * Assign userdata to local variable or global rawset to use later.

Mostly for future SUGOIlikes, but I'm sure someone could figure out an unrelated usage eventually.
2019-08-24 18:25:27 +01:00
mazmazz
075f28b7c8 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
Monster Iestyn
11cb163435 Backport the Blockmap library I made two years ago 2018-11-30 17:11:11 +00:00
Monster Iestyn
1b2aea81dc Merge branch 'master' into next 2018-11-25 20:39:17 +00:00
mazmazz
ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn
268bde3fdf Merge branch 'public_next'
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
#	src/dehacked.c
#	src/g_game.h
#	src/hardware/hw_draw.c
#	src/hardware/hw_main.c
#	src/lua_baselib.c
#	src/lua_hook.h
#	src/lua_hooklib.c
#	src/lua_hudlib.c
#	src/lua_libs.h
#	src/lua_maplib.c
#	src/lua_script.c
#	src/m_misc.h
#	src/p_mobj.c
#	src/s_sound.c
#	src/sdl12/mixer_sound.c
#	src/w_wad.c
2018-11-10 15:41:57 +00:00
Monster Iestyn
e15ed742c1 add ESLOPE ifdef checks around all the Lua slope support code that was there before I was involved 2018-10-21 16:27:54 +01:00
Monster Iestyn
61fa7026a1 add vector2 and vector3 userdata types to simplify getting a slope's o/d/normal 2018-10-20 19:00:37 +01:00
Monster Iestyn
7d4e27937d Merge branch 'next' into lua-slopes
# Conflicts:
#	src/lua_maplib.c
2018-10-20 18:31:06 +01:00