Commit Graph

2018 Commits

Author SHA1 Message Date
Waterpig
5574262fb5 Changes up carbon EMP handling (#83857)
## About The Pull Request

The organ refactor 6 months ago changed up organs, making them be
actually inside bodyparts and the mob. This introduced the bug of all
emp effects being called twice on everything thanks to how /mob/living
handles it (Fixed in this PR), but also some new stuff:

Made bodyparts handle organ EMPs. This also means we can now have
support for bodyparts with EMP_PROTECT_CONTENTS protecting the organs
inside.
Made a new proc for bodyparts once they are successfully hit by an emp.
Makes it much easier to add overrides for the behaviour.
Fixed emps hitting bodyparts twice

## Why It's Good For The Game

It lays a groundwork for some interesting limb concepts, and makes organ
emps make a bit more sense.

Fixes a bug that laid unnoticed for 6 months.

## Changelog

🆑
fix: EMPs on carbons no longer happen twice
code: Moves organ emps under bodyparts, changes how bodyparts handle emp
effects
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2024-06-11 22:10:24 -07:00
MrMelbert
ff6b41aa07 Afterattack is dead, long live Afterattack (#83818)
## About The Pull Request

- Afterattack is a very simple proc now: All it does is this, and all
it's used for is for having a convenient place to put effects an item
does after a successful attack (IE, the attack was not blocked)


![image](https://github.com/tgstation/tgstation/assets/51863163/1e70f7be-0990-4827-a60a-0c9dd0e0ee49)

- An overwhelming majority of afterattack implementations have been
moved to `interact_with_atom` or the new `ranged_interact_with_atom`

I have manually tested many of the refactored procs but there was 200+
so it's kinda hard

## Why It's Good For The Game

Afterattack is one of the worst parts of the attack chain, as it
simultaneously serves as a way of doing random interactions NOT AT ALL
related to attacks (despite the name) while ALSO serving as the defacto
way to do a ranged interaction with an item

This means careless coders (most of them) may throw stuff in afterattack
without realizing how wide reaching it is, which causes bugs. By making
two well defined, separate procs for handing adjacent vs ranged
interactions, it becomes WAY WAY WAY more easy to develop for.

If you want to do something when you click on something else and you're
adjacent, use `interact_with_atom`
If you want to do something when you click on something else and you're
not adjacent, use 'ranged_interact_with_atom`

This does result in some instances of boilerplate as shown here:


![image](https://github.com/tgstation/tgstation/assets/51863163/a7e469dd-115e-4e5b-88e0-0c664619c878)

But I think it's acceptable, feel free to oppose if you don't I'm sure
we can think of another solution

~~Additionally it makes it easier to implement swing combat. That's a
bonus I guess~~

## Changelog

🆑 Melbert
refactor: Over 200 item interactions have been refactored to use a
newer, easier-to-use system. Report any oddities with using items on
other objects you may see (such as surgery, reagent containers like cups
and spray bottles, or construction devices), especially using something
at range (such as guns or chisels)
refactor: Item-On-Modsuit interactions have changed slightly. While on
combat mode, you will attempt to "use" the item on the suit instead of
inserting it into the suit's storage. This means being on combat mode
while the suit's panel is open will block you from inserting items
entirely via click (but other methods such as hotkey, clicking on the
storage boxes, and mousedrop will still work).
refactor: The detective's scanner will now be inserted into storage
items if clicked normally, and will scan the storage item if on combat
mode
/🆑
2024-06-11 21:58:09 -07:00
Afevis
c682c52cca Corrects a few surgery moods (#83826)
Missed these
2024-06-09 23:33:33 -04:00
Afevis
9e11a5c71d Getting surgically cut open while conscious will now give you the "THEY'RE CUTTING ME OPEN!!" surgical mood event. (#83797)
Implements an unused mood event found in #83741

🆑 ShizCalev
fix: Getting surgically cut open while conscious will now give you the
"THEY'RE CUTTING ME OPEN!!" surgical mood event.
/🆑
2024-06-08 19:18:55 -04:00
Lucy
7204db1269 Makes transferring functional wings to new bodies actually work (#83705)
## About The Pull Request

Fixes the bug where, if you surgically remove functional wings and then
re-implant them (even into yourself), the new owner won't get the toggle
wings button. This fixes that.

Also cleaned up some of the code.

## Why It's Good For The Game

i assume this is a bug, as it's just kinda weird that the wings that
work with one body won't work if you take them out and put them back in.

## Changelog
🆑
fix: When implanting functional wings into a new body, they will
actually be able to use said wings now.
/🆑
2024-06-06 00:48:09 -04:00
Jacquerel
167c55bed2 Sentient mobs can slowly subtract slime stacks by shaking (#83471)
## About The Pull Request

Closes #82746
PR #77569 replaced the clone damage inflicted by slimes with a lingering
damage over time effect which can be removed with water.
This is all well and good for humans who can spray themselves with fire
extinguishers, showers, or sinks... but most other mobs are not actually
capable of opearating any form of equipment which can make them wet.

This PR allows you to click on the debuff icon to shake the slime off
slowly over time (15 seconds to fully remove the debuff).
This is slower than the recovery time when wet.

Dogs, Cats, and by extension, Felinids are better at removing slime
because of their self-cleaning prowess (they're always licking weird
stuff off themselves). This is rarely helpful if you're not a Felinid,
because almost all cats and dogs have so little health that they will
hit the minimum health threshold and lose the debuff anyway by the time
they would be done.
In the very niche circumstance that a sentient wolf is attacked by a
slime they will appreciate this bonus.

## Why It's Good For The Game

This was a replacement for slimes inflicting clone damage (I am not sure
this even did anything for most simple mobs?) but essentially turned
slimes into an automatic death sentence for most forms of mob without
hands.
Technically the slime debuff cannot kill you and stops if you are under
10 HP, but this is small consolation for most of these mobs which cannot
heal themselves either.

You are still probably going to take between 30-60 damage during the 15
seconds of removing slime from your body.

## Changelog

🆑
balance: Corrosive slime left behind after a slime fails to eat you can
be scraped off with your hands, or shaken off in some other way, by
clicking on the debuff. This is slower and less effective than washing
it off using water.
/🆑
2024-06-05 14:47:02 +02:00
carlarctg
2ed1ed6eb2 Probital and disgust vomit are knockdowns, not stuns (#83475)
## About The Pull Request

Disgust vomit knocks you down rather than stunning you.

Mitogen Metabolism Factor knocks you down rather than stunning you.

## Why It's Good For The Game

> Disgust vomit knocks you down rather than stunning you.

With the recent update to rust causing disgust on tiles, you end up
vomiting, getting stunned, accruing even more disgust on the tile,
vomiting again. An endless cycle of misery. Vomits should suck, but I
don't think they should stunlock.

> Mitogen Metabolism Factor knocks you down rather than stunning you.

Similarly, Mitogen Metabolism Factor makes you vomit when overdosed.
This is normally fine, but fermichem always finds a way to ruin things -
it can be made via inverse Probital and is a guaranteed chain-stunner
for far too little effort.

Easy, cheap, hard-to-escape stunlocks are bad.
2024-06-04 14:48:43 -05:00
MrMelbert
b1a4e0ba7e Makes disease airborne spread more realistic (#83423)
## About The Pull Request

1. Rather than checking every life tick to try to spread via air, it
checks every breath tick. IE, every 8 seconds.
2. Wearing a mask now protects you from catching airborne diseases,
rather than only protecting you from spreading it.
3. Wearing a mask is no longer guaranteed effective (unless on
internals), it now scales based on BIO armor. This is doubly effectively
for people wearing a mask to stop spreading to others vs wearing a mask
to block spreading to them.

## Why It's Good For The Game

Wearing any kind of mask means airborne viruses will never spread, but
also wearing any kind of mask on the opposite end is pointless unless on
internals. Kinda silly.

This PR unifies those behaviors. Wearing a mask to stop spread is still
rewarded, as BIO armor is doubly effective at stopping a spread attempt
as blocking a spread attempt.

Ultimately the goal of this is to give players a realistic way to
protect themselves against airborne transmission vectors besides staying
on internals 100% of the time.

## Changelog

🆑 Melbert
balance: Wearing a mask can now prevent you from being spread airborne
diseases. Prior, it only stopped you from spreading it yourself.
balance: Wearing a mask no longer 100% guarantees you don't spread
viruses to others people - it now scales on the masks BIO armor. Get a
sterile mask from Medical for max safety.
balance: Wearing a mask to stop you from spreading to other people is
doubly effective than wearing a mask to prevent spread to yourself -
Mask up for the greater good!
balance: Passive airborne virus spread attempts are now done every time
you breathe (every eight seconds), rather than every two seconds. The
chance of spread is the same, though - it has been scaled up to
accommodate.
code: Cleaned up a fair bid of airborne-transmission-code. Report any
oddities.
/🆑
2024-06-01 17:51:04 +01:00
Lufferly
7f82baf07f Fixing the timeline (Paradox clone fixes) (#83452)
## About The Pull Request

Fixes #83388 (Hair gradients are now part of dna, if just making a
snowflake check on paradox clones is a better way to do this I can do
that too)
Fixes #82238 (Hardcore random was not supposed to set your hair to
white)
Fixes paradox clones (and changelings) not having correct heterochromia
colors
Fixes #80557

## Why It's Good For The Game

Bugfixes; Paradox clones are supposed to at least be a copy of the
target player as they are roundstart, but right now for funkier
characters they are being outed for having the wrong hair gradient or
something, which feels bad. Hopefully this can bring us to a point where
medical and security records cant out the clone.

## Changelog

🆑 Seven
fix: Paradox clones (and changelings) now properly copy hair gradients
and heterochromia eye colors.
fix: Hardcore random no longer mistakenly makes your hair white, this
was not a feature.
/🆑
2024-06-01 18:22:23 +02:00
Time-Green
b872baf465 Removes miasma and gibs diseases (#83455)
## About The Pull Request
Removes miasma generating random viruses (in two locations for some
reason)
Also removes diseases being generated by gibs, which is responsible for
a lot of disease spam

## Why It's Good For The Game
New diseases are spread through events and virology (and some other
minor sources). Miasma and gibs are a source of random viruses that
dilutes player response to diseases. It's frankly exhausting curing the
disease outbreak, just to see 10 others pop-up. Hopefully we can reduce
the madness a bit and place more focus on individual diseases

## Changelog
🆑
del: Miasma and gibs no longer generates random diseases
/🆑

Something like lung rot could be cool though, but out of scope for the
current PR
2024-05-26 11:56:16 -07:00
Jacquerel
74f6a755ef Advanced Health Analysers can detect certain organs (#83305)
## About The Pull Request

This PR makes certain organs appear in the output of the Advanced Health
Analyzer, even if they are at 100% health.

![image](https://github.com/tgstation/tgstation/assets/7483112/0a0f143e-e29b-4107-9f96-612278709548)

The organs this applies to are:
- Legion Tumours
- Heretic Organs which you get when you are sacrificed
- Abductor Organs (but it doesn't specify what they do)

It doesn't apply to xenomorph or changeling eggs, or romerol tumours, as
those are supposed to be "stealthy".

## Why It's Good For The Game

Basically I just saw someone ask for this to be possible and thought it
sounded like a reasonable idea; none of these three things are intended
to be particularly stealthy and it seemed like reasonably nice medical
quality of life not to have to do exploratory surgery to detect their
presence.
It should be reasonably obvious to a medical practitioner with the
correct tools that something is wrong here.

## Changelog

🆑
balance: Certain unhealthy organs can be detected via the advanced
health scanner
/🆑
2024-05-20 09:16:42 +02:00
John Willard
f1a22b367d Changes how lube crawling works and fixes a bug with snails (#83238)
## About The Pull Request

This partially reverts https://github.com/tgstation/tgstation/pull/76336
- Just for slimepeople since it's the only one that felt important to be
tied to species.
Snails are currently pretty fast when they are crawling around, but on
top of that they are also able to get their legs replaced to become 3x
faster than normal humans while resting. It's a little silly, and I
thought I should fix it.

I also changed the element itself to be easier for admins to edit,
giving them control over time and wet flags, and made it work a little
better.
Instead of being hardcoded to listen to carbons and to register every
step to check if they are resting, calling add/remove movespeed modifier
every single time they move, we are told whether they have to be
resting, and update when they get up/lie down. This has an extra bonus
that admins can control whether or not they want to make simple/basic
animals have to rest to lube things (like cats).

## Why It's Good For The Game

Closes https://github.com/tgstation/tgstation/issues/78417
Makes the lube spitting element that (primarily) snails use into a more
general thing that can be used by admins or other contributors that want
to make things wet thing as they walk for some time.
Also no insanely fast snails anymore.

## Changelog

🆑
fix: Snails no longer move at normal speed while resting.
fix: Snails can no longer get insane speed from getting their legs
replaced.
fix: Humans don't become immensely slow when getting a Snail leg.
admin: lube walking element is now much easier to mess with to fit
however you want to use it for.
/🆑
2024-05-16 23:46:03 +02:00
nikothedude
03db803001 Parse_zone audit + minor misc cleanup (#83154)
## About The Pull Request

Does a audit on all uses of parse_zone, replacing most instances of it
with a new living-level proc that refers to the bodypart in that zone if
it exists.

In other cases, removes parse_zone entirely because the bodypart is
already confirmed to exist, so we just use plaintext_zone.

Also cleans up some single letter vars.
## Why It's Good For The Game

In the doc of ```plaintext_zone```, its said it ```Should be used for
parsing non-instantiated bodyparts```. 99% of the code ignores the
possibility of a bodypart existing, and so uses parse_zone when
plaintext_zone could be accessed instead.
## Changelog
🆑
code: Most instances of parse_zone now refer to the limb's
plaintext_zone var
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-05-16 16:45:33 +00:00
Lufferly
ec41cba087 Fixes wings working in space (#83239)
## About The Pull Request
Fixes #82035
Fixes #82184
Wings no longer are able to function in space if you activated them in
an environment they can function in.
This surfaced another bug where the wings would stop flying but would
leave the mob in a weird state where they weren't flying but were still
negating gravity, calling refresh_gravity fixed this, if this is a bad
way to do this let me know.

## Why It's Good For The Game
Bugfix, wings not working in space is an intentional balance
consideration.

## Changelog
🆑 Seven
fix: Wings no longer work in space if you activated them beforehand.
/🆑
2024-05-16 10:39:03 +02:00
Xander3359
926f8197aa Remove sleeper protocol objective + Remove the upper limit to sabotage RND server/Telecomms (#83206)
<!-- 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
Deletes the sleeper protocol objective

![image](https://github.com/tgstation/tgstation/assets/66163761/a76ebfdf-8bac-4836-bf10-5639245af872)

https://discord.com/channels/326822144233439242/326831214667235328/1239270421921005570
Removes the upper limit to sabotage telecomms/RND servers

![image](https://github.com/tgstation/tgstation/assets/66163761/0c54871e-8a41-4b14-92a3-4adbfef721b9)

https://discord.com/channels/326822144233439242/326831214667235328/1239269962707636375
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Removes a bad objective.
Removes a non-sensical upper limit to sabotage rnd/telecomms.
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
del: Removes the sleeper protocol traitor objective
balance: RND server/Telecomms sabotage can now show up even later in the
round
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2024-05-15 22:51:25 -07:00
Time-Green
013e40bc8e Fixes brain deletion not being lethal (#83203)
Oversight on my part. I stuck c4 on a lizards brain and it didnt kill
them.

The deletion chain is somewhat awkward for humans. When deleting a
human, it deletes the organs but also removes them, which causes all
kinds of wacky effects on a deleting mob which is not great.

This is more akin to a band aid, but I need to take some time and focus
to sort through all the removal procs and make them qdel friendly

🆑
fix: Deleting someones brain kills them again
/🆑
2024-05-13 08:49:38 -07:00
Jacquerel
f358423a1e Replace Heretic Phobia with Cursed Organs (#83082)
## About The Pull Request

Being sacrificed by a Heretic no longer applies an incurable brain
trauma that gives you a phobia of Heretic-associated items.
Instead it does the following things:

- Removes 2-4 of your organs and leaves them behind on the sacrificial
circle, replacing them with "corrupt" organs with negative effects.
- Gives you an unremovable "curse" debuff which will cause you to
immediately cough a random organ out of your chest if you attack or are
attack by the person who sacrificed you, **if they are wearing a Focus
at the time.**

Corrupt Organs can be removed via surgery, although doing so is
dangerous.
A removed corrupt organ will often either immediately explode for a
small (but not insignificant) amount of burn damage to everyone nearby,
or it will animate itself as a haunted object and be a general nuisance
until subdued.
A patient dosed with Holy Water can always have their organs removed
without consequence.
Chugging Holy Water will also suppress most of the negative effects of
your corrupt organs.

The effects of Corrupt Organs are as follows:
- **Eyes:** All Heretics **and also a selection of additional random
people** are completely invisible to you. You can still see their
runtext (or "hear") them, but they otherwise cannot be seen. And as you
can't see them you also cannot click on them.
- **Tongue:** When you speak, your language will sometimes be replaced
by "Shadowspeak", understood only by Curators and Nightmares. This is
less of an impediment during Halloween because of the friendly
Shadowpeople.
- **Liver:** When you drink something, it will add extra reagents to
your sip from a pool largely composed of alcohol and hallucinogens.
- **Stomach:** Your hunger will deplete significantly faster if you do
not regularly ingest blood. (Fun fact: Did you know that a drinking
glass full of blood automatically relabels itself "tomato juice"?)
- **Heart:** You will continue to be intermittently tormented by
frightening hands.
- **Lungs:** You will intermittently cough out dangerous or unpleasant
gases.
- **Appendix:** Very infrequently you will vomit out several hostile
worms.

Most of these effects aren't present while you're dodging the spooky
hands in the Mansus realm.
Plasmamen never have their lungs replaced because they'd immediately
start choking on their internals and that is annoying. Ethereals _do_
have their hearts replaced so may be surprised to find that they don't
respawn when killed if they don't get a new one.
I would haved called them Cursed Organs but the Cursed Heart already
exists.

## Why It's Good For The Game

Nobody enjoys the Heretic phobia from any angle.
Phobias suck to deal with in general. and while being scared of all
Heretic stuff from that point on is mildly flavourful it's not very
interesting.
This alternative hopefully provides a more interesting answer (which
should provide more storytelling and interaction with other people) to
the problems that the original change intended to address:
Making sure that nonlethal sacrifices still feel significantly bad
enough that you're not going to volunteer, and as an extra layer of
protection to ensure that someone you sacrificed functionally ceases to
be a threat to you.

## Changelog
🆑
del: Being sacrified by a Heretic no longer gives you an incurable
phobia.
add: Being sacrificed by a Heretic will drop 2-4 of your organs on the
ground and replace them with "corrupt organs" with negative effects
which can be suppressed with Holy Water.
add: Players who have been sacrificed by Heretics will experience
additional and rapidly lethal consequences for attempting to fight
someone who previously sacrificed them, as long as that person is
wearing a focus.
/🆑
2024-05-08 19:40:16 -06:00
Bloop
d0062f1b89 Fixes flap and wing emotes not updating wing sprites (for functional wings) (#83137)
## About The Pull Request

Pretty straightforward, the wing sprites were not updating on the mob
after calling `open_wings()`/`close_wings()`. Additionally I reduced the
time between opening/closing for the flap emote to 0.35 seconds. It
matches up more with the sound effect that way, and in my opinion look a
bit more like a proper flap should. 2 seconds was really long.

And finally functional moth wings will make the moth flap sound too! As
they should.


---

More codey stuff:

I slightly refactored the way sounds play to be more object oriented
adding a new proc for it:
`/obj/item/organ/external/wings/make_flap_sound()`. This will make it
easier for people to add different sound effects for other types of
wings beyond just moth ones, should they so desire.

## Why It's Good For The Game

Moths can rejoice in more ways to express yourselves!

<details><summary>Flap emote</summary>


![dreamseeker_KhEzxJaA4A](https://github.com/tgstation/tgstation/assets/13398309/d5b2ad6d-be62-4629-9c7f-4bb0523d8da3)

</details>

<details><summary>Wing emote</summary>


![dreamseeker_kuV1sMxHOB](https://github.com/tgstation/tgstation/assets/13398309/78f339d5-b28f-4cb6-885c-e16e649a89e3)

</details>

## Changelog

🆑
fix: moths with functional/flight potion wings get an animation when
they *flap once again, and it makes a sound
/🆑
2024-05-08 19:24:39 -06:00
_0Steven
5cb62c143e Fixes the stomach pump surgery not actually causing vomit nor decreasing reagent contents (#83110)
## About The Pull Request

So while playing I had to get a bunch of unstable mutagen out of a
corpse's stomach before reviving it, and thus I tried to stomach pump
it.
This, however, never decreased the amount in the stomach, nor did it
actually create any vomit like it's supposed to.

Looking into it, the issue seems to be with this line:

0c562fd742/code/modules/surgery/stomachpump.dm (L49)
Which doesn't line up with the parameters `vomit(...)` takes:

0c562fd742/code/modules/mob/living/carbon/carbon.dm (L417)
`vomit_type = FALSE` isn't very helpful.

This mismatch seems to be due to the `vomit(...)` proc getting changed
quite a while ago, but in the process forgetting to update stomach pump
to use it.
Based on what I found looking into this, I replaced it with the
following:
```dm
target_human.vomit((MOB_VOMIT_MESSAGE | MOB_VOMIT_STUN), lost_nutrition = 20, purge_ratio = 0.67)
```
Where we don't use `VOMIT_CATEGORY_DEFAULT` as that includes
`MOB_VOMIT_HARM`, and we already have our own harm condition.

This fixes our issue.

Oh, we also fix a minor spelling issue, "brusing" to "bruising".
## Why It's Good For The Game

Makes stomach pumping actually work.
## Changelog
🆑
fix: The stomach pump surgery actually works again.
spellcheck: "brusing" to "bruising" in the message you get when failing
the stomach pump surgery.
/🆑
2024-05-09 02:44:22 +02:00
MrMelbert
0cc5cfb178 Random Name Generation refactor, generate random names based on languages (for species without name lists, like Felinids and Podpeople) (#83021)
## About The Pull Request

This PR moves random name generation for species onto their languages. 

What does this mean? 

- For species with a predefined name list, such as Lizards and Moths,
nothing.

- For species without predefined name lists, such as Felinids, their
names will now be randomly generated from their language's syllables.


![image](https://github.com/tgstation/tgstation/assets/51863163/dddce7a6-5882-4f97-b817-c8922033c8d2)


![image](https://github.com/tgstation/tgstation/assets/51863163/e34e03e9-bcca-45ff-84e4-239e606cd24f)

(In the prefs menu:) 


![image](https://github.com/tgstation/tgstation/assets/51863163/eb6ccf9b-8b1c-4637-b46e-66cab9c8aac0)

Why? 

- Well, we actually had some dead code that did this. All I did was fix
it up and re-enable it.
- Generates some pretty believable in-universe names for various
languages that are lacking name lists. Obviously defined lists would be
preferred, but until they are added, at least.
- Moves some stuff off of species, which is always nice. 
- Also hopefully makes it a tad easier to work with name generation.
There's now a standard framework for getting a random name for a mob,
and for getting a random name based on a species.

Misc: 

- Adds a generic `species_prototype` global, uses it in a lot of places
in prefs code.
- Makes `GLOB.species_list` init via the global defines
- Deletes Language SS
- Alphabetizes some instances of admin tooling using the list of all
species IDs
- Docs language stuff
- Deletes random_skin_tone, it does pretty much nothin

## Changelog

🆑 Melbert
refactor: Random Name Generation has been refactored. Report any
instances of people having weird (or "Unknown") names.
qol: Felinids, Slimepeople, Podpeople, and some other species without
defined namelists now automatically generate names based on their
primary language(s).
qol: More non-human names can be generated in codewords (and other misc.
areas) than just lizard names.
/🆑
2024-05-04 12:21:26 -06:00
san7890
5f44545da8 Moves "sprite accessories" (e.g. Hair, Undergarments, Mutant Bits) from GLOB to a datasystem (#82847)
This is just a revitalization of #80275.

## About The Pull Request

On the tin, basically demotes everything related to setting up and
storing these bulky lists generated from reading
`/datum/sprite_accessory` subtypes from living in a global space that
will instead be in a compartmentalized subsystem for accesses. Also a
lot of code modernization and micro-improvements (unquantifiable)

## Why It's Good For The Game

Same exact expected results, just accessed in a different way.


![image](https://github.com/tgstation/tgstation/assets/34697715/14627773-c9fb-45bd-8ce0-dee33cdd1d27)

There's a few reasons why I want this to happen.
* The `GLOB` space is too clogged. There are at least a thousand
variables on `GLOB`, and it's extremely painful to access stuff on
production/local through view variables when you're debugging stuff like
this. It's also painful when there is stuff that _should_ live on `GLOB`
that you might want to see in VV/Debugger but are forced to either have
to scroll a mile to find what you want or wait a long while for it to
load. The less bulky lists we have of stored initialized datums, the
better.

* `make_datum_reference_lists()` is a consequence of wack stuff like
this where we're reliant on certain things being initialized in the
`GLOB` portion of world initialization _before_ subsystems/static
variables load - most of these datum lists in the aforementioned proc
doesn't _really_ need to be ready to go before `world.New()` for
example. We'll sadly have to abuse `PreInit()` for now, but it really is
something that has to be ready to go due the critical dependence that
stuff like Preferences has on it.

* We don't have to have the procs live in a global namespace either.
Instead of passing in `GLOB.XList` or `DSstorage.XList` every single
time, we can instead just move the proc setup on the subsystem and use
`XList` in a more native fashion.

* It's easier to find what you need. To me, it's a lot nicer to
ctrl+click the DS and go to the variables to find something I'm looking
for instead of having to scavenge around for any footprint/trace of the
global I want to look for. This is more trivial than the other two, but
that's something I like to think about when I go to bed.

I also had to refactor a bit of the code to accommodate the limitations
of the new DS system, but it should be a lot cleaner anyways.

## Changelog

Not relevant

---

Also nothing should have broken but it's a good thing we have screenshot
unit tests to prove me wrong.
2024-05-02 01:14:18 +02:00
13spacemen
3ad23185d9 [gbp no update] fix: ethereal alt attack verb is "sear" (#82951)
forgot to add the alt attack verb to the r ight arm

also, unfortunately have to change "singe" because it ends in E and
bodypart unarmed attacks get "ed" appended to them

## Changelog
🆑
fix: Ethereal unarmed attacks "sear" instead of "singe", which was buggy
/🆑
2024-04-30 16:51:51 +02:00
13spacemen
cdd7665bc6 Unarmed Attacks Support Multiple Verbs (#82876)
## About The Pull Request
Unarmed attacks, aka punching people, now is a list and supports having
multiple verbs
## Why It's Good For The Game
More flavor, RP, realism

Lizard claws used to only "slash", now they can "slash" "scratch" "claw"
Ethereals have "singe" in addition to "burn"
Podmen can "lash" in addition to "slash"
Heads can "chomp" in addition to "bite"
## Changelog
🆑
code: Unarmed attacks (punches, etc.) now support multiple attack verbs
instead of only one
/🆑
2024-04-28 23:00:46 +01:00
Singul0
85b857fc67 [NO GBP] Critical fixes for cyborg omnitools (#82825)
## About The Pull Request
Fixes several critical fixes for cyborg omnitools, surgical omnitools in
peculiar. Which is:
1. bonesetter omnitool can do compound fracture surgery now
2. omnitool butchering not properly disabled works (why didn't that
runtime. fucking dreammaker)
3. omnitool surgery_initiator not properly disabled
4. cautery in offhand not working

Fixes #82805
Fixes #82868

Honestly I have now regretted for doing this kind of implementation at
the start. with how shoddily coded it is.
Planning to refactor cyborg omnitools, admin omnitool and ayys omnitool
(all have the same base of implementation) to be less snowflakey. but
that's for the future. and will take some time. This is a bandaid fix
for now
## Why It's Good For The Game
this is cbt
## Changelog
🆑
fix: fixed cyborg bonesetter not working for compound fractures
fix: butchering not disabling in cyborg omnitool
fix: fixes a bug where if you select the omnitool it would be stuck in
surgery initiator mode
fix: cautery in off hand for cyborg omnitools not working
/🆑
2024-04-24 19:08:53 -07:00
Fikou
7847efd270 [READY] the unfuckening of clothing rendering (#79784)
## About The Pull Request
refactors clothing visors to use the same system, including masks being
toggled and stuff like riot helmets toggling using the same system and
welding helmets and such
adds a handler that updates all visuals in slots that an item has
obscured, each visual proc calls that so you no longer have weird shit
happening like having to hardcode a proc for heads where you need to
also update hair, mask, glasses everytime you put on an item

one thing here i could also do is make check_obscured_slots return the
HIDEX flags instead of item slots, because in 99% of cases its hardcoded
to be ran against specific slots (like eye code running it against the
glasses slot), but maintainers didnt seem to like that :/

## Why It's Good For The Game
fuck this 2003 bullshit

## Changelog
theres like several bugs here i fixed but i forgot them all and they are
small
2024-04-21 17:08:03 -07:00
Singul0
b11bdb1910 Adds Omnitools for engineer and medical cyborgs, reducing on inventory clutter. (#82425)
## About The Pull Request
[This PR is a bounty requested by Ophaq and worked on by
Singul0.](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=36013)

All of the following description in this PR is written by Ophaq as to
what this PR entails:
In this PR, the medical and engineering cyborg's tools are completely
reworked and condensed into an arm similar to the implant a carbon would
get. The tools are shown in a radial wheel around the character to quick
select what is needed instead of looking for it in a cluttered bag of
items. There are a few tools such as the blood filter for the medical
cyborg, as well as the welder, gas analyzer, and t-ray scanner for the
engineering cyborg excluded from the radial wheel. mostly due to their
inherent inmodularity


![image](https://github.com/tgstation/tgstation/assets/127663818/f66425b3-771a-46a0-86e5-958124a3dd6f)

![image](https://github.com/tgstation/tgstation/assets/127663818/45e75c47-8f61-42aa-9ba3-01b25f266941)

Each cyborg gets two arms in case the player wishes to have one on the
side to quick swap to, like having a scalpel in one arm and a hemostat
in the other on the hotbar for convenience or just preference. An
upgraded version of the tools has been added to each respective cyborg
upgrade node with somewhat faster action speed. The upgrade replaces the
arms and transforms them into the "advanced" version which is currently
the same sprite as the regular but just a faster and more efficient
version. The sprites for the surgical arm currently look good but may
need replacing later if someone who wishes to resprite them down the
line decides to do so.
## Why It's Good For The Game
As it currently stands, the medical cyborg's magical bag of gadgets
takes up a lot of your screen space and as a player who plays medical A
LOT, this was a MUCH NEEDED quality of life feature.

The amount of clutter in a medical cyborg's bag makes it in my opinion,
hard to see at the bottom of the screen and a nuisance to constantly
close compared to other models. My standard set up for playing medical
cyborg on the hotbar is 1=med analyzer, 2=usually a secondary surgery
tool or injector, and 3=another surgery tool. The flow of gameplay
during surgery ends up being surgery tool, hit 3 and drop it, surgery
tool, repeat or for efficiency using X to swap between the two surgery
tools I need on 2 and 3. This gets tedious especially after so many
hours of playing medical cyborg. I know some people may disagree, but I
think it would help a lot of help to speed up this flow of gameplay
during surgery and declutter.

By turning the medical cyborg's toolset into an omni-surgery tool which
functions like the surgery arm implant's radial wheel, this would
greatly declutter by like an entire row and make things easier on
medical cyborg players. Having a secondary in the bag helps with
efficiency for those players who like having an extra tool on their
hotbar and swapping back and forth would also improve efficiency and
make less swapping by hitting Z needed. Additionally with the upgraded
version as an optional upgrade in the mediborg tech, this also lets them
be on par with players who use advanced tools late game but not at the
level of alien tools where players would obviously out compete a
mediborg in terms of action speed.

Engineering models also benefit from this rework but at a slightly
different and lesser way whereas certain tools are excluded such as the
welder, due to the way they work on refill and the gas scanner and t-ray
scanner not counting as tool components are not included in the arms.

Syndicate versions of the engineering and medical cyborg also get these
arms, unupgraded.
## Changelog
🆑
add: Adds an omnitoolset for both engineering and medical cyborgs,
containing various basic tools
qol: Engineer and Medical module inventory space is now significantly
decluttered
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2024-04-21 02:28:00 -07:00
MrMelbert
ba9877e2eb Being deafnened by flashbangs / explosions now makes you shout while deaf, also very minor ear refactor (#82703)
## About The Pull Request

- If you sustain temporary deafness from a flashbang or explosion, and
are not naturally deaf (quirk, genetics, earmuffs) your text is forced
into shout mode.


![image](https://github.com/tgstation/tgstation/assets/51863163/9f6796c0-293c-4a82-a9d0-65a769457b4a)

- Minor ear refactor. 
   - Ear deafness no longer updates in life, now when taking ear damage
- Damage multiplier no longer applies to both healing and damage, making
this a felinid nerf I guess?

## Why It's Good For The Game

I always found it a bit funny (funny bad) when someone's deaf from a
bomb, and they calmly walk to medbay, and say `I'm deaf. Inacusiate
please?`

Now they will say `I'M DEAF! INACUSIATE PLEASE?!` which is funny (funny
good)

It also gives a visual (audible?) tell that someone's actually deaf.
Which may be handy in diagnosing people in medbay at a glance.

## Changelog

🆑 Melbert
add: Being deafnened from a loud sound (flashbang, explosions) will now
force people not naturally deaf to shout
add: Ear damage multiplier now only applies to taking damage, not
healing damage, meaning Felinids (who take 2x the ear damage) will no
longer heal ear damage 2x faster.
refactor: Ears have been refactored slightly, ear deafness should now
update more snappily
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-04-17 19:09:58 -07:00
Jacquerel
4019835b3e Living Limb fixes (feat: Basic mobs attack random body zones again) (#82556)
## About The Pull Request

Reworks Living Limb code to fix a bunch of runtimes and issues I saw
while testing Bioscrambler.
Specifically, the contained mobs are now initialised via element
following attachment so that signal registration can occur at the
correct time. This allows limbs to function correctly when added from
nullspace via admin panel or bioscrambler.

Secondarily (and more wide-ranging) at some point (probably #79563) we
inadvertently made basic mobs only attack the target's chest instead of
spreading damage.
This is problematic for Living Flesh which can only attach itself to
damaged limbs but was left unable to attack damaged limbs.

I've fixed this in a way which is maybe stupid: adding an element which
randomises attack zone pre-attack.
Living limbs also limit this to _only_ limbs (although it will fall back
to chest if you have no limbs at all).
This is _technically_ still different, the previous behaviour used
`adjustBruteLoss` and `adjustFireLoss` and would spread the damage
across your entire body, but there isn't a route to that via the new
interface and this seems close enough.

## Changelog

🆑
fix: Living Limbs created by Bioscrambler will be alive.
fix: Living Limbs can once more attach themselves to your body.
balance: Living Limbs will prioritise attacking your limbs.
fix: Basic Mobs will once again spread their damage across body zones
instead of only attacking your chest.
/🆑
2024-04-13 15:30:14 -06:00
san7890
c403a6eccc Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request

Fixes #82440

This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not
lost on me) to wrap around all calls of `lowertext()` and ensure that
whatever we input into that proc will be stringified using the `"[]"`
(or `tostring()` for the nerds) operator. very simple.

I also added a linter to enforce this (and prevent all forms of
regression) because I think that machines should do the menial work and
we shouldn't expect maintainers to remember this, let me know if you
disagree. if there is a time when it should be opted out for some
reason, the linter does respect it if you wrap your input with the
`UNLINT()` function.
2024-04-10 12:19:43 -07:00
NeonNik2245
931d1f7286 Adds anosmia quirk (#82206)
## About The Pull Request

Adds anosmia quirk. Anosmia, also known as smell blindness, is the loss
of the ability to detect one or more smells.

I tried to find all smells action and (most likely) update all of them,
unfortunately I can't change descriptions for this quirk.

## Why It's Good For The Game

Some characters will be able to not feel smells
That affect:
* Gases feelings and alerts (CO2, Plasma, miasm) - you don't feel them
* Bakery and cooking
* Changeling ability to feel other changelings by smell
* Some unimportant spans
2024-04-09 03:21:51 -05:00
John Willard
611c48be40 Monkeys now use height offset (and monkey tail works) (#81598)
This PR adds the ability for monkeys to wear any jumpsuit in the game,
and adds support for them to wear things like coats, gloves, and shoes
(though this cannot be obtained in-game and is solely achieved through
admins, which I also improved a bit upon by adding a defined bitfield
for no equip flags).

This reverts a lot of changes from
https://github.com/tgstation/tgstation/pull/73325 - We no longer check
height from limbs and such to bring sprites down, instead monkeys now
work more similarly to humans, so the entire PR was made irrelevant, and
I didn't really want to leave around dead code for the sake of having a
human with longer legs.

I've now also added support for Dwarfism, which makes monkeys look even
smaller. Very minor change but at least now the mutation doesn't feel
like it does literally nothing to monkeys (since they can already walk
over tables).

Here's a few examples of how it can appear in game (purely for
demonstration, as it is currently intentionally made impossible to
obtain in-game, though if someone wants to change that post-this PR now
that support is added, feel free):

Tails have been broken for a while now, the only reason you see them
in-game is because they are baked into the monkey sprites. This fixes
that, which means humans can now get monkey tails implanted into them
(hell yeah) and monkeys can have their tails removed (also hell yeah)
2024-04-09 02:36:31 -05:00
Joshua Kidder
87e049c2e9 Added on_surgical_insertion() and signals, to match on_surgical_removal (#82486)
## About The Pull Request

We have a proc for the effects of removing organs surgically --
currently only used for surplus organs blowing up -- so I added a
matching proc for inserting them surgically. It also comes with its own
signal, though there are no registrations.
## Why It's Good For The Game

Orderly code with matching insertion and removal verbs. Maybe we could
use this for lings, or traitors emagging cybernetics organs that make
them do something zany?
2024-04-08 22:25:50 -06:00
Pickle-Coding
5fbfd2447a [NO GBP]Fixes ethereal charging and recharge station charge speed. (#82483)
## About The Pull Request
Fixes many instances of things not charging ethereals properly. Scales
all things that are meant for charging/taking from the ethereal stomach
by STANDARD_CELL_CHARGE, so we never run into this issue again. Ethereal
stomachs now store a cell inside them, and uses that for the charge
instead of tracking a variable. Fixes recharging stations not being able
to charge ethereal stomachs. The ethereal signal proc attempted to feed
a callback datum to adjust_charge(), which caused a runtime. Changes
that by invoking the charge_cell callback instead.

Also fixes recharge station charging speed. They weren't converted
correctly. Also formats their charging speed in their description, and
displays power rather than referencing cycles.
## Why It's Good For The Game
So ethereals charge properly.

Closes #82470
## Changelog
🆑
fix: Fixes many instances of energy sources for ethereals supplying a
thousand times less energy than intended.
fix: Fixes recharging stations not being able to charge ethereals.
fix: Fixes recharge stations charging too fast.
qol: Recharge stations display their recharging speed in formatted
power, rather than unformatted energy per cycle.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-04-08 19:01:17 -06:00
Jacquerel
f47733d0e3 Final Objective: Battle Royale (#82258)
## About The Pull Request

Adds a new final objective option with a classic premise; the forced
battle to the death.
The concept is that the Syndicate will provide you with an implanter
tool you can use on an arbitrary number of crew members. Once you have
at least 6 (though there is no ceiling) you can activate the implants to
start the Battle Royale and broadcast the perspectives of everyone you
implanted live to the entertainment monitor.

After activation these implants cause you to explode upon death. If at
the end of 10 minutes, more than one person remains unexploded then all
of the remaining implants will detonate simultaneously.
Additionally, one of the station's departments (Medbay, Cargo, Science,
or Engineering) will be chosen as the arena. If after 5 minutes pass
you're not within that department (or if you leave it after that time
has passed) then you will be killed.

The Syndicate plan on both using the recorded footage to study
Nanotrasen technology, and also to sell it as an underground blood
sport, and so have employed a pirate broadcasting station to provide
colour commentary.

The implantation is silent, however it requires you and your target to
be adjacent and stood still for one and a half seconds.
Once implanted, it will occasionally itch and eventually signal to the
implantee that something is up, so once you start implanting someone
you're on a soft timer until you are given away. You can also implant
yourself if you want to do that for some reason.

Removing an implant from someone has a 70% chance of setting it off
instantly, but it _is_ possible. If the implant is exposed to EMP, this
value is randomised between 0 and 100%. You could also try doing surgery
while the patient is wearing a bomb suit or something, that puzzle is
for you to solve and I'm not going to tell you the answers. I'm sure
you'll think of ones I haven't.

## Why It's Good For The Game

Adds a somewhat more down-to-earth but still hopefully exciting and
threatening option which should let people mess around with the sandbox.
The mutual death element provides some roleplaying prompts; nothing
actually _forces_ you to fight apart from fear of death and it may be
possible to find other ways to survive, or perform some kind of
solidarity behaviour with your fellow contestants. Maybe you'll try that
but one of your fellow contestants just wants to be the last survivor
anyway. Maybe you'll pretend you're setting up some kind of mutual
survivorship thing in order to make sure you're the sole survivor.
Gives some people to watch on the bar TV channel.
The crew apparently love playing Deathmatch while dead so we might as
well enable doing it while alive.

Also I'm going to follow this up with a separate PR to remove the Space
Dragon objective and it felt like it'd be a good idea to do one out one
in

## Changelog

🆑
add: Adds a new Final Objective where you force your fellow crew to
fight to the death on pain of... death.
/🆑
2024-04-07 16:37:40 -07:00
FlufflesTheDog
0a296f5023 Hats no longer cover mouths (#82498) 2024-04-07 12:44:26 -06:00
Jeremiah
9723b4b317 Replaces even more deciseconds with SECONDS (#82438)
## About The Pull Request
Using these search regexes:

Ending in 0:
`addtimer\((.*),\s?(\d{1,3})0\b\)`
replacement:
`addtimer($1, $2 SECONDS)`

Two digit ending in odd:
`addtimer\((.*), (\d)([1-9])\)$`
replacement:
`addtimer($1, $2.$3 SECONDS)`

Single digit ending odd:
`addtimer\((.*), ([1-9])\)$`
replacement:
`addtimer($1, 0.$2 SECONDS)`

## Why It's Good For The Game
Code readability

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-06 15:18:49 -06:00
Artemchik542
3892aea871 Fix "Aheal" for ears deafness (#82448)
## About The Pull Request
Make the admin button "Aheal" and Magic Wand of Healing (resurrection)
actually full heal carbon's Ears.

File _ears.dm contains timer variable "deaf" that should be updated to 0
after complete healing.

But I think this must be properly code-refactored because looks like
it's just duplicates(?) standart variable "damage" for organ type.

## Why It's Good For The Game
Aheal - means FULLY HEAL.

## Changelog

🆑
fix: aheal now properly heals ears deafness
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-05 18:06:21 -06:00
EnterTheJake
3ece14ec6e Reboots the CNS Rebooter Implant. (#82441)
## About The Pull Request
The CNS Rebooter Implant will now pull you out of stuns and stamcrit,
while granting you a few seconds of stun immunity, comes with a 60
seconds cooldown
## Why It's Good For The Game
The CNS Rebooter Implant is a strong candidate for the absolute worst
implant in the game, it caps your stuns at 4 seconds
(which is plenty of time to get murdered) and does nothing to prevent
stamina damage, for something accessible in one of the latest research
nodes and in the nukie uplink it should perform better than it does now.
Besides, the game is in dire need for more tools to keep the stun meta
at bay, and this is a good place to start.

This PR makes it so the rebooter will bail you out stamcrit every 60
seconds, along with giving you a few seconds of immunity to run away or
get a couple of hits in.
## Changelog
🆑
balance: CNS Rebooter Implant will now pull you out of stamcrit and
grant you a few seconds of stun immunity
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-05 18:05:28 -06:00
Jeremiah
1443ef79d3 Replaces a number of deciseconds into SECONDS (#82436)
## About The Pull Request
Using these search regexes:

Number ending in 0:
`do_after\((\w+), (\d+)0,`
Replace:
`do_after($1, $2 SECONDS,`

Single digit number:
`do_after\((\w+), [1-9],`
replace:
`do_after($1, 0.$2 SECONDS,`

Double:
`do_after\((\w+), (\d)([1-9]),`
Replace:
`do_after($1, $2.$3 SECONDS,`

## Why It's Good For The Game
Code readability
2024-04-04 18:56:08 -06:00
SyncIt21
6dc40ca522 Standardizes object deconstruction throughout the codebase. (#82280)
## About The Pull Request
When it comes to deconstructing an object we have `proc/deconstruct()` &
`NO_DECONSTRUCT`

Lets talk about the flag first. 

**Problems with `NO_DECONSTRUCTION`**
I know what the comment says on what it should do

b5593bc693/code/__DEFINES/obj_flags.dm (L18)

But everywhere people have decided to give their own meaning/definition
to this flag. Here are some examples on how this flag is used

**1. Make the object just disappear(not drop anything) when
deconstructed**
This is by far the largest use case everywhere. If an object is
deconstructed(either via tools or smashed apart) then if it has this
flag it should not drop any of its contents but just disappear. You have
seen this code pattern used everywhere

b5593bc693/code/game/machinery/constructable_frame.dm (L26-L31)

This behaviour is then leveraged by 2 important components.

When an object is frozen, if it is deconstructed it should just
disappear without leaving any traces behind

b5593bc693/code/datums/elements/frozen.dm (L66-L67)

By hologram objects. Obviously if you destroy an hologram nothing real
should drop out

b5593bc693/code/modules/holodeck/computer.dm (L301-L304)

And there are other use cases as well but we won't go into them as they
aren't as significant as these.

**2. To stop an object from being wrenched ??**
Yeah this one is weird. Like why? I understand in some instances (chair,
table, rack etc) a wrench can be used to deconstruct a object so using
the flag there to stop it from happening makes sense but why can't we
even anchor an object just because of this flag?

b5593bc693/code/game/objects/objs.dm (L368-L369)
This is one of those instances where somebody just decided this
behaviour for their own convenience just like the above example with no
explanation as to why

**3. To stop using tools to deconstruct the object** 
This was the original intent of the flag but it is enforced in few
places far & between. One example is when deconstructing the a machine
via crowbar.

b5593bc693/code/game/machinery/_machinery.dm (L811)

But machines are a special dual use case for this flag. Because if you
look at its deconstruct proc the flag also prevents the machine from
spawning a frame.

b5593bc693/code/game/machinery/_machinery.dm (L820-L822)

How can 1 flag serve 2 purposes within the same type?

**4. Simply forget to check for this flag altogether**
Yup if you find this flag not doing its job for some objects don't be
surprised. People & sometimes even maintainers just forget that it even
exists

b5593bc693/code/game/objects/items/piggy_bank.dm (L66-L67)

**Solution**
These are the main examples i found. As you can see the same flag can
perform 2 different functions within the same type and do something else
in a different object & in some instances don't even work cause people
just forget, etc.

In order to bring consistency to this flag we need to move it to the
atom level where it means the same thing everywhere. Where in the atom
you may ask? .Well, I'll just post what MrMelbert said in
https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862

> ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION
handling as it wants,

Yup that's the ideal case now. This flag is checked directly in
`deconstruct()`. Now like i said we want to give a universal definition
to this flag and as you have seen from my examples it is used in 3 cases
1) Make an object disappear(doesn't dropping anything) when
deconstructed
2) Stop it from being wrenched
3) Stop it from being deconstructed via tools

We can't enforce points 2 & 3 inside `deconstruct()` which leaves us
with only case 1) i.e. make the object disappear. And that's what i have
done. Therefore after more than a decade or since this flag got
introduced `NO_DECONSTRUCT` now has a new definition as of 2024

_"Make an object disappear(don't dropping anything) when deconstructed
either via tools or forcefully smashed apart"_

Now i very well understand this will open up bugs in places where cases
2 & 3 are required but its worth it. In fact they could even be qol
changes for all we know so who knows it might even benefit us but for
now we need to give a universal definition to this flag to bring some
consistency & that's what this PR does.

**Problem with deconstruct()**
This proc actually sends out a signal which is currently used by the
material container but could be used by other objects later on.

3e84c3e6da/code/game/objects/obj_defense.dm (L160)

So objects that override this proc should call its parent. Sadly that
isn't the case in many instances like such

3e84c3e6da/code/game/machinery/deployable.dm (L20-L23)

Instead of `return ..()` which would delete the object & send the signal
it deletes the object directly thus the signal never gets sent.

**Solution**
Make this proc non overridable. For objects to add their own custom
deconstruction behaviour a new proc has been introduced
`atom_deconstruct()` Subtypes should now override this proc to handle
object deconstruction.

If objects have certain important stuff inside them (like mobs in
machines for example) they want to drop by handling `NO_DECONSTRUCT`
flag in a more carefully customized way they can do this by overriding
`handle_deconstruct()` which by default delegates to
`atom_deconstruct()` if the `NO_DECONSTRUCT` flag is absent. This proc
will allow you to handle the flag in a more customized way if you ever
need to.

## Why It's Good For The Game
1) I'm goanna post the full comment from MrMelbert
https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862

> ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION
handling as it wants, but there's a shocking lack of consistency around
NO_DECONSTRUCTION, where some objects treat it as "allow deconstruction,
but make it drop no parts" and others simply "disallow deconstruction at
all"

This PR now makes `NO_DECONSTRUCTION` handled by `deconstruct()` & gives
this flag the consistency it deserves. Not to mention as shown in case 4
there are objects that simply forgot to check for this flag. Now it
applies for those missing instances as well.

2) No more copying pasting the most overused code pattern in this code
base history `if(obj_flags & NO_DECONSTRUCTION)`. Just makes code
cleaner everywhere

3) All objects now send the `COMSIG_OBJ_DECONSTRUCT` signal on object
deconstruction which is now available for use should you need it

## Changelog
🆑
refactor: refactors how objects are deconstructed in relation to the
`NO_DECONSTRUCTION` flag. Certain objects & machinery may display
different tool interactions & behaviours when destroyed/deconstructed.
Report these changes if you feel like they are bugs
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-04-04 18:55:51 -06:00
MrMelbert
874e1b3667 Adds a visual effect to breathing in cold environments (#82336)
## About The Pull Request

Humans (who breathe) (with lungs) now has a particle associated when
breathing in cold air. The colder the air, the more likely the particle
to occur per breath.


https://github.com/tgstation/tgstation/assets/51863163/f375dd1b-87f6-4124-9329-4714fe988c16

Other changes:

- Adjusts the probability of getting "your lungs feel cold/hot" when
breathing cold/hot air depending on how cold/hot the air is.
- Very cold air now has a chance of causing humans to shiver when they
breathe it in.

## Why It's Good For The Game

Some nice VFX to breathe some style into the game. 

## Changelog

🆑 Melbert
qol: Breathing cold air now has a particle effect associated, careful
not to let your glasses fog up.
qol: Breathing cold air will now occasionally make your spaceman shiver.
Brrr.
/🆑
2024-04-03 20:38:23 -06:00
MrMelbert
12505721e6 Fixes some heartbeat things we didn't do (#82327)
## About The Pull Request

The things discussed in the comments of #82305 were not done before it
was merged. Hindsight is 20/20, shoulda drafted it

## Changelog

🆑 Melbret
fix: Revival Surgery, Strange Reagent, and the Reviver Implant will
restart your heart when you are revived
/🆑
2024-03-31 14:19:46 -06:00
_0Steven
a0d7c41f7f Let ethereals starve again (#82308)
## About The Pull Request

Ethereals use energy as 'food', so of course #81579 had to touch them.
To bring them in line with the new standard, the Ethereal charge levels
were updated to be in megajoules.

466b3df048/code/__DEFINES/mobs.dm (L292-L299)

7fa8daad63/code/__DEFINES/mobs.dm (L285-L292)
However! This forgot to update the rate at which Ethereals passively
discharge.

7fa8daad63/code/modules/surgery/organs/internal/stomach/stomach_ethereal.dm (L11-L14)

7fa8daad63/code/__DEFINES/mobs.dm (L437)
Meaning it's effectively a thousand times less with the new charge
levels.

So we simply update this define to be in kilowatts.
```dm
#define ETHEREAL_CHARGE_FACTOR (0.8 KILO WATTS) //factor at which ethereal's charge decreases per second
```
## Why It's Good For The Game

Fixes issue with ethereal hunger caused by #81579.
## Changelog
🆑
fix: Ethereal starvation has been updated to the new joules/watts
standard. Congratulations Ethereals! You can starve again!
/🆑
2024-03-31 14:34:16 +02:00
Profakos
b20c982404 Converts slimes to basic mobs (#82176)
## About The Pull Request

After months of preparation, and further months of work, I am finally
done. Please bear with me, as this is a massive refactor, but I have
already atomized everything I could. This is now ready for review.

General

- 	The hilbert hotel slimes are now a subtype instead of a varedit.
- The `use_mob_ability` subtree now also accepts non cooldown abilities.
If set_behaviours is set up properly, mobs won't keep continously
triggering it as if it were a 0 second cooldown action. The alternative
would have been turning the slime abilities into cooldown abilities.
- Wrestling off a slime now signs up to the `COMSIG_ATOM_ATTACK_HAND`
signal, instead of being part of attack_hand.
- Adds datum/ai_controller/controller as a fourth, optional argument to
`/datum/ai_behavior/find_hunt_target/valid_dinner()` to make it possible
to access blackboard keys.
- Slimes no longer attack windows if they would accidentally move into
them (when the conditions are met), since random walk behaviour ignores
tiles they can't go in. It was also not worth to keep. Did you know this
was the sole override of `ObjBump()`?
- Examine was made less snowflaky/bespoke. Also added a new element:
`/datum/element/basic_health_examine`, which is a simple bespoke element
that prints out a custom message based on how damaged the basic mob it
is attached to is.
- Slimes only perform knockdown instead of paralysis, as they can attack
more often now, and paralysis is not that fun.
- LAssailant has been removed due being archaic code. To befriend a
slime, you have to spawn a monkey with the slime console, or feed them a
sheet of plasma. Simple grabbing the monkey or stuffing them in
disposals do not work anymore. Slime console spawned monkeys will have a
visible status effect, with pheromones coming off them to make this
clearer.

Actions
- 	Feeding, reproduction and evolution is no longer a verb.
- Slime feeding is no longer an action button. You have to use right
click, or as previously, mousedrop. Slimes can always unbuckle from mobs
they are attached to.

Hunger 

- Instead randomly changing the starvation and max nutrition values
while growing up, evolution costs 200 nutrion. This makes the code more
readable, and behaviour more predictable, while still giving the
intended time between evolving and splitting. As a result, I could also
turn these into defines.
- Added a component that handles doing an effect over time while buckled
to a mob, until the mob dies or you get unbuckled.
- Slimes gained nutrition is no longer randomly multiplied by the damage
config value, but rather gain nutrition equal to twice the damage dealt.
You'll have to eat one monkey to evolve, just as before.
- Slimes do not heal passively. They only heal from eating. It was a
rather miniscule value that did not have much effect.
- Slimes generate electricity from hunger threshold, instead of the
random amount of hunger threshold + 100.

Environment

- Slimes take 15 damage from cold every second, instead of using a
complex formula (that also decreased the damage up to a point?).
- Slimes still heal from burn damage, but this is now set on the damage
coefficient list.
- Slimes instead of getting stunned by the cold, freeze in an ice cube.
BZ instead of setting them unconscious, calls the stasis status effect,
allowing you to safely stash your hungry slimes for later. They also no
longer slow down from the cold, as they are already slowed down by the
damage they get. Conversely they no longer get a speed up from a random
amount of temperature. I could be convinced to readd this either as part
of the basic sensitive component, or a similar one.

AI
- Removed the attacked_stacks system. Slimes will just perform regular
retaliation if you hit them in a harmful manner.
- Slimes now use the pet orders component. They will interrupt their
feeding when given a command by their master.
- Slimes have their own subtrees. I tried to replicate as much as I
could from the old code, dividing ancient code artifacts and intentional
stuff, so there might be some weirdness.
- Slime speech has been almost fully reduced to basic blorbing, as you
can not even understand them anymore, and most of them require the slime
to loop through all of their surroundings.
- Discipline does not have stacks either. Disciplined baby slimes have a
chance to clear their attack and hunt blackboard keys. All slimes will
stop feeding on the target otherwise.
- Since discipline is not a stack, rabidity instead gets removed at a
10% chance per disciplining.
- 	Slimes faces are a bit more randomly picked now.

## Why It's Good For The Game

- We want to convert all simple animals to basic mobs. Old slime code
was also very strange, and had some systems that have been replicated by
components.
- Slimes fully paralyzing you is not fun at all. Knockdown should give
you a fighting chance when a slime would like to eat you.
- Slimes slow down from the heavy damage they get from the cold, so I
don't think they need extra slowdown, nor do they need to speed up from
warmth, as they are already fast.
- Slimes turning into an icecube instead of becoming paralyzed from the
cold is more fun for the slimes, as they can break out for a few
moments. It is also funny.
- Slimes entering proper stasis from BZ is not just a visual indicator
of a slime that is safe to approach, but also keeps the slimes's hunger
value in check, allowing it to not starve while stopped. They can also
look around and blorble, instead of staring at a black screen, if player
controlled.
- The attack_stack and discipline_stack behaviours were rather
overcomplicated, and the xenobio mains I talked with didn't even know it
was a thing, so I argue it needed simplification.
- The bespoke friendship system of slimes was also too complicated.
Slimes slowly gained levels of trust, and at certain levels commands
costed friendship, and other levels, they did not. The binary friend/not
friend system that everything else in the game uses is much more
sensible.
- Using right click for feeding is much more sensible than using an
action, and then picking someone from a dropdown.
- Slime speech was very soulful but not only did it loop through
everything in sight, you couldn't even understand it unless you spoke
slime. Maybe it can be readded later in a different form.
- Slime's passive healing was miniscule, and having them rely on feeding
is more interesting.

also
fixes #81463

## Changelog

🆑
refactor: Slimes are now basic mobs. Please report any strange
behaviours!
balance: Slimes only stun you for two seconds when they shock you, the
rest of the duration is a knockdown.
balance: Slimes are not stunned from the cold, but rather, get frozen in
a freon icecube. BZ also puts them in complete stasis, instead of making
them unconscious. Their speed is likewise unchanged by temperatures.
balance: Slimes do not passively heal, they instead rely on feeding.
fix: Slimes can use the buckling screen alert to unbuckle and stop
feeding, along with clicking on the mob they are riding
/🆑
2024-03-27 16:40:52 -06:00
lessthanthree
5289bf367c Fixes starting self surgery (#82255)
## About The Pull Request

Fixes being unable to start self-surgery while laying down.

Closes https://github.com/tgstation/tgstation/issues/82034

## Changelog

🆑 LT3
fix: Fixed being unable to start self surgery
/🆑
2024-03-26 20:04:09 -06:00
Alexios
68032b2587 Readability Pass to Advanced Medical Tools (#82225)
## About The Pull Request

Update the sprites of the advanced surgical toolset, giving them
distinct colors and updating their lighting to reduce shades and
increase visual readability at normal resolutions.


![image](https://github.com/tgstation/tgstation/assets/32783144/4daa4f95-2415-4d60-a666-361ebfc52281)

![image](https://github.com/tgstation/tgstation/assets/32783144/b3dfba7b-3db9-42ab-b088-a6e592a3297a)

![image](https://github.com/tgstation/tgstation/assets/32783144/65efec62-aaec-4e86-8a3c-5a57aa08198e)


## Why It's Good For The Game

Currently, the advanced surgical toolset over-relies on the tooltip to
communicate item state quickly and accurately. This PR adds both color
differentials, and enhances the shape of the existing tools to help a
player tell them apart quickly and accurately. Additionally, it assists
in defining the general shape of the item with cleaned up shading to
decrease noisy patterns in the sprite.
## Changelog
🆑
image: Updated the Advanced Surgical Tool's sprites
code: Updated the Advanced Surgical Tool's light code
/🆑
2024-03-26 20:14:50 -04:00
MrMelbert
afe1b7443c Fix species var/hair_color not being used for, well, hair color (#82168)
## About The Pull Request

`var/hair_color` for species was intended to be used as a "this species
uses this type of hair color thing"

But at some point that got completely lost and now it's only used for
sprite accessories

This fixes that. That means Slimepeople now have properly slimey hair.
And Ethereals are less snowflake once more.

## Changelog

🆑 Melbert
fix: Fixed Slimepeople's hair not matching their slimey colors. 
/🆑
2024-03-24 13:25:46 -06:00
MrMelbert
959c15cdbe Fix some slime species subtypes not having burn resistance (#82164)
## About The Pull Request

All slime species limb subtypes now inherent from the parent `/jelly`
subtype, giving them all their proper burn resistance.

## Changelog

🆑 Melbert
fix: Slimepeople and Luminescents are now 50% burn resistant like
Stargazers
/🆑
2024-03-24 13:25:03 -06:00
MrMelbert
a8fc9cf7e2 Makes Bioware into Status Effects because they're just Status Effects but their own datum (#81989)
- Refactors `/datum/bioware` -> `/datum/status_effect/bioware`. 
- Literally everything bioware datum does is done by the status effect
API, including handing dupes / unique keys
- Tallies all blackbox surgeries done rather than just nerve splicing
2024-03-23 21:01:28 +00:00
MrMelbert
aa38fb4227 Jellyperson Hair Fix B: "If you're gonna have it, do it right" (#82167)
## About The Pull Request

#76074 Accidentally made all Slimepeople types have all head flags, when
Jellypeople and Luminescents should not have.

This is a proposed alternate fix to #82166 which, rather than removing
all hair from all jellypeople types (except slimes) , it makes all
jellypeople hair look like slime (like slimepeople).

This PR also fixes jellies have some head flags they shouldn't. 

## Changelog

🆑 Melberet
fix: Jellyperson, Luminescent, and Stargazer hair no longer look bad.
All jellyperson types no longer have eyesockets.
/🆑
2024-03-23 14:59:52 -06:00