Commit Graph
516 Commits
Author SHA1 Message Date
Agent X ebe4e69ace Further improvements and document smlua_misc_utils.h 2024-12-07 12:53:34 -05:00
Agent X b1c62eee17 Improve auto documentation system 2024-12-07 11:39:29 -05:00
John S c106a842c1 Add descriptions to the auto-doc (#545)
Cleaned up math_util.h a little bit and added a description system for use with the autodoc.
2024-12-07 11:31:11 -05:00
Agent X 6bac2f4dfc Add mod_file_exists 2024-12-05 18:40:42 -05:00
Agent X 6801e7df8f Add mod_storage_exists 2024-12-05 18:28:57 -05:00
Agent X 7a173bd130 Disallow another dangerous function 2024-12-01 16:58:45 -05:00
Agent X a380f9f14b Expose more lag compensation things to Lua 2024-12-01 16:46:05 -05:00
Isaac0-dev 9121765978 fix a buffer overflow in smlua_text_utils 2024-11-30 07:30:57 +10:00
Blockyyy a48cb0f5d1 add set_room_override (#522)
lets you override the displayed room, do set_room_override(-1) in order to get back to normal
2024-11-29 07:48:19 +10:00
John Sandjs a0ae9ca71c Additional Fix for sqr, max, and min Functions Focusing on Improved Performance and Documentation Support (#529)
Co-authored-by: js <js@archlinux.local>
2024-11-28 08:56:16 +10:00
xLuigiGamerx 3893456d8f Exposed djui_language_get() (#524)
* Removed unintentionally exposed function and disallowed it in autogen

* Exposed djui_language_get to lua
2024-11-28 08:11:27 +10:00
xLuigiGamerx 93de24f8d1 Fixed the playerlist and modlist not updating their themes and added djui_menu_get_theme() (#519)
* Fixed the playerlist and modlist not updating their theme instantly

* Added djui_menu_get_theme()

* Removed text

* Fixed syntax error
2024-11-26 16:50:47 +10:00
Sunk 1fc2717e22 Rework PvP Balance (#357)
* PvP Rework

This rearranges the damages of last PR. The underused attacks should still see some buffs.

* Adjust how punches apply invincibility

Also increase punch invincibility timer to 12

* EmeraldLoc's easy suggestions

* Rework punching pvp

Punching no longer reduces invincibility frames. Instead, punches can ignore knockback invincibility and the full punch punch kick combo can be done.

* Adjust numbers

Breakdances should not deal 3 damage

* Potential fix for more common tripping

"Trip" here refers to 1 damage kicks

* Add temporary invincibility to rollouts

This is a test to see how different pvp feels with this change. Suggestion by sausrelics.

* Fix invincibility

* Prevent low damage/low knockback kicks altogether

* Update ignored attack list

* Allow dives to be attacked by most actions

A lot of people don't want dives to be entirely invincible and some suggested to make dives be able to only pierce through jump kicks

* Slightly nerf kick knockback

Suggestion by emily

* Rework dive piercing

Instead of all actions being able to hit dives other than jumpkicks, now only slidekicks (and ground pounds) can hit dives.

* Mild kick knockback increase from nerf

* Change direct equality to checking flag

* Decrease dive and punch knockback

* Prevent trades against dives with slidekicks

* Revert "Prevent trades against dives with slidekicks"

This reverts commit 2a2c3266a75d7ecc171ece1d983f87cf76739049.

* Allow ground pounds to always hit a sliding player

* Add server setting to change pvp

* Add pvp settings to config

* Add selection to menu

* Fix issues + autogen

* Rewrite goto statement to not use goto
2024-11-25 20:48:40 +10:00
Sunk 1d6a862202 Custom exclamation boxes (again) (#360)
* Unhardcode exclamation boxes

Part 1 of creating custom exclamation boxes

* Add `set_exclamation_box` and `get_exclamation_box`

Part 2 of creating custom exclamation boxes

* Exclamation box docs

Part 3 of creating exclamation boxes, although this was entirely optional

* Safety check

* Add a warning

* Remake component check

* Update warnings

* Check for subtables not being tables

* Reduce exclamation box size

This matches how many contents could exist in vanilla due to its hardcoded id 99 check. This check allows me to reasonably assume that no romhacks have more than 99 custom contents. Other mods that may use this function really shouldn't need more than 99 contents either.
2024-11-25 19:26:37 +10:00
Isaac0-dev 750d3ac179 add a way to find surface types in collision 2024-11-22 08:57:37 +10:00
Isaac0-dev 313351df24 fix an oversight 2024-11-21 15:10:21 +10:00
Cooliokid956 b728d5a7c2 Add location label override (#390) 2024-10-27 15:52:17 +10:00
Cooliokid956 60ad4c9f07 Various FOV fixes and additions (#384)
* interpolate all fovs

* perfected the fov equation

just the facts

* create fov coefficient function

use it to scale units along with fov

* add get_current_fov

returns the current fov
2024-10-22 11:04:46 +10:00
Drahnokks 54db59759b add controller.buttonReleased (#379) 2024-10-20 09:25:08 +10:00
Isaac0-dev 167ba88a37 fix some issue with recent prs 2024-10-18 12:47:24 +10:00
John Sandjs 9950a535e7 Update math_util.c and math_util.h to support autodoc with trig functions (inline instead of macros) and add new functions to smlua_math_utils (#359)
* Update math_util.c and math_util.h to move toward inlining functions instead of macros for autodoc. Expose some misc functions useful to lua

* Fix formatting

* Fix math_util.c formatting

* Fix formatting for smlua_math_utils.c

* Fix formatting smlua_functions.c

* Fix type redundancy in _Generic macros

* Add checks for including the highly optimized builtin compiler functions for GCC/Clang

* Add compiler checking for absx() to add in the highly optimized GCC/Clang builtins

* Fix repeated use of float built-ins for non floating point numbers

* Fix grammar mistake

* Fix functions to use camelCase as requested.

* Fixed the use of a custom sqrt approximation as modern procs have a built in FSQRT instruction that is faster.

---------

Co-authored-by: js <js@cartbara.columbus.rr.com>
2024-10-18 12:20:36 +10:00
Sunk 7720f010e2 Fix early hits (#363)
Sometimes, the player can ground pound a pole before even landing or punch/kick an enemy at high speeds which will kill the enemy but not give bounce back to the player. This fixes those, although there are definitely mod incompatibilities.
2024-10-17 18:31:01 +10:00
Isaac0-dev 26f4f2fc2a typo fix 2024-10-07 22:13:19 +10:00
Sunk 5248660c67 Add some suggestions from issues (#354)
* Make dives knockback based on speed

Suggestion from issue #349

* Add `get_local_coopnet_id`

Suggestion from issue #264

* Readd breakdancing as an attack

Suggestion not only from me but also from a few players I talked with. However this was not a suggestion that came from issues.

* Change around pvp damage

Suggestion from issue #343 and some changes from talking with the creator of the suggestion

* Change `get_local_coopnet_id`

The function can now take in any local id and has been renamed to just `get_coopnet_id`

* Suggested fixes
2024-10-07 13:43:04 +10:00
Isaac0-dev eae794eaba fixes, clean up and some new features (#259)
- Only inited `smlua_audio_utils` if needed, since there will probably be plenty of people who play without ever using mods with custom audio.
- Fixed the pause anywhere setting - this ended up not being fully accurate to ex-coop, which it was originally intended to be.
- Stopped regenerating dynos collision bin on start up every time therefore giving a slight start up speed boost for some people.
- Added a config file setting that lets people choose to compress dynos bins on startup (disabled by default).
- Fixed a warning that shows on non macs during compiling.
- Properly fixed the chat box focus.
- Made the public lobby rules panel "temporary".
- Added a cleaner loading screen design.
- Added an ex-coop theme easter egg, can only be activated from the config file.
- Cleaned up the Lua traceback logging, now shows the folder and file the error occurred in, rather than the full path.
- Added a way to set `gCheckingSurfaceCollisionsForCamera`, so mods can specify to surface finding functions to ignore `SURFACE_FLAG_NO_CAM_COLLISION` internally.
- Rewrote the way smlua pushes CObjects/CPointers to Lua. Now using the C Lua API entirely to connect to Lua.
	- Fixed a use-after-free bug that could easily crash the game through Lua (explained further in one of my comments below).
- Fixed a common crash in `audio_sanity_check`.
2024-09-12 19:09:01 +10:00
EmeraldLockdown 99f5d6915b HOOK_ON_NAMETAGS_RENDER (#213) 2024-09-12 19:01:16 +10:00
EmeraldLockdown 3360dffa07 Add djui_attempting_to_open_playerlist (#195) 2024-09-06 17:08:22 -04:00
Agent X a358a8df45 v1.0.3 2024-09-01 19:00:38 -04:00
Agent X 1462425260 Merge branch 'main' into dev 2024-09-01 13:45:37 -04:00
ThePlayerRolo 7604e1adb6 Add files via upload (#286) 2024-09-01 13:43:08 -04:00
Cooliokid956 dbd4ea97a7 Add rotation interpolation (#208)
* Interpolate rotation

* Autogen'd

* Resolution 1

* Resolution 2

* Resolution 3

* Resolution 4

* Fixed jitter at low angular velocities

More in the comment below
2024-07-21 18:58:38 -04:00
Blockyyy 28f2727199 sequence_player_set_tempo, sequence_player_set_transposition (#224)
* Made Sequence function

* snake case
2024-07-21 18:56:18 -04:00
Agent XandIsaac0-dev 8f4527e19a a bunch of fixes (#216)
Nice job targeting the main branch Isaac

Co-Authored-By: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
2024-07-17 08:37:42 -04:00
Agent X 933b3c58a5 Added gFirstPersonCamera.forceYaw 2024-07-17 08:25:23 -04:00
Mechstreme e1b8d9299d Update & fix issues with #184 and #205 (#215)
* Update improved Portuguese translation

* Update hud.lua (optimizations, updated comments, +2 examples)
2024-07-16 11:58:02 -04:00
Mechstreme 2d9e461a5c Update 4 example mods (#205)
* Update 4 example mods

* localize functions in water-level.lua
2024-07-13 14:46:41 -04:00
Agent X 8d9f16274c Fix first person a little and add pitch forcing 2024-07-11 23:10:51 -04:00
Agent X b8afebceb9 Fix outdated hook name in hooks.md 2024-07-11 00:42:22 -04:00
Agent X 00fd787d69 Hide player palette color channel functions to minimize confusion 2024-07-09 15:39:02 -04:00
Agent X e94616133f Expose get_mario_cap_flag() 2024-07-08 22:13:41 -04:00
Agent X 17eb324514 Undeprecate and restore network_discord_id_from_local_index 2024-07-07 20:06:33 -04:00
Agent X cd377f1971 Change METAL back to CAP 2024-07-05 22:46:16 -04:00
Agent X 77ff4d6951 Undeprecate env region functions 2024-07-03 19:51:54 -04:00
Agent X 6dc9472ac4 Remove Waluigi anims 2024-07-01 18:32:27 -04:00
Agent X 457b6cbeb3 Expose should_push_or_pull_door() 2024-06-30 20:15:12 -04:00
Agent X 3afff38541 Remove unused Waluigi animation 2024-06-30 17:46:18 -04:00
Agent X 27d9dbd5f3 Add djui_menu_get_font 2024-06-29 16:15:44 -04:00
Agent X 8e6157b1d9 Add HOOK_ON_MODS_LOADED 2024-06-29 16:00:42 -04:00
Agent X 171976386d Add AWESOME new lighting color functions 2024-06-27 16:54:13 -04:00
Agent X 2a88d1c734 Remove legacy struct fields, fix a function name 2024-06-26 18:51:11 -04:00