Commit Graph

8 Commits

Author SHA1 Message Date
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
MrMelbert
0d4b56435b Converts drowsy and eye blur to status effects, striking yet another two carbon level status vars (#71950)
## About The Pull Request

You know the deal by now.

- Drowsiness is now tracked via status effect.
- Eye blue is now tracked via status effect.

In converting these over, cleaned up a bit of code relating to some
other effects. Attempts to unify behavior between some of them, namely
certain biotypes or mob types shouldn't be experiencing certain effects.

## Why It's Good For The Game

More stuff moved to status effects, slightly more cleaner and better to
work with code. Allows for all mobs that can sleep to be able to get
drowsy, too.

## Changelog

🆑 Melbert
refactor: Drowsiness and Blurred Eyes are now tracked via status effect.
/🆑
2022-12-26 19:58:21 +01:00
MrMelbert
cffce8de2c Status effect process has SHOULD NOT OVERRIDE (#71594)
## About The Pull Request

Adds `SHOULD_NOT_OVERRIDE` to status effect process.

Nothing currently does it but another PR attempted it which is
incorrect.

## Why It's Good For The Game

Status effect subtypes shouldn't extend or override process. They can be
`qdel`ed at the end, and not everything will handle it properly.

Adding processed effects should be done in `tick`, with a set
`tick_interval`.

## Changelog
 
Not necessary
2022-11-29 15:11:13 -08:00
MrMelbert
79ffefa06d Allows Fully Heal to be passed a series of flags, fixes Adminordrazine being horrible (#71123)
## About The Pull Request

- Fully heal can be passed a series of flags detailing what all is
healed by the proc. This allows for things to provide
almost-but-not-quite fully heals.
- Uses this in Adminordrazine, so that it stops being a pain to update
every time fully heal is updated.

This includes some small balance changes which i'll go over, nothing
extremely noticable.

## Why It's Good For The Game

Allows for more precise control over full heals. 

## Changelog

🆑 Melbert
refactor: Fully heal can be passed a series of flags. As a result, some
things which previously did a full heal might heal slightly less, or
some things which did partial full heals might do slightly more.
fix: Adminordrazine will no longer completely break every facet of a
person
admin: Ahealing a changeling will refill all of their chems.
/🆑
2022-11-17 10:09:00 -08:00
MrMelbert
07496cf652 Fixes two status effect related hard deletes (#70026) 2022-09-20 12:23:34 -07:00
SmArtKar
442ef897bc Refactors firestacks into status effects (#66573)
This PR refactors firestacks into two status effects: fire_stacks, which behave like normal firestacks you have right now, and wet_stacks, which are your negative fire stacks right now. This allows for custom fires with custom behaviors and icons to be made.

Some fire related is moved away from species(what the fuck was it even doing there) into these as well.
Oh and I fixed the bug where monkeys on fire had a human fire overlay, why wasn't this fixed already, it's like ancient.

Also changed some related proc names to be snake_case like everything should be.

This allows for custom fire types with custom behaviours, like freezing freon fire or radioactive tritium fire. Removing vars from living and moving them to status effects for modularity is also good.
Nothing to argue about since there's nothing player-facing
2022-05-04 23:52:07 -07:00
MrMelbert
074da65fc7 Converts drunkness and dizziness to status effects. Refactors status effect examine text (and, subsequently, stabilized black extracts). (#66340)
* Refactors dizziness into a status effect

* Refactors the dizziness setter to use the new kind

* Drunkness.
- Should drunk continue to work off of a magic value or be swapped to duration? I've not yet decided: For understandability it's preferabale for "drunk" to use a timer (they are drunk for 3 more minutes), but both adding drunk and decreasing drunk currently use weird calculations which would be difficult to carry over.
- Ballmer is a liver trait

* Dizzy was a setter, not an adjuster

* Does all the drunk effects over
- refactors examine text fully
- refactors stabilized blacks because of this

* Removed

* repaths, fixes some issues

* Minor fixes

* Some erroneous changes

* Fixes some dizziness errors

* Consistency thing

* Warning

* Undoes this change, I dont like its implementation

* max_duration

* Max amount

* Should be a negative

* max duration

* drunk doesn't tick on death

* Rework dizziness strength

* Erroneous dizzy change

* Fixes return type
2022-05-04 23:33:59 -04:00
MrMelbert
61e45109cc Auto-docs + code improvements + splits up status_effect.dm (#66362)
* Code improvements for status effects in general

* Does this for now

* Throws in a qdeleted check

* A return

* comment tweak

* Missed some ref()s

* Wrong var

* Comment clarifications

* Some more comment clarifications
2022-04-21 15:59:46 -07:00