Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is
Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Couls <coul422@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>
If you came here thinking this was some game feature then you are in the wrong place. Here is where I ramble about code.
This adds /datum/element as a sort of sibling to components. Only one of each type gets instanced and they do not get tied directly to any particular thing like a component does. Basically they're a very lightweight component for doing simple functionality that doesn't have much state.
Originally this concept came about as a kind of component that could be shared between many parents to reduce some resource costs. Doing this would allow us to componentize more behaviors that are a part of too many things to be viable to have a whole component for every single one. For example a component on every space turf would be entirely unviable. With elements it's much more reasonable.
This implements a prety bare framework and a couple components are migrated to it. It's ready to be used but I fully expect I'm going to need to refine how it works for all the usecases we'll want it for.
Also: this fixes the qdeleted signal. This signal isn't even possible because after qdel is done there's nothing to receive a signal anyway. I've changed it to a qdeling signal instead. I need it to work for some elements to know when to clean themselves up.
* knockback component can now be reversed, has projectile and gun handling, and hostile simplemob handling
adds signals for hostile mobs attacking, altering projectiles before firing, and for when projectiles successfully hit their target
moves knockback handling to a general proc
adds ishelpers for guns and projectiles
* no more weird projectile handling it can just not apply the effect if the component somehow goes away
lifesteal actually works now instead of being a blank file, applies a flat healing effect when you hit something
* fixes up comsig stuff
adds new components to the fantasy prefix and suffix
knockback now handles throwing anchored objects
lifesteal now properly heals the target with projectiel weapons
adds summoning component to handle mob summoning with item attacking and such
adds fired_from variable to handle what a projectile was fired_from, firer would be the mob that fired and fired_from would be the gun, in the case of an autoturret, fired_from and firer would be the same
adds shrapnel component, fires projectiles around a fired projectile when it hits
adds igniter component to set attacked mobs on fire
* no more shrapnel on items that can't use it
summoning items now summon at least one mob maximum
adds specific weighted projectile types for shrapnel to prevent broken options being picked
removes the reverse var from knockback component and instead just handles negative thrown turf
* Tendrils are now structure based
* Re-adds tendril wipe achievement
neatens up ash walker variables
gets rid of unnecessary variables in hivelord
* Marks spawner children as admin spawned