Files
Bubberstation/code/datums/elements
Gandalf 3f55068ac7 CI Fix (#26177)
Removes timeout_mod arg from add_mood_effect (#80964)

## About The Pull Request

Partial Revert of https://github.com/tgstation/tgstation/pull/80800

Assuming every num passed in the parameters of `add_mood_effect` is a
`timeout_mod` is incorrect, because there can be mood events that take a
numeric arg which is not meant to be multiplied against the timeout.

This leads to the same issue as multiplying it with strings essentially
(in one case, shown below, this results in a negative duration of a
timer).


![image](https://github.com/tgstation/tgstation/assets/13398309/f8af858f-04ef-4144-9a0b-2fae60b71272)


![Code_ZN176cpMqA](https://github.com/tgstation/tgstation/assets/13398309/a6ec7689-0171-4909-91cb-a17b56454eb6)

Plus having a keyword arg that may or may not actually be what the
keyword arg claims to be is really confusing and bad.

Instead here's what I propose: passing in an instantiated mood datum
itself, which has been modified, and copying the timeout from it before
discarding it.

It is not as clean as I'd prefer either, but at least it's logically
sound and the intent is clear, and it's the best I can think of short of
a major refactor of the entire system for this one small thing which is
only being used by food quality.


![image](https://github.com/tgstation/tgstation/assets/13398309/8560c066-bb0b-4066-af94-372d5ea62679)

## Why It's Good For The Game

Clearer, less smelly code.

## Changelog

🆑
code: removed the timeout_mod arg from add_mood_event, which was only
used for one thing and causes more issues than it's worth
/🆑

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2024-01-19 14:02:59 +00:00
..
2024-01-19 14:02:59 +00:00