* Fixes the orbiter component spamming RegisterSignal overrides. (#53891)
Orbiter component keeps Registering the same redundant signal every time a player decides to orbit an atom that already has people orbiting it.
One Register call to one Unregister call and we'll clean up a fuckton of stack_traces about overriding signals from the runtime logs.
* Fixes the orbiter component spamming RegisterSignal overrides.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade (#53324)
Fixes a bug caused by transferring an orbiter component to a parent where one already exists. Causing the old original orbiter to update the added ghosts positions when the parent moves, but not allowing them to ever break orbit and also setting the ref to null for the component on the whole due to old signals it would seem.
Also tweaks the blades use in hand ghost notification message to remove the redundant (Orbit) link.
* The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade
Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
* Smooth Movement: Resurrection: Resurgence: Revengeance 4: The Return of Smooth Movement: Smooth Edition Director's Cut (#52515)
Automatic glide size adjustment based on move delay.
Essentially a port of https://github.com/yogstation13/Yogstation/pull/8132 but that was mostly my code with some fixes.
Why again? well it turns out the recent byond fixes to glide size actually worked and solved the issues that were unsolvable.
https://file.house/0B3u.mp4
Glide size no longer incorrectly scales at fps, so it works as intended at any framerate with the only stuttering being normal byond suck stuttering.
* Smooth Movement: Resurrection: Resurgence: Revengeance 4: The Return of Smooth Movement: Smooth Edition Director's Cut
Co-authored-by: Rob Bailey <actioninja@gmail.com>
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)
Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.
Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.
This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.
To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.
Requested by @optimumtact.
Changelog
cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
AddComponent/AddElement now support named arguments. This requires passing around an argument list instead of using actual proc args which a bit gross but we can blame byond for forcing this.
InheritComponent uses mirrored init arguments instead of an argument list which means no more accessing it via index to get to the same arguments as in init.
As a small bonus I restructured dcs defines to be a bit more manageable. Mainly just splits them into separate files and gives them their own folder.
* Smooth movement
Squashed commit:
[870d550fff] updates a variable name to not shadow a parent variable
[65131a9a4b] redundant
[7c85f7b87e] override based pulling and pushing
[60a9760c4b] unnecessary when it's done via an override
[0a67dfb3cb] removes a redundant manual override
[7f25104fed] pushing
[2bfd9973eb] eh
[fca7155245] cast properly
[ad4b9ad8ab] compile fix
[c28fde4bfb] some wonkiness with pulling fixed
[0e028d30b3] buckling fix + finer rounding
[8f93df2bbe] dragging + buckling fixes
[1541e1ce78] small optimization
[bda72345dd] smoother movement
fix to dragging being fucky
vehicle fix
orbiter fix
eof newline
cleanup
comment cleanup
stupid hack
bunch of tweaks/hacks + 60 fps default oh god
potential fix for orbiter issues (in a shitty way)
early override for some cases
unset orbit
multiply instead of add offset
no
no more timescale scaling and higher multiplier
meant to include this in last commit
comment
* clamp to 6, 1.25 multiplier
* (poorly) fixed buckles not always propagating
* get rid of some debug prints whoops
* fixes an infinite loop
* syntax + update savefile instead of interpreting 0 different
* uuuh
* Makes a generic recursive movement tracker
* Cleans up the tracker datum in orbits
* Untracks the old tracked object if track() is called manually
* Makes the orbiter component clean up the tracker properly
one of three things.
1. They don't use RegisterWithParent or UnregisterFromParent to unregister
and register signals
2. They use callbacks which refer to a source object, which is usually deleted
on transfer, or lost in some manner, or simply makes no sense at all to be
transferred
3. the component was never designed to be transferred at all
TransferComponents gave no shits about any of this and just blindly transferred
all components, if they were actually capable of it or not.
I only noticed this because it was causing chairs to break as they would not register signals
and verbs correctly for rotation after being picked up and then placed down, and a player
reported that issue via ahelp.
Luckily we caught it before the rot got anywhere, only chairs and the shuttle subystem
tend to use this proc (Shuttle uses it on turfs), can you imagine if everything was using
this LMAO
Which is good because it's more dangerous than a loaded gun
I have added a can_transfer var, that is true when a component is valid to
actually transfer, which means the dev has actually thought about what happens when
you take the parent object away and swap it for another and all the crazy that is entailed
by this
I have done my best to audit what components are actually
transferable, but things are basically a hot mess (Thanks @Cyberboss )
The following components required edits:
Forensics:
did not register/deregister the clean_act signal properly, did not checkblood on new parent
Rotation:
did not use RegisterWithParent or UnregisterFromParent, turned out
to not be transferable anyway due to having callbacks that can be
passed in to the parent with unknown sources that we can't feasibly
reuse (i.e if you're transferred from a chair to a bed, your old rotation
call backs are no longer valid). Turns out the use case it was for (just chairs)
didn't need it anyway, so I just made it non valid for transfer.
Wet Floor:
Honestly this one is just a hot mess, it should be a subtype of the slippery
component with the extra wet turf handling.
As it is it basically manages a slippery component on top of it's own extra
functionality, so that's a major code smell.
I added registration/unregistration of the signals, and made it's pretransfer
remove the slippery component and the posttransfer add it back (via update_flags)
Components that seem transferable without issues
mirage_border
orbiter
decal
spill
storage (I hope to earth)
Attempt 2 at fixing the remaining bugs with orbits
Incorpmove had to be converted to forceMove() to make orbits able to tell when they move. They used loc setting before. This likely breaks some things but I couldn't find any particular issues. We should be overriding forceMove anyway for things that need to handle loc changes like that differently.
fixes#40544fixes#40522
cl ninjanomnom
fix: Orbiting is a little more aggressive about staying in orbit. The wisp as a result now correctly follows you over shuttle moves.
/cl
Goodbye SSorbit you ticking piece of shit
This also gives update_sight a signal so wisp code isn't hardcoded into it.