* Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B
BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
* Converts all A && A.B into A?.B
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities
* Review fixes
* Geiger counters cleanup
Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now
* Moved SS*_DT defines to subsystems.dm
* Rebase fix
* Redefined the SS*_DT defines to use the subsystem wait vars
* Implemented suggested changes by @AnturK
* Commented /datum/proc/process about the deltatime stuff
* Send delta_time as a process parameter instead of the defines
Also DTfied acid_processing
* Dtfied new acid component
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities
Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
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>
* mood multiplier no longer applies per moodlet (#52632)
* mood multipliers are applied once instead of per moodlet
Co-authored-by: Theos <theubernyan@gmail.com>
About The Pull Request
Prevents ghosts from getting a detailed moodlet readout.
They can still see the face, so in most cases observing for a prolonged time will probably give you a good indication of their antag state. Though I would consider that a fairly small concern in comparison to a surefire way to find antags.
Fixes#42202
Changelog
cl
fix: Ghosts can no longer receive a detailed readout of a persons moodlets with the observe verb.
/cl
Renames mood_event.dm to _mood_event.dm so it's at the top of the folder. Very cool.
You can now apply an almost infinite amount of extra parameters to mood events. This is currently only used for one thing but could easily be expanded.
The owner of the mood_event is now the parent of the mood component and not the component itself. The typing of the variable and the way it is used in that one place suggests that this was intended behaviour. This fixes a bug where cats weren't wagging their tail when getting tabled.
mood_event's now null their owner on Destroy.
About The Pull Request
Adds 'notice' span class to all visible_messages which had no span class, making all those black messages blue.
Why It's Good For The Game
This should help differentiate action-messages from talking-messages in the chat. More actions will be blue, thus black talking-messages should pop out more.
About The Pull Request
One day I will get this right.
Sanity no longer decays if you are above the allowed mood threshold.
Neutral mood no longer raises sanity.
Aheals now restore sanity for unstable people.
Fixes#45715
Why It's Good For The Game
Getting free maximum sanity from just being on neutral mood was a bit silly and counterintuitive. The sanity for being below the maximum allowed value was also a bit harsh.
Changelog
cl
balance: another sanity rebalancing.
/cl
* Aheals now fix addictions and mood.
* Does it properly. Now uses a signal to detect the aheal.
* Removes a getComponent in living and puts that shit into the mood component.
* Fixes a small oversight with where I placed the moodie purge.
Fixes an issue related to mood. They had the wrong sanity icon when
spawned in. Yes, two is correct. Having exactly SANITY_NEUTRAL (100)
will result in slightly positive sanity.
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.
cl Floyd / Qustinnus
tweak: The Nanotrasen Physological department has realized that working at a metal deathbox is more stressful than it currently is. Mood has been slightly rebalanced
/cl
This PR is mostly a rebalance of various variables that exist withing the system. The system is now more likely to skew one of two ways instead of always hanging at neutral unless you're hungry, I plan to make it more likely to skew to one side from other things as well, and nerfed various low effort and non interesting interactions such as reading books while buffing the ones that have gameplay like drinking good bartender drinks or winning arcade games.
I also plan to add a moodlet for being in the bar; this will reinforce players to visit these areas if things get bad, or if they just want to refuel for a bit.
If you were below 0 or above 125 sanity, the action speed multiplier
wouldn't come into play. Now it does. Also prevents sanity from
constantly going overboard and being reeled in all of the time.