* Fixes bluespace golems teleporting without cooldown (#73130)
## About The Pull Request
Bluespace golems now have cooldown on their unstable teleport ability.
It will start when they do the teleport itself rather then just clicking
the action, so spamming the action button to get teleported many times
into random points of the station is still here(it is funny and it will
be cool to keep it as a feature).
## Why It's Good For The Game
Bugfix
## Changelog
🆑
fix: Bluespace golems no longer can teleport without cooldown
/🆑
* Fixes bluespace golems teleporting without cooldown
---------
Co-authored-by: SuperSlayer <91609255+SuperSlayer0@users.noreply.github.com>
* fixes throw click cooldown not applying (#70995)
throw_item never returns anything so it just broke the whole thing. this fixes that
* Update code/modules/mob/living/carbon/carbon.dm
* Update code/modules/mob/living/carbon/carbon.dm
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Fix incorrectly passed biotype args in take_overall_damage (#73203)
## About The Pull Request
The linters in #73202 revealed to me that `heal_overall_damage` was
overridden wrong in `carbon` and left out an argument, meaning that
plausibly some places that didn't provide an argument for `stamina`
probably had an off-by-one error with args and wouldn't apply them
properly.
I fixed that in that PR because it was using it. Then I noticed that the
same problem exists in `take_overall_damage` so I am fixing that too.
I don't know if this was linked to any actual bugs, but it might cause
some. They'd be hard to spot because it'd be for stuff like "a
shadowperson with a prosthetic takes damage to their prosthetic if not
in darkness" and probably nobody would even get into that situation let
alone notice to report it.
## Why It's Good For The Game
We want arguments to do what they are supposed to do.
## Changelog
🆑
fix: Biotypes will be more consistently applied when taking damage, pod
and shadowperson prosthetic limbs won't be corroded due to light levels.
fix: Podperson and Wooden Golem prosthetic limbs won't be corroded by
having a hungry tummy.
/🆑
* Fix incorrectly passed biotype args in take_overall_damage
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Fixes some redundant / incorrect messages w/ spontaneous combustion symptom (#73227)
🆑 ShizCalev
fix: Fixed some duplicated and incorrect messages being presented when
infected with a virus that has the spontaneous combustion symptom.
/🆑
* Fixes some redundant / incorrect messages w/ spontaneous combustion symptom
---------
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
* Deletes Rapid_melee on wendigo (#73189)
Deletes Rapid_melee on wendigo.
Currently Wendigo has a rare chance (or maybe some weird trigger that I
was only rarely able to activate) of activating rapid_melee, causing it
to attack 8 times per second. I don't think Wendigo doing 224 damage to
someone wearing Ash Drake armor is intended so I think it's safe to say
this is an unintended bug.
* Deletes Rapid_melee on wendigo
---------
Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com>
Removes friendly fire from space dragon (#72990)
## About The Pull Request
Space dragon fire breath no longer oneshots allied space carps, now it
doesn't damage them at all. Carps that aren't dragon minions are
unaffected.
Closes https://github.com/tgstation/tgstation/issues/72985
## Why It's Good For The Game
It is fun to play as a dragon's carp minion, but it is very hard to
normally work in a team with the dragon due to the fact that dragon's
fire breath oneshots you. This PR makes playing as a dragon's carp more
sane and allows carps to actually defend the carp rifts as they should,
while not being instakilled by their master.
## Changelog
🆑
balance: Space dragon fire breath no longer damages allied space carps
/🆑
---------
Co-authored-by: SuperSlayer <91609255+SuperSlayer0@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Fixes plasmamen dying from liver damage when consuming plasma & other organic toxins, fixes plasma fixation for plasmamen and other species (#72644)
## About The Pull Request
(edited for brevity---AS BEST I COULD, this turned into a lot more fixes
than I set out to do)
Instead of actually removing and metabolizing plasma in the liver,
plasmamen were having plasma removed in a special handle_chemicals proc.
The issue with this is that the liver's on_life proc would still fire
off alongside it, detecting reagents in the mob (because
handle_chemicals removes them little by little, at the same rate as the
liver does). And because the liver code sees it as a toxin, it takes
damage until it fails, leading to death as described in #72229.
Not actually metabolizing plasma also led to another issue, as mentioned
in #61424.
The solution after much faffing around ended up being to move the actual
reagent removal from handle_chemicals to the liver code, and to compare
a toxin's affected_organtype to the liver's 'status' var to check if the
toxin can damage the liver. There was currently only an ORGAN_ORGANIC
and ORGAN_ROBOTIC defined for this, so I added ORGAN_MINERAL for plasma
livers.
It still works as before, but now the reagent will actually get all the
metabolism procs called on it and be removed by the liver. And mobs with
mineral livers (currently only plasmamen) do not suffer organ failure
from processing organic toxins.
Plasma fixation itself also needed some TLC, as it was likely written
before liver damage was a thing. A lot of this comes down to rogue
livers operating independently of their species now that I think about
it...
Fixed it so you no longer take liver damage from injected/consumed
plasma when under the effects of the stage 4+ virus by making use of the
new PLASMA_LOVER_METABOLISM liver trait.
---
On top of that made it so that breathing in plasma through internals
also contributes to plasma fixation healing. This is a slight buff to
virology (especially for plasmamen) but it didn't seem busted or
anything from my testing. Can lead to some interesting subtle approaches
to healing for virologists as they can use internals rather than just
flooding rooms with plasma...
Some notes:
- due to the way lungs are coded, non-plasma breathing species take a
significant amount of tox damage from breathing plasma through internals
in most cases and still need the right gas to be present so as to not
asphyxiate.
- During my testing this damage did not get healed fast enough to make
it viable for humans to wear plasma internals as found in spawned tanks
and such.
- I did not play around with creating custom internals mixes of O2 and
plasma but in theory that could possibly allow humans to heal faster
than the tox damage is applied. I think the tox damage on breath is
based on the amount of mols in the tank so perhaps a small amount of
plasma in the mix could work.
- As it stands the heal is very slight at 4kpa which is the typical tank
pressure for plasma internals. Going up to 15kpa can result in a
stronger heal (on par with injecting plasma) but going further offers no
additional benefit, and internals will be consumed much more quickly.
- This heal bonus is multiplicative with the rest, but from my testing
it still stays within reasonable numbers even with all 3 sources going
at once so as to not feel broken.
- Plasma fixation does not heal organ damage, but if I could add that in
easily enough should it be wanted.
The numbers themselves can be easily tweaked if desired, should people
find it too strong or what have you!
## Why It's Good For The Game
Fixes#72229Fixes#61424Fixes#70460 --not sure if this PR fixed it but I was able to infect
monkeys and plasmamen with a virus containing Inorganic Biology in my
testing, so this may be closed
Plasmamen dying from plasma is a travesty and reparations must be made.
## Changelog
🆑
fix: plasmamen no longer can suffer liver failure from injecting
themselves with plasma (unless they have a human liver for some reason).
fix: a person who is infected with a plasma fixation disease can no
longer can suffer liver failure from injecting themselves with plasma.
fix: plasmamen no longer can suffer liver failure from consuming other
organic toxins, which they are not supposed to be affected by.
fix: plasma fixation heal-through-inject-or-consumption now works for
plasmamen by letting the metabolism procs take care of removing it from
their systems.
fix: hot ice now has the same wound-healing and nontoxic properties as
plasma to plasmamen, since it is described as "frozen plasma". It is
also nontoxic to plasma fixation virus sufferers.
fix: plasma breathed through internals now contributes to the healing
amount from plasma fixation.
/🆑
Co-authored-by: Bloop <vinylspiders@gmail.com>
* Adds nutriment factor to liquid gibs. (#73033)
## About The Pull Request
Over the years I've heard quite a few lizard players scratch their heads
in confusion due to the lack of gibs filling you up. I gave it a fairly
low value of 2 so people don't end up trying to power game it.
## Why It's Good For The Game
Adding an alternative use to gibs is always nice, at the moment it's
mostly just used for soap and cytology (Which barely anyone does.)
## Changelog
🆑
balance: Gibs now provide a small amount of nutriment.
/🆑
* Fixes the modular uses of liquid gibs
* Fixes an error that somehow slipped through.
---------
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind
* Fixes the conflicts and makes shit compile!
* Fixes other things that didn't show up because I hadn't updated
* Fixes the lints.
* Okay NOW it's ready (please don't add anything else that touches blindness I beg you)
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Cleans Up (a few) Single-Lines Over 300 Characters (#73124)
These were just super long picks with multiple strings/file
references/whatever, let's convert it into a list of picks, maybe do
some cool proc stuff, just make it look NICER.
I found it by doing `rg '.{300,}' code > output.txt` from the root of my
repository (used ripgrep because that's what i had at the time), and you
can see a copy of the results I got here:
https://github.com/tgstation/tgstation/files/10553651/output.txt in case
you wanna take a stab at it. I didn't filter by .dm code file, so
there's a few bulky JSONs and MD sections, but maybe those are good
candidates for splitting up the wording or otherwise prettifying the
JSON? Unsure.
* Cleans Up (a few) Single-Lines Over 300 Characters
---------
Co-authored-by: san7890 <the@san7890.com>
* worn overlays proc sends a signal (#73101)
what the title says, it sends the list of overlays to be edited and some
other stuff
makes modsuits use this
* worn overlays proc sends a signal
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* Fixes camera chunks being 1 tile short (kills AI GRID OF DOOM again) (#73163)
## About The Pull Request
#72709 replaced `block` calculating a new chunk with `CORNER_BLOCK`. The
new proc handles subtracting 1 from input `width` and `height` in its
own `block` down the line, so doing it here is fucking up chunks.
## Why It's Good For The Game
Frees freelook consoles/AIs from fake freevision in a grid. Kind of a
reverse problem that was handled back in #70685, somewhat amusing really
Fixes#73091
## Changelog
🆑
fix: Nanotrasen Artificial Intelligence Department has repelled a
Cybersun attack on AI personalities and advanced camera frameworks that
was based on the last year's AI GRID OF DOOM ion law incident. Free-look
camera consoles and AIs should no longer have a grid of free vision that
also prevents interacting with stuff on the grid.
/🆑
* Fixes camera chunks being 1 tile short (kills AI GRID OF DOOM again)
---------
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
* Fixes an edge case where you can get incurable plasma damage, & fixes healing sources that don't have biotype restrictions not working if the mob doesn't have the MOB_ORGANIC biotype (#73017)
## About The Pull Request
Fixes#72962
The plasma river applies toxins damage to a mob as it transforms
individual limbs into plasmaman ones.
Once all limbs have been transformed, the mob's species changes to
plasmaman.
This currently leads to incurable toxin damage as antitoxin drugs do not
work on plasmamen. Made it so that upon transforming fully, the toxin
damage is cleared.
Also fixed an issue where healing sources that do not have a
required_biotype parameter (e.g. `adjustToxLoss(-5)` vs
`adjustToxLoss(-5, required biotype=whatever)`) will not work on mobs
that do not have the `MOB_ORGANIC` biotype (e.g. plasmamen) due to it
defaulting to `MOB_ORGANIC`. For now those use the `forced` param to
accomplish this.
## Why It's Good For The Game
Incurable damage is no good.
## Changelog
🆑
fix: fixed getting incurable tox damage when fully transformed into a
plasmaman via plasma rivers
fix: fixed rod of asclepius/medibeam etc not being able to heal tox
damage despite not having biotype restrictions
/🆑
* Fixes an edge case where you can get incurable plasma damage, & fixes healing sources that don't have biotype restrictions not working if the mob doesn't have the MOB_ORGANIC biotype
---------
Co-authored-by: Bloop <vinylspiders@gmail.com>
* [no gbp] Dehydrated Carp will follow orders correctly (#73079)
## About The Pull Request
Fixes#72914
The order of operations here were wrong, such that it was calling a proc
which sent signals to inform a component about a new "master" before
actually adding the component.
I switched the proc calls around so that now it adds the component
before telling the component that there is someone to listen to.
## Why It's Good For The Game
Item you spent a valuable single telecrystal on did not work as
advertised, now does.
## Changelog
🆑
fix: Rehydrated Carp should now properly recognise who is the boss and
follow their instructions.
/🆑
* [no gbp] Dehydrated Carp will follow orders correctly
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Underwear Update (Sanity edition) (#73010)
## About The Pull Request
Two changes to underwear/undershirts/socks work:
Randomly spawned species will not be given underwear unless they are a
human, felinid, dullahan, or vampire.
This does not effect character creation,
Losing your torso will cause you to loose your undershirt and
underpants. You can put more on at a dresser if you'd like.
Losing a leg will make you loose your socks (sad)
## Why It's Good For The Game
I tried to spawn in some naked android for an event and they had
underwear on and it made me mad. This problem is consistent about just
about every race expect for felinids and humans,
Also when a human gets auged, they now get to show off their sexy new
robot chest without going to a dresser. I think this kinda stuff should
have been in since day one,
## Changelog
🆑 itseasytosee
del: You are less likely to see underwear in places it logically should
not be.
/🆑
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
[NO GBP] Lazy Template Cordoning | Double Runtime Fix (#72709)
## About The Pull Request
Adds automatic cordoning to block reservations.
Also fixes an issue where ChangeTurf would cause SSicon_smoothing to
throw runtimes by calling QUEUE_SMOOTH regardless of initialization
completion
## Why It's Good For The Game
## Changelog
---------
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Renames ling_aler.ogg to ling_alert.ogg (#73114)
## About The Pull Request
Noticed this typo in #72162, but it got closed for being a meme PR and I
forgot to make a separate one that fixes it. I'm pretty sure this sound
only shows up in the instances I've changed, but let me know if any
instances were missed.
## Why It's Good For The Game
Fixes a typo!!
## Changelog
🆑
spellcheck: Fixes a typo in the changeling alert stinger filename.
/🆑
* Renames ling_aler.ogg to ling_alert.ogg
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Fixes runtime error in bot path drawing code (#73095)
## About The Pull Request
Fixes#72951.
#69395 and #72302 both seem unrelated and still persist after this.
The first seems likely caused by there not being any navigation beacons
on the map or z-level they're on. Bots actually need those to be able to
patrol it seems. The second is a bug unrelated to this one.
This just fixes a nullref caused by all kinds of bots that has been
cropping up a lot lately. I ran a small army of bots for a while and the
nullref was never triggered after this fix. Details below on the precise
cause of it so it can be documented because I suspect this may be
helpful whenever someone decides to properly fix the broken bot code.
---
9de81146ec/code/modules/mob/living/simple_animal/bot/bot.dm (L1056-L1085)
The first index of the path list is the starting turf. This is always
skipped via the continue statement, and so path[1] does not get an image
stored at its index. After that, we are at path[2] and can go into the
first conditional block:
9de81146ec/code/modules/mob/living/simple_animal/bot/bot.dm (L1061-L1064)
This is where `prevI` gets set. For path[2], `prevI` will be null
because path[1] did not have an image stored in it as mentioned above.
This is fine, because we don't do anything with the image until we get
to path[3].
Once we are at path[3] and beyond, we can go into the second conditional
block, and this is where the issue arises because it assumes path[3] is
going to have `prevI` set to an image and not null:
9de81146ec/code/modules/mob/living/simple_animal/bot/bot.dm (L1065-L1078)
---
tl;dr
The code expects the list to look like this
path[1] = null
path[2] = image
path[3 ... and so on] = image
From my testing, I found that very occasionally you can have a turf =
loc at both index 1 and 2. Possibly even beyond, but I didn't see more
than 2 in my testing. This is bad because the second conditional block
assumes path[2] is not null.
so in those cases, the list looks like this
path[1] = null
path[2] = null
path[3 ... and so on] = image
In these cases, once we are at path[3], and enter the second
conditional, `prevI` is null, and so trying to access `prevI.dir` will
cause a runtime
Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/18968
## Why It's Good For The Game
Fixes a bug that keeps coming up in the unit tests.
## Changelog
🆑
fix: fixes a runtime error caused by patrolling bots
/🆑
* Fixes runtime error in bot path drawing code
---------
Co-authored-by: Bloop <vinylspiders@gmail.com>
Fixes critical plane masters improperly not being readded in show_to (#72604)
## About The Pull Request
[Adds support for pulling z offset context from an atom's
plane](9f215c5316)
This is needed to fix paper bins, since the object we plane set there
isn't actually on a z level.
Useful elsewhere too!
[Fixes compiler errors that came from asserting that plane spokesmen had
a plane
var](b830002443)
[Ensures lighting backdrops ALWAYS exist for each lighting
plane.](0e931169f7)
They can't float becuase we can see more then one plane at once yaknow?
[Fixes parallax going to shit if a mob moved zs without having a
client](244b2b25ba)
Issue lies with how is_outside_bounds just blocked any plane readding
It's possible for a client to not be connected during z moves, so we
need to account for them rejoining in show_to, instead of just blocking
any of our edge cases.
Fixing this involved having parallax override blocks for show_plane and
anything with the right critical flags ensuring mobs have JUST the right
PMs and relays.
It's duped logic but I'm unsure of how else to handle it and frankly
this stuff is just kinda depressing.
Might refactor later
[show_to can be called twice successfully with no hide_from
call.](092581a5c0)
Ensures no runtimes off the registers from this
## Why It's Good For The Game
Fixes#72543
Fixes lighting looking batshit on multiz. None reported this I cry into
the night.
## Changelog
🆑
fix: Fixes parallax showing up ABOVE the game if you moved z levels
while disconnected
/🆑
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Adds plasmaman support to mob spawners (#73068)
## About The Pull Request
A very minor change but one that will save headache down the line. Adds
plasmaman support to mob spawners, meaning they will be guaranteed to
get their internals and suit upon spawning from those.
Modified the equip proc to be able to automatically turn hand slot
internals on without the need for snowflakey open_internals checks
everywhere, as that should already handled by the it (shown below). Just
modified it to work on hand slots.
4b832e7d01/code/datums/outfit.dm (L245-L248)
## Why It's Good For The Game
Adds support for present and future mob spawners involving plasmapeople.
## Changelog
🆑
qol: prevents mob spawner plasmamen from spawning without their suit and
internals.
code: the equip proc can now find internals in the hand slot and
automatically open them, allowing for less snowflakey code down the
line.
/🆑
---------
Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Updates Offer/Give Code To Ignore Abstract Items (#73039)
## About The Pull Request
Hey there,

I think it's a bit silly to get an alert that that says "you are being
offered the off-hand", but it's also just silly to get any abstract
items that you literally shouldn't be able to obtain in this manner
(even if they end up deleting itself). So, let's update the code to have
a check for this (as well as allow potential "hand items", like when you
wanna offer your hand for someone to drag you along) so it doesn't
happen.
## Why It's Good For The Game
It's an abstract item, it shouldn't be considered to be an actual extant
item that can be given to people (seeing an alert with the off-hand icon
made me laugh a bit). Should still work with everything else that needs
it.
## Changelog
🆑
fix: You now should no longer be able to accidentally offer someone your
"off-hand" item, since it's an abstract thing that shouldn't be
considered a physical entity.
/🆑
Co-authored-by: san7890 <the@san7890.com>
Adds Axolotls to List of Cytology Creatures (#72924)
## About The Pull Request
Adds axolotls to list of cytology creatures. Edits the name of the cells
for frogs by changing to "anura amphibian cells" and for axolotls,
"caudata amphibian cells." These mean both "frog" and "salamander"
amphibian cells respectively. Also makes axolotls swabbable, adds their
cell lines to fern's list, and they are now distinguishable from the
frog's reagent lists.
## Why It's Good For The Game
Adding more thing to cytology is always good. Frogs could be grown but
not axolotls despite them coming from the same place and are amphibians.
Adds more ways to get axolotls and another reason why you should do
cytology.
Reinforces the PR
([https://github.com/tgstation/tgstation/pull/72922](url)) I added for
amphibian cytology.
## Changelog
🆑
add: Axolotl lovers rejoice! I added axolotls to cytology and as such
are now swabbable.
add: Frog cells are now named "anura amphibian cells." This literally
means "frog amphibian cells."
add: Axolotl are "caudata amphibian cells." This literally means
"salamander amphibian cells."
/🆑
---------
Co-authored-by: ophaq <44999764+ophaq@users.noreply.github.com>
Co-authored-by: kawoppi <94711066+kawoppi@users.noreply.github.com>
Refactor: Carp Infusion & Lungs (#71940)
## About The Pull Request
Recently before merging PR #71867 I failed to account for the carp lungs
and spacewalk trait in my testing (I did not try to fly across space)
and so I did not notice other bugs. This PR fixes the bugs/oversights
which I missed in my prior PR. Fixes#72678
I have completed a refactor of
`/obj/item/organ/internal/lungs/proc/check_breath` and
`/mob/living/carbon/proc/check_breath` because I noticed that bugs
within the gas alert system (stuck alerts) were caused by their improper
execution, and the code was written in a hard-to-understand style.
This PR also includes a small adjustment to status indicators which
allows you to add an already existing timed indicator without
overwriting it; it instead resets the existing timeout.
Here is a granular list of bugs:
- Bug A: Causes the spacewalk trait to not be applied to the mob, and is
caused by a minor developer oversight in
`/datum/status_effect/organ_set_bonus/carp/enable_bonus()` wherein it
attempts to add `TRAIT_SPACEWALK` to the status effect rather than to
the Mob.
- Bug B: Causes the carp lungs to suffocate you in space, because that
behavior is unimplemented.
- Bug C: Causes the gas alert indicators ("Too much O2!" etc) to stay
stuck to the screen if `check_breath` or other procs fail to remove
them. This is caused by the way `check_breath` early-returns without
executing the necessary logic to manage its gas alerts.
- Bug D: The part of `lungs/proc/check_breath()` that removes consumed
miasma from the air is only doing so when helium is also present and
consumed.
This PR contains fixes for these bugs:
- Fix A: Added the spacewalk trait to the mob, allowing the trait to
enable space flight as expected.
- Fix B: Added `TRAIT_SPACEBREATHING` as a lungs trait, which is used in
`check_breath`, which allows the mob to "breathe" in space or vacuum,
but suffocate when breathing unsuitable gas/O2.
- Fix C: Changed the proc `/mob/proc/throw_alert` such that, when
throwing an alert which already exists, it resets the timeout of the
existing alert rather than replacing it.
- ~Fix C2: Added a 10 second timer to gas alerts. If something fails to
clear them from the screen, they will now clear themselves after 10
seconds.~
- Fix D: Refactored `/mob/living/carbon/proc/check_breath` and
`obj/item/organ/internal/lungs/proc/check_breath` to run the necessary
logic for resetting gas side effects and gas alerts.
- Removed an early-return which was causing the `check_breath` functions
to skip most of their critical sections.
- Fixed the part of `lungs/proc/check_breath()` that removes consumed
miasma from the air, allowing it to remove the correct amount when
expected to.
- Added conditionals to check for `TRAIT_SPACEBREATHING` on lungs to
bypass suffocation.
- Added a fall-back to a default "flyweight" breath
`datum/gas_mixture/empty_breath` to Carbons and lungs, used in in the
event that either gets a null `breath`.
- Renamed `obj/item/organ/internal/lungs/proc/handle_too_little_breath`
to `handle_suffocation` and refactored it to handle more aspects of
suffocation that was originally being handled inline.
- Added `/obj/item/organ/internal/lungs/proc/breathe_gas_volume` to
`check_breath` to replace lots of inlined logic which handles
consuming/exchanging gases (O2 for CO2, etc).
## Why It's Good For The Game
Shortly after PR #71867 was merged, we noticed the carp lungs and
spacewalking trait were not working as expected when doing the Space
Carp DNA infusion. This PR fixes the bug and allows you to spacewalk
like a Space Carp again.
This PR also adjusts the gas alert indicators so they don't get stuck to
the screen as often. This PR also fixes a bug that was causing timed
alerts to overwrite each other when it was unnecessary to do so, and
helps prevent their on-throw animation from being replayed when not
appropriate.
I have included an intermediate refactor of
`/mob/living/carbon/proc/check_breath` and
`obj/item/organ/internal/lungs/proc/check_breath` in this PR, and I have
tried to improve readability/maintainability while correcting critical
oversights in the ways breathing was working. After my changes are
merged, I will likely work on another refactor to delete duplicated
sections of code between Carbons and lungs, as much of it is 99%
identical.
## Changelog
🆑 A.C.M.O.
refactor: Refactored breathing, mostly check_breath, for Carbons and
lungs organ.
add: Added the space-breathing trait for lungs.
fix: Fixed the Space Carp DNA infusion to apply the Spacewalk trait,
allowing you to fly through space.
fix: Fixed the Space Carp lungs, allowing you to breathe in space with
them.
fix: Fixed gas status indicators re-playing their on-throw animation
when they are refreshed.
fix: Fixed gas status indicators getting stuck to the screen in some
situations.
fix: Fixed gas side effects, such as euphoria and hallucinations, to
reset when expected.
fix: For Humans, fixed Miasma only being consumed from the air when
Helium is present.
/🆑
---------
Co-authored-by: Dani Glore <fantasticdragons@gmail.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Stack traces when a cliented or ckeyed mob is Destroy()ed. (#72797)
## About The Pull Request
One thing that repeatedly pops up in admin channels is investigating
causes of death when a player just vanishes from the game. These are
almost universally qdeletion issues.
9 years ago `/mob/Destroy()` was commented with:
`//This makes sure that mobs with clients/keys are not just deleted from
the game.`
Whatever code may have existed back then has long since been replaced.
**I consider that Destroy()ing a cliented or ckeyed mob is a runtime
error case.**
Code which may result in deleting a mob should handle removing and/or
reassigning any client or ckey - or call generic procs that do so -
prior to destruction. This should ideally result in a clear log trail
that allows admins to see what happened. Where this isn't the case, a
stack trace will now be available to help narrow down the cause of
qdeletion so an issue report can be made, and so admins have SOME info
to investigate on.
An example of where this would help catch bugs is #72782 - It was
clearly unintended behaviour to qdel the mob in the first place and this
stack trace would have immediately highlighted exactly where the death
came from.
```
[2023-01-18 12:44:40.415] runtime error: Mob with client has been deleted. (code/modules/mob/mob.dm:29)
- proc name: stack trace (/proc/_stack_trace)
- source file: stack_trace.dm,4
- usr: Julia Watson (/mob/living/carbon/human)
- src: null
- usr.loc: the floor (111,143,2) (/turf/open/floor/iron)
- call stack:
- stack trace("Mob with client has been delet...", "code/modules/mob/mob.dm", 29)
- Julia Watson (/mob/living/carbon/human): Destroy(0)
- Julia Watson (/mob/living/carbon/human): Destroy(0)
- Julia Watson (/mob/living/carbon/human): Destroy(0)
- Julia Watson (/mob/living/carbon/human): Destroy(0)
- qdel(Julia Watson (/mob/living/carbon/human), 0)
- the mouse (/mob/living/basic/mouse): try consume cheese(Julia Watson (/mob/living/carbon/human))
- the mouse (/mob/living/basic/mouse): tamed(the mouse (/mob/living/basic/mouse), Julia Watson (/mob/living/carbon/human))
- /datum/callback (/datum/callback): Invoke(the mouse (/mob/living/basic/mouse), Julia Watson (/mob/living/carbon/human))
- /datum/component/tameable (/datum/component/tameable): on tame(the mouse (/mob/living/basic/mouse), Julia Watson (/mob/living/carbon/human))
- the mouse (/mob/living/basic/mouse): SendSignal("simplemob_sentiencepotion", /list (/list))
- the intelligence potion (/obj/item/slimepotion/slime/sentience): attack(the mouse (/mob/living/basic/mouse), Julia Watson (/mob/living/carbon/human), "icon-x=16;icon-y=7;left=1;butt...")
- the mouse (/mob/living/basic/mouse): attackby(the intelligence potion (/obj/item/slimepotion/slime/sentience), Julia Watson (/mob/living/carbon/human), "icon-x=16;icon-y=7;left=1;butt...")
- the intelligence potion (/obj/item/slimepotion/slime/sentience): melee attack chain(Julia Watson (/mob/living/carbon/human), the mouse (/mob/living/basic/mouse), "icon-x=16;icon-y=7;left=1;butt...")
- Julia Watson (/mob/living/carbon/human): ClickOn(the mouse (/mob/living/basic/mouse), "icon-x=16;icon-y=7;left=1;butt...")
- the mouse (/mob/living/basic/mouse): Click(the floor (112,143,2) (/turf/open/floor/iron), "mapwindow.map", "icon-x=16;icon-y=7;left=1;butt...")
-
```
See also #67300.
An example of where this would help identify causes of death where
previously there were none - Scenarios that were fixed by #62949 and
#66104 caused administrative headaches figuring out causes of death when
players in exploding crates just got literally fucking qdeleted. Which
was pretty trivial for players to do to other players.
Issue reports can be made and bugs can be fixed as we go along.
There are examples of quote "false positives" unquote.
Right click -> Delete, which can be used on any atom.
```
[2023-01-18 11:40:54.597] runtime error: Mob without client but with associated ckey has been deleted. (code/modules/mob/mob.dm:32)
- proc name: stack trace (/proc/_stack_trace)
- source file: stack_trace.dm,4
- usr: Norah Rader (/mob/dead/observer)
- src: null
- usr.loc: the floor (109,143,2) (/turf/open/floor/iron)
- call stack:
- stack trace("Mob without client but with as...", "code/modules/mob/mob.dm", 32)
- Fulton Enderly (/mob/dead/observer): Destroy(0)
- Fulton Enderly (/mob/dead/observer): Destroy(0)
- qdel(Fulton Enderly (/mob/dead/observer), 0)
- Timberpoes (/client): admin delete(Fulton Enderly (/mob/dead/observer))
- Timberpoes (/client): Delete(Fulton Enderly (/mob/dead/observer))
```
Admin gibself
```
[2023-01-18 11:41:17.635] runtime error: Mob with client has been deleted. (code/modules/mob/mob.dm:29)
- proc name: stack trace (/proc/_stack_trace)
- source file: stack_trace.dm,4
- usr: Norah Rader (/mob/living/carbon/human)
- src: null
- usr.loc: the floor (109,145,2) (/turf/open/floor/iron)
- call stack:
- stack trace("Mob with client has been delet...", "code/modules/mob/mob.dm", 29)
- Norah Rader (/mob/living/carbon/human): Destroy(0)
- Norah Rader (/mob/living/carbon/human): Destroy(0)
- Norah Rader (/mob/living/carbon/human): Destroy(0)
- Norah Rader (/mob/living/carbon/human): Destroy(0)
- qdel(Norah Rader (/mob/living/carbon/human), 0)
- Norah Rader (/mob/living/carbon/human): gib(1, 1, 1, 0)
- Norah Rader (/mob/living/carbon/human): gib(1, 1, 1, 0)
- Timberpoes (/client): Gibself()
```
Over time these stack traces can be checked for how well the true cause
of death is logged, and whether there is a better procedure for deleting
cliented/ckeyed mobs than just qdel(target).
## Why It's Good For The Game
qdeletion of cliented or ckeyed mobs is death and often lacks any
specific logging.
This obfuscates bugs and hinders admin investigation.
stack_tracing highlights where this happens, revealing the previously
obfuscated bugs more clearly. It also provides relevant information on a
cause of death that can allow admin investigation to take place despite
the absence of logging.
## Changelog
🆑
admin: When a player-owned mob is deleted from the game world, a stack
trace is now dropped in the runtime logs. This allows admins and coders
to investigate these issues easier.
/🆑
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Checks if a machine has no research before connecting techweb (#72944)
## About The Pull Request
Currently all machines, if the config to not have a techweb link is on,
will set their node to science even if they were meant to be connected
to another (like through subtypes). This fixes that by checking to
ensure they don't have a techweb connected already before giving them a
new one.
Also as a minor fix, RD consoles will now properly add themselves to the
list of accessing RD consoles if they aren't linking to the default.
This list currently does nothing but I can see good uses of it in the
future.
## Why It's Good For The Game
Fixes an error that was found on a downstream, it's a worthwhile fix
that thankfully was caught this early.
## Changelog
Nothing player-facing.
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Optimizes changing z level as a ghost by something like 85% (#73005)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->
## About The Pull Request
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->
Optimizes hud image addition/removal on z change
We were doing a lot of repeated work here, not to mention all the proc
calls.
So I pushed the "operate on loops" behavior into its own proc, so I
could ensure we only do some of this stuff once
This plus some removal of safeties saves 75% of the cost of z level
transitions as a ghost
Prevents double on_changed_z_level calls from ghosts and shuttles
Reacting to z changes used to be done off doMove or one of those
children, timber moved it to Moved, but did not remove the calls that
assumed things like abstract_move wouldn't trigger it
This means that moving up/down as a ghost was causing a double call of
the whole z move stack. Suprised this never broke anything tbh
Makes csv stat tracking actually encode numbers properly, cleans up an
indev comment from plane group code
## Why It's Good For The Game
Speed, and fixes
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Basic Mobs Now Actually Have A Deathgasp (#72950)
## About The Pull Request
Pretty obviously an oversight since we only checked for simple_animal
for this, but should also factor in the fact that we could now be a
basic mob.
Actually I tested it on Sybil just now and deathgasps just never worked.
We were setting death_message for... I guess when they die? It's just
fucked but it works on my local now. blurgh
## Why It's Good For The Game
Ported simple animals that are now basic mobs were able to deathgasp
this time last year. Silly that they aren't able to do that now.
## Changelog
🆑
fix: Basic Mobs are now able to deathgasp.
/🆑
Let me know if the new variable name for the string is cringe, I just
settled on that since it mirrored the type of check we run in
select_message_type().
Co-authored-by: san7890 <the@san7890.com>
Add signal override back as a runtime (#72561)
We're not seeing this on CI and I'm not seeing it on my local DD logs
unless I go out of my way to check. Keeping separate file means it's
easy to go through, but this indicates a bug that needs to be fixed and
so it should still be in runtime.
Doesn't revert #70034, as it still keeps log_signal.
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Fixes and buffs Metal Hydrogen golems (#72482)
## About The Pull Request
Metal Hydrogen golems as of now are quite literally not even immune to
_space_ and _the cold_, despite their description insinuating the exact
opposite and their manner of creation being more time-intensive than any
other golem. This PR fixes that, putting them on-par with all other
golems in regards to temperature and space immunity, whilst also
_hugely_ buffing them so they're not simply an antimagic version of
adamantine golems - instead, they're now most metal golems rolled into
one power-wise, with the armor of diamond golems as is befitting.
Also, I fixed their colors and wording (metal hydrogen isn't a
_mineral_, it doesn't naturally occur)
## Why It's Good For The Game
Creating metal hydrogen golems is not wholly difficult if you understand
atmospherics and practice safety in doing so, but compared to all other
golems they are _woefully_ underpowered and nigh-useless in most
practical applications. Adamantine golems are better in effectively
every way, and they're the standard for easily-created golems. Properly
fixing them and buffing them to ensure they're worth making is an
effective way to make metal hydrogen a more worthy endeavor for
atmospherics, and also metal hydrogen is simply cool.
## Changelog
🆑
fix: metal hydrogen golems no longer die to low pressures and cold
temperatures
fix: metal hydrogen golems are no longer solid white, and are now the
actual color of metal hydrogen
balance: metal hydrogen golems are also now immune to most environmental
threats, and get more armor
/🆑
Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
* Fixes and buffs Metal Hydrogen golems
Co-authored-by: dawsonkeyes <76002401+dawsonkeyes@users.noreply.github.com>
Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Basic mobs don't become dense upon death (#72554)
## About The Pull Request
In #72260 what was previously a var became a flag, which was a sensible
change, however this inverted the default behaviour.
In virtually all cases we want dead mobs to _stop_ being dense, this
added a requirement for the flag to be present for that to happen and
then didn't add the flag to any mobs.
Rather than add this to every mob I inverted the function of the flag.
My reasoning here is that _simple_ mobs seemingly never required this
behaviour, basic mobs are probably going to need it rarely if ever, and
including it in `basic_mob_flags` by default seems messy and easy to
leave off when setting other flags (plus #72524 implies to me we want to
avoid adding more default values).
Setting this manually on each mob seems kind of silly as a requirement
going forward and I can't think of a way we'd unit test for people
forgetting.
For the same reason I did the same thing with the
`STOP_ACTING_WHILE_DEAD` flag I added to the AI controller in a recent
PR, the flag should denote unusual behaviour not the default.
## Why It's Good For The Game
It looks really odd when you're constantly shuffling places with dead
mobs, they're not supposed to do that.
It's tedious to add `STOP_ACTING_WHILE_DEAD` to every AI controller when
that should be an obvious default assumption.
## Changelog
🆑
fix: Dead basic mobs are no longer "dense" objects and can be stepped
on.
/🆑
* Basic mobs don't become dense upon death
* Removes a flag we didn't need anymore.
* Forgot to remove this one
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Fix for plasmamen potentially spawning without internals, suits, etc (#72609)
## About The Pull Request
Currently there is a proc, 'give_important_for_life', which was unused
except in some downstreams, that was not working properly. It was meant
to be used for ensuring plasmamen get their gear upon spawning.
Fixed the issue with that proc and added it as a safety measure for
plasmamen who spawn without race-specific job outfits for whatever
reason (usually because one was not defined for that job). Also handles
plasmamen whose jobs are set to null for whatever reason (event spawners
perhaps?)
## Why It's Good For The Game
Fixes a proc that was bugged. Now plasmamen should get the generic
plasmamen outfit if their job does not specify a plasmamen version, thus
no more immediate combustion!
Fixes#60382 it would seem, tested and no issues were found.
## Changelog
🆑
fix: fixed give_important_for_life proc in species.dm, which is supposed
to be used to help ensure plasmamen (and potentially other races) are
always spawned with internals and such
fix: fixed issue where plasmamen who are spawned without a
plasmaman-specific job outfit could spawn without internals and a suit,
and just start dying immediately
/🆑
Co-authored-by: Bloop <vinylspiders@gmail.com>