* Refactors connect_loc_behalf into a component (#60678)
See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.
This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.
connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs.
On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image
If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs
This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.
(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)
* Update glass.dm
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* fixes hyperspace connect_loc_behalf bug (#60231)
turns out my move_stacks var doesnt work asynchronously since this bug made things with connect_loc_behalf runtime on every movement unless you somehow moved it back to the transit turf and off without it doing the runtime special.
(The sleep and hell the whole bit of code in space/Entered was unneeded, since it just happens normally as a part of move. Life is pain) -Lemon
also does misc code improvements i found while investigating ANOTHER c_l_b bug with stacks i found while testing this one, which i did NOT manage to fix unfortunately
* fixes hyperspace connect_loc_behalf bug
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Reverts Entered() passing dir instead of old loc (#59910)
* Reverts Entered() passing dir instead of old loc
Co-authored-by: Rohesie <rohesie@gmail.com>
* Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* Makes turfs persist signals
* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear
* Converts all uses of connect_loc over to the new patterns
* Adds some comments, actually makes turfs persist signals
* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work
* bro fuck documentation
* Changes from a var to a proc, prevents admemems and idiots
* Extra detail on why we do the copy post qdel
* Makes turfs persist their signals, uses this to optimize connect_loc
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc
* WHEW THAT WAS EASY
* Update ammo.dm
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Gives the slippery component a default whitelist of allowed slots (#58267)
* Gives the slippery component a default whitelist of allowed slots
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Autodocs the slippery component + changes the hardcoded slot whitelist to a variable (#57878)
* Autodocs the slippery component + changes the hardcoded slot whitelist to a variable
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* No More Calling get_equipped_items() in mob/living/Crossed(), Makes Slippery Component Work Without it (#56820)
* gets rid of mob/living/crossed and makes clown pdas work without it
* makes squeaky work without COMSIG_ITEM_WEARERECROSSED
* No More Calling get_equipped_items() in mob/living/Crossed(), Makes Slippery Component Work Without it
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Refactors how movetypes are added and removed, No timers this time. (#55444)
* Refactors how movetypes are added and removed, No timers this time.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Refactors how movetype flags are added and removed and the floating animation (#54963)
I wanted to refactor how movetype flags are added and removed into traits to prevent multiple sources of specific movement types from conflicting one other. I ended up also having to refactor the floating animation loop (the one that bobs up and down) code in the process.
Why It's Good For The Game
A way to avoid conflict from multiple sources of movement types.
This also stops melee attacks, jitteriness and update_transform() from temporarily disabling the floating movetype bitflag altogether until the next life tick.
Tested, but i'm pretty sure improvements could be made.
Changelog
cl
fix: jitteriness, melee attack animations and resting/standing up should no longer momentarily remove the floating movement type.
/cl
* Refactors how movetype flags are added and removed and the floating animation
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.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>
image
I originally was going to cut stun/paralyze duration instead but since none of them will now hard stun I think it's fair for them to keep their original duration/power as knockdown.
* Ports duplicated slipping code to a component
* Makes metal not slippery
* asdf
* Instead of cherry picking like an idiot I could just copy paster
* OOP
* And blood, don't forget Fry's blood!
* Further fixes
* A more generic fashion
* Use the new system
* Fixes
* Fix cartridge type
* Remove inertia