Commit graph

450 commits

Author SHA1 Message Date
Nev3r
f7ee0dacf2 Merge branch 'lua_mapnumber' into 'next'
Expose M_MapNumber to Lua

See merge request STJr/SRB2!1521
2021-06-01 07:43:33 -04:00
Nev3r
de0a91729b Merge branch 'buttered-lua' into 'next'
Expose P_ButteredSlope to lua

See merge request STJr/SRB2!1397
2021-06-01 07:39:19 -04:00
Monster Iestyn
ada6ec07db Fix Lua versions of P_ZMovement and its clones as well as P_MovePlayer so tmthing changes don't linger afterwards 2021-05-28 18:47:09 +01:00
flarn2006
fd82357d4f Expose M_MapNumber to Lua 2021-05-27 18:35:15 -04:00
sphere
186ef0479d Merge branch 'death-of-musicslots2' into 'next'
Remove music slot compatibility

See merge request STJr/SRB2!1321
2021-05-19 05:27:31 -04:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
James R
ed5a7f51e8 Revert "Merge branch 'lightmemedata' into 'next'"
This reverts commit d4c08a8410, reversing
changes made to e100f21dda.
2021-05-02 21:32:07 -07:00
Radicalicious
47a2710ec2 Expose P_ThrustEvenIn2D, P_InstaThrustEvenIn2D, and P_VectorInstaThrust to Lua 2021-05-01 14:05:07 -04:00
SwitchKaze
cb3a8f7a58 Remove key stuff 2021-04-02 15:46:08 -05:00
SwitchKaze
3faa98cf4a Expose inputs to Lua 2021-04-02 15:45:59 -05:00
namishere
32a4b270df Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into buttered-lua 2021-03-29 16:15:50 -07:00
lachablock
0405b3922c Do not let nonspin characters enter sectors they could not enter if standing at full height 2021-03-23 15:09:04 +11:00
SMS Alfredo
4430835a71 This might be dumb, but whatever 2021-02-14 20:49:03 -06:00
LJ Sonic
70850b0836 Deprecate P_AproxDistance for Lua scripts 2021-02-13 18:04:27 +01:00
LJ Sonic
758de501da Use R_PointToDist2 for the Lua versions of P_AproxDistance and FixedHypot 2021-02-13 18:04:12 +01:00
LJ Sonic
a58df577fe Revert "Use FixedHypot over P_AproxDistance"
This reverts commit c5474436af.
2021-02-13 17:46:29 +01:00
namishere
326be01276 Expose P_ButteredSlope to lua 2021-02-11 04:06:40 -08:00
LJ Sonic
83947d4428 Merge branch 'redundant-hypot' into 'next'
Replace P_AproxDistance with FixedHypot, and replace FixedHypot's algorithm with R_PointToDist2's

See merge request STJr/SRB2!1320
2021-01-25 18:08:25 -05:00
CobaltBW
a2fce68f14 Specialized Lua function for bot removal 2021-01-23 17:01:48 -08:00
Shane Ellis
135032c293 Correction to implicit declaration of B_UpdateBotleader() 2021-01-23 10:58:34 -05:00
Shane Ellis
2abf89e800 Update G_AddPlayer() 2021-01-23 10:13:16 -05:00
Shane Ellis
b73a15a0bf fixed G_AddPlayer not sending return value 2021-01-15 22:50:15 -05:00
Shane Ellis
4e029dbc67 Update lua_baselib.c 2021-01-15 17:45:41 -05:00
Shane Ellis
00462323c3 Revert "Implementation of lua function P_AddPlayer()"
This reverts commit 5e8313e157
2021-01-15 22:42:35 +00:00
Shane Ellis
5e8313e157 Implementation of lua function P_AddPlayer() 2021-01-15 16:50:01 -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
Sally Coolatta
c5474436af Use FixedHypot over P_AproxDistance
Not convinced that the small speed benefit from P_AproxDistance is worth the "aproximate"[sic] results it gives. Let's instead try a define to replace it with FixedHypot. In Lua, the function gives a deprecated warning.

Inspired by the hyperwall fix for vanilla, except for everything. From little testing, actively improves waypoint checks, bumping, speed checks, wall collisions, Jawz targetting, Lightning Shield attacks, so on.

The only way I see this as a potential downgrade is A_Look (and related functions) getting slower, which are barely used in Kart.
2020-12-12 14:49:25 -08:00
Steel Titanium
ab156e1709 Remove music slot compatibility 2020-12-11 23:11:15 -05: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
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
Jaime Ita Passos
5e890ee6f8 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
James R
50e15840fb Merge branch 'udmf-multitag' into 'next'
UDMF: Multitag support

See merge request STJr/SRB2!1097
2020-11-14 19:18:14 -05:00
Nev3r
fb9432ae57 Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag 2020-11-10 11:46:53 +01:00
Steel Titanium
050a22f1ce Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-musicfuncs 2020-11-08 21:20:07 -05:00
Louis-Antoine
9f851dc285 Return explicitly when failing to register a metatable 2020-11-09 00:16:40 +01:00
Louis-Antoine
e52cb7f6fa Throw an error if too many metatables are registered 2020-11-08 17:20:25 +01: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
Jaime Passos
36550725f3 P_DeleteFloorSpriteSlope -> P_RemoveFloorSpriteSlope 2020-11-05 00:42:14 -03:00
Steel Titanium
ac7781a3b3 Expose more music functions to Lua 2020-10-31 21:15:41 -04:00
Louis-Antoine
1155d875d5 Use the same names as userdataType() for userdataMetatable() 2020-10-30 15:00:13 +01: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
Nev3r
c62ef355ef Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag
# Conflicts:
#	src/lua_baselib.c
#	src/lua_maplib.c
2020-10-27 20:48:25 +01:00
James R
bd9fda8ceb Merge branch 'lua-polyobjects' into 'next'
Lua polyobjects

Closes #19

See merge request STJr/SRB2!1140
2020-10-15 19:08:54 -04:00
Jaime Passos
e63efdac13 Only create floor sprite slopes when needed, instead of always allocating them.
Has to be done manually in Lua. Use P_CreateFloorSpriteSlope, and P_DeleteFloorSpriteSlope when done with it.
2020-10-14 13:07:02 -03:00
James R
9538ca696a Merge branch 'ceilingz' into 'next'
Add P_CeilingzAtPos function

See merge request STJr/SRB2!1164
2020-10-12 17:44:51 -04:00
James R
ddb6823fe5 Merge branch 'fix-theoretical-lua-exposure-crashes' into 'next'
Fix some theoretical crashes when using the P_*XYMovement, P_*ZMovement, and P_RailThinker functions in Lua.

See merge request STJr/SRB2!1173
2020-10-08 22:01:02 -04:00
James R
c3c34c489b Merge branch 'lua-sectorsounds' into 'next'
Support sectors as sound origins in Lua

See merge request STJr/SRB2!1144
2020-10-08 21:05:01 -04:00
GoldenTails
2ae5c02050 Fix some theoretical crashes when using the P_*XYMovement, P_*ZMovement, and P_RailThinker functions. 2020-10-03 13:24:47 -05:00
Louis-Antoine
e49032eaf7 Let Lua scripts access userdata metatables 2020-10-03 18:40:37 +02: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
Snu
82ceddb2be god damnit 2020-09-30 08:10:28 +01:00
Snu
feb011ee52 Expose function to Lua 2020-09-30 07:58:41 +01:00
Tatsuru
013714a26f Encapsulate userdata checks 2020-09-14 17:33:26 -03:00
Tatsuru
454682df70 Use the sector's actual soundorg (how did it even work) 2020-09-13 13:54:43 -03:00
Tatsuru
782e559adf Check for sector_t userdata as well 2020-09-13 12:33:18 -03:00
Monster Iestyn
097986b1d9 added polyobj_t to userdataType list
(also added slope_t, vector2_t and vector3_t since they were all missing from here)
2020-09-09 21:24:07 +01:00
Zachary McAlpin
e5b6d19f57 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playercmd-kart-port 2020-07-30 15:37:41 -05:00
Nev3r
c914ac99b4 Bring back P_FindSpecialLineFromTag() for backwards compatibility reasons; emulate the old taglist behavior for this function. 2020-07-29 17:26:43 +02:00
Nev3r
c65ada7dd7 Merge branch 'next' into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
2020-07-29 13:55:14 +02:00
Nev3r
6dfe236602 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
Zachary McAlpin
117943012a Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playercmd-kart-port 2020-07-25 20:06:12 -05:00
James R
6fd9e25b11 Merge remote-tracking branch 'origin/next' into g_findmap-lua 2020-07-24 02:14:03 -07:00
lachwright
cea3f64c88 Fix default NiGHTS skin brightness for non-super characters 2020-07-20 22:24:16 +08:00
Zachary McAlpin
d26c7654ff Ported Lat's PlayerCmd hook to vanilla SRB2 2020-07-17 00:08:38 -05:00
James R
34bd0d9fe7 Merge branch 'various-color-fixes' into 'next'
Various color fixes

See merge request STJr/SRB2!1060
2020-07-13 18:24:55 -04:00
GoldenTails
ada06910dc Expose P_MovePlayer to Lua. 2020-07-12 18:02:50 -05:00
GoldenTails
4b3d6f04f8 Expose P_PlayerZMovement to Lua.
Finishing off these changes; how a player moves vertically.
2020-07-12 18:02:50 -05:00
GoldenTails
df1fd0c456 Expose P_SceneryZMovement to Lua.
Still more complex than P_RingZMovement.
2020-07-12 18:02:50 -05:00
GoldenTails
4710e4f07c Expose P_RingZMovement to Lua.
Ever wanted to move like a ring vertically?
2020-07-12 18:02:50 -05:00
GoldenTails
6d3a2919a2 Expose P_ZMovement to Lua.
Because P_XYMovement wasn't enough.
2020-07-12 18:02:50 -05:00
GoldenTails
27c25bfa1e Expose P_SceneryXYMovement to Lua.
Ironically this seems slightly more advanced than P_RingXYMovement...
2020-07-12 18:02:50 -05:00
GoldenTails
6ac3d62321 Expose P_RingXYMovement to Lua.
Ever wanted to move like a ring horizontally?
2020-07-12 18:02:50 -05:00
GoldenTails
fe67781d68 Expose P_XYMovement to Lua.
It was so easy; it took a grand total of one compile to implement!
Why wasn't this done before...
2020-07-12 18:02:49 -05:00
kaysrishaq
0f9e3554e2 various color fixes 2020-07-12 07:39:52 -04:00
GoldenTails
7015e656ce Expose P_RailThinker to Lua. 2020-07-12 00:36:22 -05:00
Nev3r
ad55f5f872 Merge branch 'udmf-next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_ceilng.c
#	src/p_floor.c
#	src/p_mobj.c
#	src/p_mobj.h
#	src/p_polyobj.c
#	src/p_saveg.c
#	src/p_setup.c
#	src/p_spec.c
#	src/p_spec.h
#	src/p_user.c
#	src/r_bsp.c
#	src/r_defs.h
2020-07-10 18:18:07 +02:00
Nev3r
fd5b05cafc Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-07-06 11:13:27 +02:00
lachwright
527e682931 Add sightcheck boolean to P_RadiusAttack
Also now destroys Egg Guard shields, and circumstantially Minuses
2020-07-04 18:27:06 +08:00
lachwright
8652bbc1a5 Knuckles changes:
- Buffed crouch landing; lasts slightly shorter and cuts speed less
- Support for swimming! Knuckles has slightly different glide controls when he has swim sprites underwater
- Improved glide controls in 2D mode
- Super Knuckles perks: land from a glide or latch onto a wall to generate a shockwave and damage nearby enemies
- Refactored skid dust
- Made super sparks use FF_FULLBRIGHT
- Added P_SpawnSkidDust and P_Earthquake to Lua
2020-07-04 01:54:00 +08:00
Nev3r
ff8759e507 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
James R
067d9b9a63 Merge remote-tracking branch 'origin/next' into gtr-fixes 2020-06-24 19:31:19 -07: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
b37c73b008 Make colors UINT16, increase color freeslots to 1024 2020-05-23 19:35:36 -05:00
SwitchKaze
46191cade7 Update to 2.2.4 2020-05-22 16:47:51 -05:00
James R
4eeae51cbb 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
Louis-Antoine
435643b958 Fix P_GetZAt for Lua 2020-05-18 16:16:45 +02:00
Louis-Antoine
d0abd6e86c Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into slope-cleanup
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_spec.c
2020-05-18 16:14:05 +02:00
Louis-Antoine
a06c4a8c98 Rename P_GetZAt to P_GetSlopeZAt and P_GetZAt2 to P_GetZAt 2020-05-18 15:23:56 +02:00
Monster Iestyn
20e4d5ab9e lib_sStopSoundByID: fixed mixed declaration and code compiler warning 2020-05-16 16:14:47 +01:00
Jaime Passos
39c5ab4e17 Merge remote-tracking branch 'origin/next' into gtr-fixes 2020-05-09 17:12:52 -03:00
ZipperQR
d0376e284a S_StopSoundByID Lua support 2020-05-06 16:22:04 +03:00
Nev3r
ab7690346d Merge branch 'udmf-thingargs' into udmf-multitag
# Conflicts:
#	src/doomdata.h
#	src/lua_mobjlib.c
#	src/p_setup.c
2020-04-22 10:54:27 +02:00
Nev3r
95c7690a40 Remove P_FindSpecialLineFromTag() 2020-04-15 10:16:49 +02:00
Nev3r
ca694c8c43 Merge branch 'udmf-next' into udmf-thingargs 2020-04-12 10:02:12 +02:00
Nev3r
4128f826b7 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
Nev3r
21de33bd08 Add mapthing arg support. 2020-04-11 12:54:34 +02:00
James R
d4c08a8410 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
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
fickleheart
05b2570ae7 Merge remote-tracking branch 'upstream/next' into lua-music 2020-03-18 22:43:07 -05:00
fickleheart
520e3c5dc3 Are these casts unnecessary...?? 2020-03-18 22:40:11 -05:00
Nev3r
68f60f3c29 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-03-11 09:31:31 +01:00
Monster Iestyn
f4cb6e1f5e Include r_skins.h instead of r_things.h in many files where all they wanted from it was skins stuff
(oddly enough, this actually revealed some secret file dependencies previously included via r_things.h! I also needed to include d_player.h in r_skins.h itself it seems)
2020-03-09 13:54:56 +00:00
Jaime Passos
4e7b47440f G_CoopGametype, for all the GT_COOP cases 2020-02-29 00:57:22 -03:00
fickleheart
352029fd76 Add music position functions to Lua 2020-02-23 17:58:32 -06:00
fickleheart
c5f3868819 Expose P_PlayJingle/Music() to Lua 2020-02-23 17:19:18 -06:00
fickleheart
40488096c0 Make P_PlayLivesJingle player optional in Lua 2020-02-23 15:40:59 -06:00
fickleheart
283bb52e7d Disable NOHUD/INLEVEL checks on Lua sound functions
None of these are implicitly sync-safe anyway, and most have
no need to be walled off from HUD code or intermission thinkers.
2020-02-23 12:50:45 -06:00
SwitchKaze
58d435484c Fix userdataType typo 2020-02-23 12:17:52 -05: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
Steel Titanium
76f26cda24 Merge branch 'master' into next 2020-02-21 21:01:29 -05:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
MascaraSnake
cae99654be Merge branch 'next' into udmf-next 2020-02-18 18:39:11 +01:00
Steel Titanium
45ab4244fc Restore this that got shifted. 2020-02-15 17:55:25 -05:00
Steel Titanium
2b678aaef0 New Lua functions: R_GetColorByName and R_GetNameByColor 2020-02-15 17:35:00 -05:00
James R
0218f58f48 userdataType can check light userdata too! 2020-02-02 15:08:22 -08:00
MascaraSnake
97c58957ee Merge branch 'next' into udmf-next 2020-01-24 22:38:26 +01:00
Louis-Antoine
fb28ede660 Rename R_IsPointInSubsector to R_PointInSubsectorOrNull/Nil
The old name made it really easy to accidentally read
R_IsPointInSubsector as R_PointInSubsector, and anyway it
didn't even make sense...
2020-01-22 16:58:57 +01:00
James R
b7b24eb5d7 Buold. 2020-01-18 15:56:03 -08:00
Jaime Passos
8bfdb52231 add R_IsPointInSubsector to lua baselib 2020-01-17 00:49:43 -03:00
James R
1e3fd79601 Expose G_FindMapByNameOrCode to Lua 2020-01-15 20:32:40 -08:00
James R
50b18acd3f Expose G_BuildMapTitle to Lua 2020-01-15 20:04:50 -08:00
James R
7d5a8ac14b Allow G_BuildMapName outside of levels 2020-01-15 19:25:48 -08:00
James R
bcd90b96d4 Add comment to lib_gFindMap so I know what the fuck I did 2020-01-15 19:01:28 -08:00
James R
a4149cfe37 Expose G_FindMap to Lua 2020-01-15 18:49:22 -08:00
MascaraSnake
2d7b43c244 Implement linedef string arguments 2020-01-08 08:42:35 +01:00
MascaraSnake
062bd7eef8 Merge branch 'next' into linedef-args 2020-01-04 23:10:39 +01:00
MascaraSnake
68da1856da Implement linedef args (unused and untested so far) 2020-01-02 12:23:14 +01:00
Jaime Passos
3b341245f1 Same deal, but for starposts. 2019-12-27 17:14:56 -03:00
Jaime Passos
1f96f70173 Preparing for the inevitable gametype rule that will handle cooplives... 2019-12-27 17:08:20 -03:00
Jaime Passos
c0390f5186 Merge remote-tracking branch 'origin/next' into rotsprite2 2019-12-26 20:27:29 -03:00
Jaime Passos
bbe946ac1e Bail out earlier. 2019-12-23 19:00:46 -03:00
Jaime Passos
d050e04dae Bail out if there are no more free gametype slots. 2019-12-23 18:58:33 -03:00
Jaime Passos
edddc3e64e Custom gametype constant support for Lua. 2019-12-23 18:54:25 -03:00
Jaime Passos
ebdd9c6257 fix warnings 2019-12-19 02:20:49 -03:00
Jaime Passos
0accadf02f Merge remote-tracking branch 'origin/next' into gametype-clownery 2019-12-19 02:15:45 -03:00
Jaime Passos
fb6f2fc9b0 Lua! Lua! Lua!
Expecting the buildbot to complain
2019-12-19 02:13:09 -03:00
Jaime Passos
c6f36fc470 un-ROTSPRITE rollangle and spriteinfo 2019-12-17 13:09:25 -03:00
Steel Titanium
ad776e560c Rework G_SetCustomExitVars to allow skipstats 2 2019-12-13 16:36:33 -05:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
Louis-Antoine
29501a992b Merge branch 'master' into exit-move-lj 2019-11-15 19:35:47 +01:00
Louis-Antoine
ff62a0732a Let players move after completing the level
This only takes effect in co-op,
and can be disabled with "exitmove off"
2019-11-15 15:35:28 +01:00
Jaime Passos
10d1b63ff2 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-11-14 12:49:03 -03:00
toaster
acc13c1a4a * Add R_SkinUsable to Lua.
* Make R_SetPlayerSkin check for usability of skin before setting, and error otherwise.
2019-11-10 16:10:34 +00: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
1155a7c3a0 Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into rvz-hardcode
# Conflicts:
#	src/p_mobj.c
2019-10-08 19:43:43 +01:00
MascaraSnake
5c1fabfaae Lava is now either completely solid or completely intangible. No more half-assing 2019-10-01 21:58:18 +02: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
toaster
8a0f1e7ed4 Merge branch 'ending' into 'master'
ENDINGS

See merge request STJr/SRB2Internal!264
2019-08-03 16:23:51 -04:00
Monster Iestyn
c82c2ee815 Merge branch 'titlemaplua' into 'master'
Titlemap Lua

See merge request STJr/SRB2Internal!270
2019-08-03 13:14:46 -04:00
toaster
7bff305672 * 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
toaster
69e573517f Fix lua scripts erroring on the title screen because they're run there but it's not counted as GS_LEVEL (aka #168). 2019-07-30 17:48:13 +01:00
toaster
47554b57e4 * Made the evaluation screen even more attractive.
* Fixed an unused variable warning in lua_skinlib.c.
- fixed post-level cutscenes playing when you get game over in MP (still kinda on-topic)
Also with apologies to MI:
- golden egg statue mode for tutorial, since the grey doesn't contrast enough with the blue and lime green
- fixed closed captions for replaced player sounds being incorrect
- fixed closed captions overlapping tutorial text
2019-07-29 14:55:36 +01:00
toaster
5dc095a47d Further improvements on MI's request, just to be safe. 2019-07-28 22:53:27 +01:00
toaster
1d799630af Made it possible to just call EV_CrumbleChain(rover) in Lua 2019-07-28 22:45:20 +01:00
toasterbabe
385d34e67e * Make busting a FOF through any in-game means (or not providing a target sector to EV_CrumbleChain) bust all FOFs with the same control sector.
* Make CA2_GUNSLINGER not get overridden by being in quicksand.
2019-07-17 21:34:04 +01:00
Jonas Sauer
166f1fac66 Fixed the thinkerlist issues by removing THINK_LIMBO. Delay-removed thinkers now stay in their list.
Also includes toaster's assorted fixes and improvements from target_painted_on_your_ass.
2019-07-13 01:42:03 +02:00
toaster
4ad1703ae3 Revert "Revert "Merge branch 'metalfixes' into 'toast_cleanup'""
This reverts commit c04b560e92.
2019-07-03 00:58:02 +01:00
MascaraSnake
c04b560e92 Revert "Merge branch 'metalfixes' into 'toast_cleanup'"
This reverts merge request !239
2019-07-02 23:49:10 +00:00
toaster
faebe0f9af Metal Sonic fixes!
* Add more context clues to his fight, including an indicator for which laser attack is being used after chargeup.
* Make missiles able to vectorise him.
* Add another laser orb attack - vertical slice - and change the laser orb sequence to accurately reflect that horizontal is the hardest of the ones in 2.1.
* Optimise TC_BLINK, and fix an issue with TC_ALLWHITE that somehow avoided coming up in testing.
* Fix colorized bosses losing their colorization when flashing, by forcing TC_ALLWHITE.
2019-06-28 20:48:14 +01:00
toaster
3eb9b85fd4 "PlayerCanDamage" hook!
* Takes function(player, mo) input.
* Return TRUE for stating that yes, the player is in a state that can cause contact damage, do with that what you will.
* Return FALSE for stating that no, the player is weak and vulnerable and cannot cause contact damage, do with that what you will.
* Return NIL for allowing the function to continue regular operation.

Fills a different ideological niche than ShouldDamage - that's for determining whether damage dished between two objects should happen, this is for determining which way around damage should be dished when considering a player-object interaction.

Or, in other words, think of it as "ShouldDamage is whether damage that has been requested should be granted, for object-object interaction, while PlayerCanDamage is for whether global player properties should cause damage to enemies and monitors in the first place, like spinning, hammering or stomping."
2019-06-19 12:55:05 +01:00
toaster
ef6e00e8a2 P_PlayerCanDamage(player_t*, mobj_t*), ported from the abandoned project_birthday because GOD the code looks awful with those huge monolith conditions in it. Available to Lua.
(Also, minor fixes to lib_pSpawnLockOn, and removing the SH_OP fuckery.)
2019-06-19 12:09:02 +01:00
mazmazz
9ec98c588f Merge branch 'public_next' 2019-03-14 22:15:34 -04:00
mazmazz
2bd794c006 Remove S_MusicExists lua 2019-01-02 06:26:18 -05:00
mazmazz
e2e345988a Add safe lua music functions
S_MusicExists
S_SetInternalMusicVolume
S_StopFadingMusic
S_FadeMusic
S_FadeOutStopMusic
2019-01-02 04:58:03 -05: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
mazmazz
b7bb570f97 Merge remote-tracking branch 'public-gl/master' into public-musicplus-core 2019-01-01 10:41:40 -05:00
Latapostrophe
b7d7472a88 Merge branch 'next' into SRB2-CHAT 2018-12-23 22:53:24 +01:00
Latapostrophe
619dd9d08a Fixed various issues: added some free()s, lua_optboolean, other things, and also made sure chat can't send empty messages. 2018-12-22 12:34:17 +01:00
mazmazz
e2b8ff26db Fix lua_pop -> lua_remove use in G_SetCustomExitVars lua 2018-12-20 10:56:36 -05:00
Digiku
dd107724de Merge branch 'lua-nextmapoverride' into 'next'
Lua: nextmapoverride & skipstats changing outside of G_ExitLevel

See merge request STJr/SRB2!396
2018-12-20 10:55:30 -05:00
TehRealSalt
42a9e66883 Let lib_gExitLevel call lib_gSetCustomExitVars, for reduced code duplication. 2018-12-18 15:03:54 -05:00
TehRealSalt
0e34e7f32f G_SetCustomExitVars for setting nextmapoverride & skipstats
This is desparately needed for KIMOKAWAIII, since there's many instances I need to change nextlevel but still want to use the existing player exit stuff.
2018-12-18 14:48:04 -05:00
mazmazz
7a92c9d3d0 Mixed D&C fixes; replace a couple int's with INT32 2018-12-17 19:02:22 -05:00
Latapostrophe
45aba493c7 2.1.21 and all of the kart additions. Woo. 2018-12-17 20:43:59 +01:00
TehRealSalt
bef3bb23f8 Undo dc92bb49 2018-12-16 21:36:54 -05:00
TehRealSalt
97639848e1 Merge remote-tracking branch 'upstream/next' into kart-luatextures-backport 2018-12-16 21:22:06 -05:00
TehRealSalt
ec53e12294 Foolish 2018-12-16 18:19:53 -05:00
Alam Ed Arias
14e98df69b Revert "Merge branch 'kart-luatextures-backport' into 'next'"
This reverts merge request !387
2018-12-16 22:57:39 +00:00
TehRealSalt
4ba23e1028 Expose R_TextureNumForName
Backport from SRB2Kart
2018-12-16 15:58:47 -05:00
Latapostrophe
25e6d5388c merge conflict 2018-12-16 16:48:15 +01:00
Monster Iestyn
33c1ac33f5 Merge branch 'next' into 21-version
# Conflicts:
#	src/d_netcmd.c
2018-12-02 15:45:07 +00:00
TehRealSalt
c70cf5908d IsPlayerAdmin support, since admin was removed
# Conflicts:
#	src/lua_baselib.c
2018-11-29 07:12:15 -06: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
4edeeb6953 Add P_GetZAt to Lua 2018-10-20 21:08:59 +01:00
mazmazz
0cfe0824b6 Lua P_RestoreMusic else if fix 2018-09-18 15:11:37 -04:00
mazmazz
66283ce36a MusicPlus core: Lua separation fixes 2018-09-18 11:39:08 -04:00
mazmazz
c45d523e8f 420: Don't interrupt existing light fade on duration timing except EFFECT5
(cherry picked from commit 3b957c32517a8f5148940c0067af7e88a51d1fee)
2018-09-18 11:08:33 -04:00
mazmazz
c5ea6b5efe MusicPlus Core (positioning and fading) 2.2 -> 2.1 backport 2018-09-18 10:22:17 -04:00
mazmazz
aeb45132c5 Revert "Snap light level to software values (32 levels)"
This reverts commit cc26d03c93.
2018-09-09 13:43:00 -04:00
mazmazz
cc26d03c93 Snap light level to software values (32 levels)
* New properties `exactlightlevel` and `lightlevel` in `lightlevel_t`
2018-09-08 23:01:35 -04:00
mazmazz
1e1b01c157 Implemented tic-based light fading
* ML_BLOCKMONSTERS specifies destvalue and speed by texture offsets
* ML_NOCLIMB toggles tic-based logic
* Added props `duration`, `interval`, and `firsttic` to `lightlevel_t`
2018-09-08 22:10:51 -04:00
Latapostrophe
b09019dc4a Fix old chat detection. 2018-08-19 11:12:21 +02:00
Latapostrophe
ac7c249fd2 SRB2chat test rework 2018-07-31 11:10:02 +02:00