Commit Graph

149 Commits

Author SHA1 Message Date
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
toasterbabe 8a61d87961 * Add new damagetype flag (DMG_CANHURTSELF) that allows a player to hurt themselves indirectly.
* Add damagetype to P_RadiusAttack (optinteger in lua, A_Explode var1).
* Removed the prevention of MF_BOSS objects from getting P_RadiusAttacked. This was a holdover from DooM (I checked) - a way to prevent the Cyberdemon from gibbing itself when firing point blank into a wall, and also a way to make it and the Spider Mastermind harder.
* Enemies are solid to other enemies movement-wise now.
* (Fun little aside - if you remove MF_SOLID from a monitor, it now behaves like they did in Sonic Adventure (poppable by colliding with, not just attacking).
* Fixed Metal Sonic battle conflict in MF_PAIN/mass not picked up earlier.
* Miscellaneous tiny code tweaks.
2018-05-08 23:26:36 +01:00