Commit Graph

367 Commits

Author SHA1 Message Date
MrMelbert
8c1e35e1c0 Refactors mind language holders into non-existent, fixes new languages being deleted on species swap + tests (#76612)
## About The Pull Request

This PR refactors mind language holders into non-existence

As a result, `update_atom_languages` is no longer necessary

Mind-bound languages are transferred via `/mind/proc/transfer_to`

Species changing no longer deletes and re-creates the mob's language
holder, allowing them to keep any languages they have.

Species languages are sourced from `LANGUAGE_SPECIES` now, meaning they
are removed when they change species. If the mob is not a human with a
species datum, these are effectively just atom level languages.

Makes a bunch of unit tests to ensure language transfer over certain
events works as intended

## Why It's Good For The Game

Mobs with minds having two independent language holders results in a
good few bugs, and simply doesn't make sense when we have sources
(`LANGUAGE_MIND`).

Instead of tracking two language holders, we can simply use sources
better and only track one.

This means that the language holder you start with is your language
holder, period. It doesn't get deleted or re-instantiated or whatever.

## Changelog

🆑 Melbert
refactor: Refactored language holders, making species changes not delete
all of your known languages
/🆑
2023-07-10 18:34:57 +00:00
John Willard
32afa856db Makes cult leader handling work off of the Cult datum (#76556)
## About The Pull Request

Removes Cult master's datum, it's not handled by the Cultist itself,
using a helper to promote/demote people to leader.
In practice, the only way someone would be demoted is through Admins, so
this adds support for Admins to intervene in this Cult stuff if
necessary.

Moves cult objectives and cult team to their own files

Removes the cult master's status effect that constantly processes to
send a deathrattle, and instead moves it to a signal hooked to stat
change.

Also moves some things from ``get_antag_minds`` to checking the team,
which doesn't change anything in-game but it does help add the currently
non-functional support for several cult teams. Iunno.


https://github.com/tgstation/tgstation/assets/53777086/573a4f13-35e1-4f34-9952-62fed10b49c9

## Why It's Good For The Game

Having the cult leader be its own datum has actually been handled like
shit. To promote someone to cult leader, we currently make their current
cult datum silent, then remove it, and finally add the cult leader
datum. This means they lose their spells unless manually given back
post-promotion, which sucks (and also, no one has done yet, meaning they
just lose all their spells).
It also means there's a lot more snowflake things, did you know there's
a var to bypass converting mindshielded people? That's so cult masters
can be promoted by Cultists who were mindshielded, and they have to be
"ownable", that var is to bypass the check for mindshield to "convert"
them to leader cultist.

## Changelog

🆑
fix: Cultists promoted to Leader no longer lose their spells (rip
whoever tried saving up blood rites)
admin: Admins can now force promote/demote people from Cult Leader if
necessary.
/🆑
2023-07-07 06:27:31 -04:00
MrMelbert
dc88203f0b Fix Too Slowing people with high fives (#76277)
## About The Pull Request

At some point with the refactors to offering it was made so that
dropping the item stops the offer, unfortunately too slowing people with
high fives relied on this behavior (dropping not stopping the offer).

Restores that behavior with a bit more code tweaking. 

## Why It's Good For The Game

How can I be too slow?

## Changelog

🆑 Melbert
fix: You can once again "too slow" someone with a high five
/🆑
2023-06-26 22:13:22 -06:00
Ghom
4ffccee19e [NO GBP] I flunked a commit just a hour ago and now Tinea Luxor's effect only lasts two seconds when added to mobs with a reagent holder. That was idiotic of me. (#76328)
## About The Pull Request
So, I was going to use `-1` as second arg for that apply_status_effect()
call, which is the duration of all status effects that don't expire with
time, except that looks like a magic number that could use a define,
though I was groaning at the idea of doing that, so I rolled back the
change. Turns out I had forgotten the default value of that duration
argument was `2 SECONDS` and only noticed it a few minutes after the PR
was merged. @ZephyrTFA

## Why It's Good For The Game
Do I have to explain again?

## Changelog
If this gets merged before the change goes live, I won't have to.
2023-06-25 17:28:14 -04:00
Ghom
cf443bfbad [s] Knocks the lights out of Tinea Luxor (#76295)
## About The Pull Request
So, we've a problem where the lights from Tinea Luxor can be staked up
indefinitely, because someone thought it was a brilliant idea to use
expose_mob rather than on_mob_metabolize.

## Why It's Good For The Game
This will close #76263. Aaaand yes, this is a webedit PR.

## Changelog

🆑
fix: Fixes the lights from Tinea Luxor being stackable to the point of
crashing the game for others.
/🆑
2023-06-25 17:08:15 -04:00
ChungusGamer666
b9b19bd6e1 Lighting object oddities (#76009)
## About The Pull Request

Fire stacks status effect no longer uses a weakref for the mob light, I
am pretty sure there was no real reason to use a weakref there.
Deleted weird luminescent glow dummy, now it just uses the standard
moblight obj.
Put all /obj/effect/dummy/lighting_obj together in a single file and
added a comment explaining why they exist.

(I severely dislike the /obj/effect/dummy typepath, but I am very much
unsure if just replacing all of them with /obj/effect/abstract would
break shit)

## Why It's Good For The Game

Code organization good
2023-06-20 06:08:29 +00:00
MrMelbert
22799fcb89 Refactors the worst list ever, Stun Absorptions, into status effects + makes status flags more accurate (making certain mobs more vulnerable to incapacitations?) (#76000)
## About The Pull Request

- Refactors the stun absorption list into a status effect

- Does a fair bit of cleanup around stun code

Weird thing involved in this.
Check out this define. 
`IS_STUN_IMMUNE(source, ignore_canstun) ((source.status_flags & GODMODE)
|| (!ignore_canstun && (!(source.status_flags & CANKNOCKDOWN) ||
HAS_TRAIT(source, TRAIT_STUNIMMUNE))))`
Notice anything odd about it?
It only checks for `CANKNOCKDOWN`. 
What does this mean?
Well, *every single* one of the stun procs used this macro for checking
stun immunity. Which means every method of stun checked the
`CANKNOCKDOWN`.
This means that, say you have a mob which has `CANSTUN` but not
`CANKNOCKDOWN`.
Intuitively this means that the mob cannot be knocked down, but can be
stunned.
But instead, this means the mob can't be stunned either. 
This doesn't affect humans, they have all the status flags, but it does
affect some other mobs.
Alien adults (not queens) have `CANUNCONSCIOUS|CANPUSH`. Before, they
didn't have `CANKNOCKDOWN`, so they were fully immune to stuns and
sleeps. But now, they can be knocked unconscious.
However, overall it doesn't change much, as most mobs that flipped off
`CANKNOCKDOWN` flipped off the others too.
For consistency though it makes sense for these flags to work as they
imply.

- `incapacitate` didn't have a signal, now it does

## Why It's Good For The Game

More consistent, better code? I may use this in the future.

## Changelog

🆑 Melbert
refactor: Refactored Stun Absorptions (Bastard Sword, His Grace)
refactor: Refactored Stun Immunity. Note this means that some mobs
which, prior, were immune to all forms of incapacitation are now
vulnerable to some. Notably, adult non-queen xenomorphs are now
vulnerable to falling unconscious.
/🆑
2023-06-16 14:44:25 -06:00
ChungusGamer666
1bede4dcff Acid particles (+unsorted acid/burning/thermite component changes) (#75248)
This PR is way less than the file changes make it seem like it is.
Okay, first, the boring part:
- Picking up burning items is now a signal registered on the burning
component itself, instead of being a direct /obj/item/attack_hand()
check
- Sear sound now has an SFX define for convenience, since it is very
commonly used
- Fire stacks when extinguished on mobs will no longer clean acid on
items (WTF?)
2023-06-16 06:39:24 +00:00
ChungusGamer666
1d9d2fba69 Stops particle holders from appearing on context menu (#76006)
## About The Pull Request

Basically, due to carbons using KEEP_TOGETHER, particles were appearing
on the context menu which is annoying. I have no idea why it behaves
like this.
Buuut, giving particle holders the KEEP_APART flag does fix this.

closes https://github.com/tgstation/tgstation/issues/75641

## Why It's Good For The Game

Bugfix good

## Changelog

no
2023-06-15 19:55:23 -06:00
ATH1909
b729ba5d3f The destabilization of your eigenstate can no longer be paused by stripping naked (#75982)
## About The Pull Request

The destabilization of your eigenstate can no longer be paused by
stripping naked.

## Why It's Good For The Game

one of the stages of the eigenstasium od's status effect is causing your
items to teleport off of you

this early returned out if you had no items to teleport off of yourself

and it did this before the line of code that increments the status
effect's progress counter

so if you had no items to teleport, you'd never progress to the later
stages of the status effect

## Changelog

🆑 ATHATH
fix: The destabilization of your eigenstate can no longer be paused by
stripping naked.
/🆑
2023-06-13 07:39:43 +02:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
John Willard
e38882179f Fixes mind traits (Curator, Miner, Clown) (#75593)
## About The Pull Request

Tower of Babel (Curator), Naive (Clown), and Storm detector (Shaft
Miner), are all traits that are given to your mind upon taking these
jobs.
However, we have been checking the body for these traits, not the mind.
This meant that Shaft miners werent alerted of ice storms, Clowns didnt
have their unique examine text, and Curators were affected by Tower of
Babel.
This fixes all those issues.

Naive and Tower of Babel realistically should only be on the mind, so I
changed all instances to check the mind. Storm detection is something
you can get through analyzers, so I left it as a check for both your
body and mind traits.

Clown's Naive:

![image](https://github.com/tgstation/tgstation/assets/53777086/30e92026-5d1d-44a5-9969-206df99c5e8f)

Tower of Babel:

![image](https://github.com/tgstation/tgstation/assets/53777086/b1d41f9d-e020-495c-89de-0d4e2c953442)

## Why It's Good For The Game

Fixes several bugs for 3 jobs all at once. I don't see any issue reports
on any of these, but they existed.

## Changelog

🆑
fix: Shaft Miners are now alerted of Icemoon storms, Clowns are naive,
and Curators are immune to the Tower of Babel again.
/🆑
2023-05-23 16:53:51 -06:00
MrMelbert
835952ccf4 Drunk slurring scales based on how drunk you are (#75459)
## About The Pull Request

The strength of the slurring effect drunkness applies on you now scales
based on how drunk you are.

Being "a little" drunk still changes your saymod, and makes you
occasionally slur your words...


![image](https://github.com/tgstation/tgstation/assets/51863163/1b21b359-a1f9-428a-8e10-d2028ac59728)

But being "a lot" drunk kicks it up to 11


![image](https://github.com/tgstation/tgstation/assets/51863163/9d593c80-75ff-4d02-8e7c-e48c738154bb)

Additionally, drunk slurring was separated into "generic slurring" and
"drunk slurring", the former which does not scale but less closely
resembles drunkness. Generic slurring is used in places such as
concussions, so this is an added bonus.

As a result of the split, I had to update mind restoration. Now it heals
all types of slurring, which does include cult slurs.

## Why It's Good For The Game

I, and many other people, always found it very annoying when you became
completely illegible from taking one sip of a drink. This seeks to amend
that by making low levels of drunkness still for the most part be
legible and sane. Average drunkness is roughly the same / equal to the
old slurring effect, while "very drunk" is even more illegible and silly
(which I find funny).

This has the added bonus of separating out "drunk slurring" and "generic
slurring", allowing effects to slur your words without going full ham on
drunkness (burping and "huhh"s).

## Changelog

🆑 Melbert
add: When you are drunk, the strength of your slurring now varies based
on how drunk you are. Being "a little drunk" only rarely slurs your
words, being average drunk is the same as the old effect, while being
very drunk now slurs your words even more.
add: Some non-alcohol sources of slurring, such as concussions, now give
"generic slurring" rather than "drunk slurring", which less resemble
being drunk (ie, no burping).
add: Mind restoration now heals ALL slurring, rather than only drunk
slurring (which includes cult / heretic slurring).
/🆑
2023-05-16 19:02:10 -04:00
Watermelon914
a98706ff8b Adds TTS to the game. Players can select their own voices in preferences. (#74775)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-05-15 16:21:54 -07:00
Sealed101
f4c9b1bbbf Makes genetic damage gorillas work (#75398)
## About The Pull Request
Moves the genetic damage status effect's `qdel()` after making the
status effect's owner a gorilla.
Basically un-fucks the interaction, as it was accidentally fucked in
#74799, see
https://github.com/tgstation/tgstation/issues/74981#issuecomment-1546140751

## Why It's Good For The Game
Fixes #74981

## Changelog
🆑
fix: made gorilla transformation when affected by excess amounts of
genetic damage work
/🆑
2023-05-13 20:34:29 -04:00
Jordan Dominion
330dbd1278 Fix SHOULD_NOT_SLEEP hit in dna_melt status_effect (#75234) 2023-05-08 13:41:54 -05:00
John Willard
1674f25725 New Medical job: The Coroner (#75065)
## About The Pull Request

HackMD: https://hackmd.io/RE9uRwSYSjCch17-OQ4pjQ?view

Feedback link: https://tgstation13.org/phpBB/viewtopic.php?f=10&t=33972

Adds a Coroner job to the game, they work in the Medical department and
have their office in the Morgue.
I was inspired to make this after I had played my first round on
Paradise and messed around in there. The analyzer is copied from there
(https://github.com/ParadiseSS13/Paradise/pull/20957), and their
jumpsuit is also mostly stolen from it (i just copied the color scheme
onto our own suits).

Coroners can perform autopsies on people to see their stats, like this

![image](https://user-images.githubusercontent.com/53777086/235369225-805d482c-56c0-441c-9ef8-a42d0a0192bc.png)

They have access to Medbay, and on lowpop will get Pharmacy (to make
their own formaldehyde). They also have their own Secure Morgue access
for their office (doubles as a surgery room because they are edgelords
or whatever) and the secure morgue trays.

Secure Morgue trays spawn with their beepers off and is only accessible
by them, the CMO, and HoS. It's used to morgue Antagonists. Security's
own morgue trays have been removed.

The job in action


https://cdn.discordapp.com/attachments/950489581151735849/1102297675669442570/2023-04-30_14-16-06.mp4

### Surgery changes

Autopsies are a Surgery, and I tried to intertwine this with the
Dissection surgery.
Dissections and Autopsies both require the Autopsy scanner to perform
them, however you can only perform one on any given body. Dissections
are for experiments, Autopsies is for the paper of information.

Dissected bodies now also give a ~20% surgery speed boost, this was
added at the request of Fikou as a way to encourage Doctors to let the
Coroner do their job before reviving a body.
I also remember the Medical skill, which allowed Doctors to do surgery
faster on people, and I hope that this can do something like that
WITHOUT adding the potential for exploiting, which led to the skill's
downfall.

### Morgue Improvements

Morgue trays are no longer named with pens, they instead will steal the
name of the last bodybag to be put in them.

Morgue trays are also removed from Brig Medical areas and Robotics, now
they have to bring their corpses to the Morgue where the Coroner can
keep track and ensure records are properly updated.

### Sprite credits

I can't fit it all in the Changelog, so this is who made what

McRamon
- Autopsy scanner

Tattax 
- Table clock sprites and in-hands

CoiledLamb
- Coroner jumpsuits & labcoats (inhand, on sprite, and their respective
alternatives)
- Coroner gloves
- CoronerDrobe (the vending machine)

## Why It's Good For The Game

This is mostly explained in the hackmd, but the goal of this is:

1. Increase the use of the Medical Records console.
2. Add a new and interesting way for Detectives to uncover mysteries.
3. Add a more RP-flavored role in Medical that still has mechanics tied
behind it.

## Changelog

🆑 JohnFulpWillard, sprites by McRamon, tattax, and Lamb
add: The Coroner, a new Medical role revolving around dead corpses and
autopsies.
add: The Coroner's Autopsy Scanner, used for discovering the cause for
someone's death, listing their wounds, the causes of them, their
reagents, and diseases (including stealth ones!)
qol: Morgue Trays are now named after the bodybags inside of them.
balance: The morgue now has 'Secure' morgue trays which by default don't
beep.
balance: Security Medical area and Robotics no longer have their own
morgue trays.
balance: Dissected bodies now have faster surgery speed. Autopsies also
count as dissections, however they're mutually exclusive.
/🆑

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-05-05 21:31:28 -04:00
ChungusGamer666
62e9268cc0 Refactors genetic damage component to be a status effect (#74799)
## About The Pull Request

The genetic damage component looked like a status effect, swam like a
status effect, quacked like a status effect, but wasn't a status effect.

Irradiated component is also guilty of this, but it has the excuse of
also getting applied to items. This one only applies to mobs though,
so...

## Why It's Good For The Game

Easier to maintain code, that's about it.

## Changelog

Not player facing.
2023-04-20 17:14:06 -06:00
LemonInTheDark
9219ca33f9 Optimizes particle holders (#74524)
## About The Pull Request

It isn't really an issue now, but these will be used more in future, so
let's start off strong.

There's a lot of work going on here that doesn't really need to be
happening, mostly off not knowing a trickTM.

Biggest one is vis_locs and vis_contents are linked lists, being in one
requires being in another. Atoms clear out their vis_locs on Destroy, so
we do not need to "own" references to things that have us in their
vis_contents.

This combined with knowing our old loc's loc off Moved made the use of
weakrefs here unneeded. Similarly, atoms inside atom movables qdel on
when the upper layer is deleted, so most cases of the qdeleting signal
were unneeded.

Also, we only cared about movement if we were an item (speaking of
which, I swapped out the isitem stuff with a flag that gets passed into
the new() call)

## Why It's Good For The Game

Speed
2023-04-16 10:12:14 +02:00
Jacquerel
fe8003402e [no gbp] Simple animals can't catch on fire (#74736)
## About The Pull Request

Fixes #74633
FIxes #74739

I probably broke this when I refactored spiders and it became apparent
because someone added particles to it.
Simple animals didn't really do anything as a result of being on fire
except perhaps invisibly pass it on to other people, but it was wasteful
to apply the status effect.

## Why It's Good For The Game

No mostly-invisible fire hazards.

## Changelog

🆑
fix: Renault and other simple animals are now correctly fireproof.
/🆑
2023-04-15 21:20:56 -06:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
ChungusGamer666
78db293e77 Fire and water particle effects for mobs (sick) (#74555)
## About The Pull Request

Mobs on fire and wet mobs get cool particle effects

## Why It's Good For The Game


https://user-images.githubusercontent.com/82850673/230459326-184b5553-17db-49df-997f-8db4c87df601.mp4
fire particles (big fire)
small fire just reduces the spawn rate of particles to 20% of this


https://user-images.githubusercontent.com/82850673/230468680-b831e557-bb0a-4489-8aef-4fefdfc14e43.mp4
wet particles

sick

## Changelog

🆑
add: Mobs on fire get particle effects (it looks sick)
add: Wet mobs get particle effects (it looks sick)
/🆑
2023-04-07 19:41:19 -06:00
Time-Green
f13f979586 March Into Mapness: Anomaly Research Ruin (#74110)
## About The Pull Request
Adds a new ruin: Anomaly Research Center!
Researcher Anna Molly disappeared along with 20 anomaly cores, where
could she have gone?


![image](https://user-images.githubusercontent.com/7501474/228217881-6b510347-d37f-4713-841c-e2280b92f69c.png)

<details>
  <summary>Pictures</summary>

(a bit outdated but not that much)

![image](https://user-images.githubusercontent.com/7501474/226172256-1d29257e-0914-48da-b199-8ecb3d0b8d99.png)

![image](https://user-images.githubusercontent.com/7501474/226172318-f98d7402-0b3e-4797-b788-2085bfc6ac46.png)

![image](https://user-images.githubusercontent.com/7501474/226172341-b70ae4d6-c1e2-4cf7-8667-c64ac99252cf.png)

![image](https://user-images.githubusercontent.com/7501474/226172364-c7b4c78f-4ddd-4ded-8ca2-92cb74e05d86.png)

![image](https://user-images.githubusercontent.com/7501474/226172378-8cf579b3-c081-436b-8121-ac6e080d7af0.png)

![image](https://user-images.githubusercontent.com/7501474/226172387-ef67e32f-adb1-4d68-8e6a-a0beb7f0435d.png)

![image](https://user-images.githubusercontent.com/7501474/226172406-d735ce68-2bd6-4218-acc3-7efa0acdca06.png)

![image](https://user-images.githubusercontent.com/7501474/226172413-03c9bff7-2d96-4f51-be3a-ea738f92c04f.png)

![image](https://user-images.githubusercontent.com/7501474/226172448-ea19ced1-6f34-4cc4-ac98-6dbfd1481847.png)

![image](https://user-images.githubusercontent.com/7501474/226172454-a8df6a4d-7a14-4942-ab71-9baa03a948fd.png)
</details>

<details>
  <summary>Loot and hazards</summary>

**Loot**

- (1) Raw anomaly core
- NO ANOMALY CORES
- Empty anomaly armor, empty bag of holding
- Bunch of anomaly neutralizers
- 5u of wittel (guarded by anomaly)
- (5) New anomaly releaser, use on an anomaly core to release and
stabilize the anomaly, removing the decay timer

**Hazards**
Area is guarded with "hollow" anomalies, stable and coreless (flux,
bluespace, hallucination, delimber)
They cannot be signalled, but the anomaly neutralizes will make them go
away

BEEEG ANOMALIE: Spawns with a contained supermassive anomaly. There's
four possible big anomalies that can spawn:
- Mega Bluespace: Has a longer reach and can teleport further. On touch,
teleports you all over space for 10 seconds
- Mega gravity: Distorts the area around it, as strong as the rare
gravity anomaly, but with extreme moveforce
- Mega Pyro: Creates more plasma, turns the tile it's on into lava,
dusts on touch
- Mega Flux: Extra damage, dusts on touch, shoots lightning
  
</details>

### Mapping March
Ckey to receive rewards: timegreen

## Why It's Good For The Game
I think we're overdue for an anomaly ruin. The ruin has some unique loot
that could be really fun, but not devastating, to play around with on
the station. The mega-anomaly is also pretty cool.

## Changelog
🆑
add: Researcher Anna Nomally has disappeared into space, carrying 20
anomaly cores. What could she be up to?
/🆑

---------

Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
2023-04-02 13:55:41 +12:00
Helg2
6a0341d4f7 Adds pillow bonus for sleeping. (#74349)
## About The Pull Request
There is bedsheet bonus, but no pillow bonus.
## Why It's Good For The Game
Healthy sleep.
## Changelog
🆑
add: Sleeping with a pillow restores more health.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-03-31 22:28:11 -06:00
tattle
eff745bf08 Minor typo fixes (#74317)
## About The Why It's Good For The Game Pull Request
Immersion

## Changelog

🆑 Tattle
spellcheck: fixed a few typos, mostly around breathing
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2023-03-28 23:25:04 -06:00
Zephyr
ecbcef778d Refactors Regenerate Organs, and a few organ helpers (#74219)
## About The Pull Request

Refactors regenerate organs to be slightly more intelligent in handling
organ changes and replacements.
Noteably:
- We don't remove organs that were modified by the owner; such as
changing out your heart for a cybernetic
- We early break out of the for loop if they aren't supposed to have an
organ there and remove it
- We check for the organ already being correct, and just healing it and
continuing if it is

Also changes the names of some of the organ helpers into snake_case
### Mapping March
Ckey to receive rewards: N/A

## Why It's Good For The Game
## Changelog

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-26 17:54:36 +01:00
san7890
bf6f81a9b5 Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test (#74037)
On the tin, doing it like this means we can reduce our overall line
fingerprint whenever we have to add two or more traits from the same
source on the same target. Especially helps when we get to the 4+ range
of traits, a breath of fresh air even.

Doesn't mean we have to do for loops, as that's already handled within
the define as well. I replaced some of the checks with `length()`
checks, let me know if I should switch it over to something else (maybe
`islist()`)? We stack_trace whenever we're not passed a list reference
on purpose, and sometimes var/lists are null by default (or just empty,
making this redundant).
## Why It's Good For The Game

I commonly feel the urge to write "use `AddTraits()`" or something in
reviews, then am sad when I remember it doesn't exist. I will no longer
be sad.

Can ensure a lot more trait safety as well by using static lists- when
both ADD_TRAIT_LIST and REMOVE_TRAIT_LIST re-use the same list, you are
confident (from a static point of view) that everything that you want to
be adding/removing works.

I may have missed a few things where this could be used, but both macros
implemented in this PR still use the same framework that was being used
in the last four years- so stuff won't break if left untouched. Just a
nifty new tool for developers.

also fixed up some code in the area, numerous bugs were found and
exploded
2023-03-18 01:57:06 +00:00
MrMelbert
e80879d22c Ensures some ling ability icon always update correctly, Fixes a potential input stall in Revival Stasis (#73616)
## About The Pull Request

- For Fleshmend, on apply kinda happens before alerts are made, so using
Fleshmend when you're on fire wouldn't make the alert the "you're on
fire" alert.

- For Revival Stasis, I think I just missed an update call? Which made
it not update on occasion.
- I also patched a potential issue with input stalling on Revival Stasis
while here.

## Changelog

🆑 Melbert
fix: Using Fleshmend while on fire gives the "on fire" fleshmend icon. 
fix: Using Revival stasis more accurately updates the icon where
relevant
fix: Fixes a potential input stall with revival stasis
/🆑
2023-03-01 00:05:08 -07:00
Jacquerel
b7da743e7d [no GBP] Corrects the speed at which spiders stop being on fire (#73601)
## About The Pull Request

As noted in #73584 spiders stopped being on fire faster when they were
simple mobs than they do now, and I have restored this behaviour.
While I was there I noticed that spiders were the only simple mobs which
could catch fire so I just remove that behaviour.
I also changed the boolean "flammable" into a flag, not sure if that's
actually better but maybe it is? I tried a little to see if I could make
this into a component but there's basically no way as all of this
behaviour is inside a status effect.

## Why It's Good For The Game

Restores original behaviour.
Maybe in the future I'll (or someone else will) use this to make some
other basic mobs able to be set on fire, no obvious reason they
shouldn't be able to be.

## Changelog

🆑
fix: Spiders will stop being on fire marginally faster, as they used to.
/🆑
2023-02-26 15:41:43 -07:00
MrMelbert
1ad297ba19 Fixes cult ghosts not gaining the status effect they were intended to gain for 5 years (#73490)
## About The Pull Request

`on_apply` memes

Someone needs to update `on_apply` to require explicit "do not apply"
rather than explicit "please apply"

## Changelog

🆑 Melbert
fix: Cult Ghosts can see in the dark and invisible stuff, a mechanic
intended for over 5 years and never functional
/🆑
2023-02-18 13:48:04 -07:00
LemonInTheDark
ab307032ed Nightvision Rework (In the name of color) (#73094)
## About The Pull Request

Relies on #72886 for some render relay expansion I use for light_mask
stuff.

Hello bestie! Night vision pissed me off, so I've come to burn this
place to the ground.
Two sections to discuss here. First we'll talk about see_in_dark and why
I hate it, second we'll discuss the lighting plane and how we brighten
it, plus introducing color to the party.

### `see_in_dark` and why it kinda sucks

https://www.byond.com/docs/ref/#/mob/var/see_in_dark

See in dark lets us control how far away from us a turf can be before we
hide it/its contents if it's dark (not got luminosity set)
We currently set it semi inconsistently to provide nightvision to mobs.

The trouble is stuff that produces light != stuff that sets luminosity.
The worst case of this can be seen by walking out of escape on icebox,
where you'll see this


![image](https://user-images.githubusercontent.com/58055496/215683654-587fb00f-ebb8-4c83-962d-a1b2bf429c4a.png)

Snow draws above the lighting plane, so the snow will intermittently
draw, depending on see_in_dark and the luminosity from tracking lights.
This would in theory be solvable by modifying the area, but the same
problem applies across many things in the codebase.
As things currently stand, to be emissive you NEED to have a light on
your tile. People are bad at this, and honestly it's a bit much to
expect of them. An emissive overlay on a canister shouldn't need an
element or something and a list on turfs to manage it.
This gets worse when you factor in the patterns I'm using to avoid
drawing lights above nothing, which leads to lights that should show,
but are misoffset because their parent pixel offsets.

It's silly. We do it so we can have things like mesons without just
handing out night vision, but even there the effect of just hiding
objects and mobs looks baddddddd when moving. It's always bothered me.
I'll complain about mesons more later, but really just like, they're too
bright as it is.

I'm proposing here that rather then manually hiding stuff based off
distance from the player, we can instead show/hide using just the
lighting plane. This means things like mesons are gonna get dimmer, but
that's fine because they suck.

It does have some side effects, things like view() on mobs won't hide
stuff in darkness, but that's fine because none actually thinks about
view like that, I think.

Oh and I added a case to prevent examining stuff that's in darkness, and
not right next to you when you don't have enough nightvision, to match
the old behavior `see_in_dark` gave us.

Now I'd like to go on a mild tangent about color, please bare with me

### Color and why `lighting_alpha` REALLY sucks

You ever walk around with mesons on when there's a fire going, or an
ethereal or firelocks down.
You notice how there isn't really much color to our lights? Doesn't that
suck?

It's because the way we go about brighting lighting is by making
everything on the lighting plane transparent.
This is fine for brightening things, but it ends up looking kinda crummy
in the end and leads to really washed out colors that should be bright.
Playing engineer or miner gets fucking depressing.

The central idea of this pr, that everything else falls out of, is
instead of making the plane more transparent, we can use color matrixes
to make things AT LEAST x bright.

https://www.byond.com/docs/ref/#/{notes}/color-matrix

Brief recap for color matrixes, fully expanded they're a set of 20
different values in a list
Units generally scale 0-1 as multipliers, though since it's
multiplication in order to make an rgb(1,1,1) pixel fullbright you would
need to use 255s.

A "unit matrix" for color looks like this:
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0, 0, 0, 0
)
```

The first four rows are how much each r, g, b and a impact r, g, b and
well a.
So a first row of `(1, 0, 0, 0)` means 1 unit of r results in 1 unit of
r. and 0 units of green, blue and alpha, and so on.
A first row of `(0, 1, 0, 0)` would make 1 red component into 1 green
component, and leave red, blue and alpha alone, shifting any red of
whatever it's applied to a green.

Using these we can essentially color transform our world. It's a fun
tool. But there's more.

That last row there doesn't take a variable input like the others.
Instead, it ADDS some fraction of 255 to red, green, blue and alpha.

So a fifth row of `(1, 0, 0, 0)` would make every pixel as red as it
could possibly be.

This is what we're going to exploit here. You see all these values
accept negative multipliers, so we can lower colors down instead of
raising them up!
The key idea is using color matrix filters
https://www.byond.com/docs/ref/#/{notes}/filters/color to chain these
operations together.

Pulling alllll the way back, we want to brighten darkness without
affecting brighter colors.
Lower rgb values are darker, higher ones are brighter. This relationship
isn't really linear because of suffering reasons, but it's good enough
for this.
Let's try chaining some matrixes on the lighting plane, which is bright
where fullbright, and dark where dark.

Take a list like this

```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     -0.2, -0.2, -0.2, 0
)
```
That would darken the lighting a bit, but negative values will get
rounded to 0
A subsequent raising by the same amount
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0.2, 0.2, 0.2, 0
)
```
Will essentially threshold our brightness at that value.
This ensures we aren't washing out colors when we make things brighter,
while leaving higher values unaffected since they basically just had a
constant subtracted and then readded.

### But wait, there's more

You may have noticed, we gain access to individual color components
here.
This means not only can we darken and lighten by thresholds, we can
COLOR those thresholds.
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0.1, 0.2, 0.1, 0
)
```
Something like the above, if applied with its inverse, would tint the
darkness green.
The delta between the different scalars will determine how vivid the
color is, and the actual value will impact the brightness.

Something that's always bothered me about nightvision is it's just
greyscale for the most part, there isn't any color to it.
There was an old idea of coloring the game plane to match their lenses,
but if you've ever played with the colorblind quirk you know that gets
headachey really fast.
So instead of that, lets color just the darkness that these glasses
produce.
It provides some reminder that you're wearing them, instead of just
being something you forget about while playing, and provides a reason to
use flashlights and such since they can give you a clearer, less tinted
view of things while retaining the ability to look around things.

I've so far applied this pattern to JUST headwear for humans (also those
mining wisps)
I'm planning on furthering it to mobs that use nightvision, but I wanted
to get this up cause I don't wanna pr it the day before the freeze.

Mesons are green, sec night vision is red, thermals orange, etc.

I think the effect this gives is really really nice. 
I've tuned most things to work for the station, though mesons works for
lavaland for obvious reasons.

I've tuned things significantly darker then we have them set currently,
since I really hate flat lighting and this system suffers when
interacting with it.

My goal with these is to give you a rough idea of what's around you,
without a good eye for detail.
That's the difference between say, mesons, and night vision. One helps
you see outlines, the other gives you detail and prevents missing
someone in the darkness.

It's hard to balance this precisely because of different colored
backgrounds (looking at you icebox)
More can be done on this front in future but I'm quite happy with things
as of now

### **EDIT**

I have since expanded to all uses of nightvision, coloring most all of
them.

Along the way I turned some toggleable nightvision into just one level. 
Fullbright sucks, and I'd rather just have one "good" value.

I've kept it for a few cases, mostly eyes you rip out of mobs.
Impacted mobs are nightmares, aliens, zombies, revenants, states and
sort of stands.

I've done a pass on all mobs and items that impact nightvision and added
what I thought was the right level of color to them. This includes stuff
like blobs and shuttle control consoles
As with glasses much of this was around reducing vision, though I kept
it stronger here, since many of these mobs rely on it for engaging with
the game

<details>
<summary>
Technical Changes
</summary>

#### Adds filter proc (the ones that act like templates) support to
filter transitions.
Found this when testing this pr, seemed silly.

#### Makes our emissive mask mask all light instead
This avoids dumbass overlay lighting lighting up wallmounts.
We switch modes if some turfflags are set, to accomplish the same thing
with more overhead, and support showing things through the darkness.

Also fixes a bug where you'd only get one fullscreen object per mob, so
opening and closing a submap would take it away

Also also fixes the lighting backdrop not actually spanning the screen. 
It doesn't actually do anything anymore because of the fullscreen light
we have, but just in case that's unsued.
Needs cleanup in future.

#### Moves openspace to its own plane that doesn't draw, maxing its
color with a sprite

This is to support the above
We relay this plane to lighting mask so openspace can like, have
lighting

#### Changes our definition of nightvision to the light cutoff of night
vision goggles and such
Side affect of removing see_in_dark. This logic is a bit weak atm, needs
some work.

#### Removes the nightvision spell
It's a dupe of the nightvision action button, and newly redundant since
I've removed all uses of it

#### Cleans up existing plane master critical defines, ensures
trasnparent won't render

These sucked
Also transparent stuff should never render, if it does you'll get white
blobs which suck

</details>

## Why It's Good For The Game

Videos! (Github doesn't like using a summary here I'm sorry)
<details>

Demonstration of ghost lighting, and color


https://user-images.githubusercontent.com/58055496/215693983-99e00f9e-7214-4cf4-a76a-6e669a8a1103.mp4

Engi-glass mesons and walking in maint (Potentially overtuned, yellow is
hard)


https://user-images.githubusercontent.com/58055496/215695978-26e7dc45-28aa-4285-ae95-62ea3d79860f.mp4

Diagnostic nightvision goggles and see_in_dark not hiding emissives


https://user-images.githubusercontent.com/58055496/215692233-115b4094-1099-4393-9e94-db2088d834f3.mp4

Sec nightvision (I just think it looks neat)


https://user-images.githubusercontent.com/58055496/215692269-bc08335e-0223-49c3-9faf-d2d7b22fe2d2.mp4

Medical nightvision goggles and other colors


https://user-images.githubusercontent.com/58055496/215692286-0ba3de6a-b1d5-4aed-a6eb-c32794ea45da.mp4

Miner mesons and mobs hiding in lavaland (This is basically the darkest
possible environment)


https://user-images.githubusercontent.com/58055496/215696327-26958b69-0e1c-4412-9298-4e9e68b3df68.mp4

Thermal goggles and coloring displayed mobs


https://user-images.githubusercontent.com/58055496/215692710-d2b101f3-7922-498c-918c-9b528d181430.mp4

</details>

I think it's pretty, and see_in_dark sucks butt.

## 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. -->

🆑
add: The darkness that glasses and hud goggles that impact your
nightvision (think mesons, nightvision goggles, etc) lighten is now
tinted to match the glasses. S pretty IMO, and hopefully it helps with
forgetting you're wearing X.
balance: Nightvision is darker. I think bright looks bad, and things
like mesons do way too much
balance: Mesons (and mobs in general) no longer have a static distance
you can see stuff in the dark. If a tile is lit, you can now see it.
fix: Nightvision no longer dims colored lights, instead simply
thresholding off bits of darkness that are dimmer then some level.
/🆑
2023-02-17 18:10:39 -07:00
Jacquerel
cbbf7b3613 Basic Mob Spiders III: Sgt. Araneus is no longer a bat (#73350)
## About The Pull Request

This PR converts giant spiders into basic mobs and resultingly fixes
#37793
They _should_ have the same behaviour as their simple mob versions
although I can't verify that their movement speeds are _exactly_ the
same. It should at least be pretty close.
A quirk of spiders is that they had a pretty large `move_to_delay` which
made them slow in the hands of AI (because it would just pause for ages
between taking steps) and faster in the hands of players, and they often
appear in both forms so I had to implement this as a speed modifier
based on player control.

Additionally this is the first basic mob which can be set on fire.
This is currently implemented as a var on `mob/living/basic` but I know
there was some annoyance at adding the environment tolerances as vars on
there so if desired I can try and extract it out, I'm just not sure how
easy it will be.

Something else I noticed is that spiders seem to take stamina damage
from bug spray... but stamina damage does nothing to either simple _or_
basic mobs. I have left it in for now in case I am missing something,
and rebalancing it to do something else would be more like a balance
change.

Oh also I killed the `mob/basic/retaliate` folder because that isn't a
classification that needs to exist or makes sense.

## Why It's Good For The Game

We don't want to use simple mobs any more.
Sergeant Araneus can finally actually be a spider, instead of being a
bat.

## Changelog

🆑
refactor: Spider code has been refactored and AI-controlled spiders may
have slightly different movement or reaction times.
fix: Basic mobs can now be slowed when they take stamina damage, however
currently only spiders actually _can_ take stamina damage.
fix: Spiders should now more reliably disable their AI when controlled
by a player.
fix: Araneus is no longer considered to be a bat and so cannot fly.
fix: Araneus is no longer considered to be a bat and so is no longer
frightening to people who are scared of the supernatural.
/🆑
2023-02-13 05:22:26 +00:00
lizardqueenlexi
9750f93693 Makes arms regrown by the Rod of Asclepius the correct color (#73152)
## About The Pull Request

When an arm holding an activated Rod of Asclepius is cut off, the arm
grows back with the rod held in it. However, due to an oversight, the
arm that grows back is always the "default" color - the albino skintone
for humans/felinids, and grey for everyone else. This PR makes the
regenerated arm have the proper skintone instead.
## Why It's Good For The Game

There's no good reason that a magical doctoring rod should drain all
color from your arm, probably.
## Changelog
🆑
fix: Corrected the skintone on arms grown back by the Rod of Asclepius
/🆑
2023-02-04 12:40:51 +01:00
John Willard
c097f167b1 Completely removes do_mob and do_after_mob (#73117)
## About The Pull Request

This is a remake of #70242

Replaces all instances of ``do_mob`` and ``do_after_mob`` with
``do_after``.

## Why It's Good For The Game

All 3 of these are just copy pastes of eachother but some miss some
features (like do_after not checking for target loc change, which helps
towards fixing https://github.com/tgstation/tgstation/issues/66874
though it doesn't because mechs are setting ``do_after`` on the mob in
the mech) and signals only being used on ``do_after``.

## Changelog

🆑
fix: Mechs should now cancel out of drilling when they move.
/🆑
2023-02-02 21:17:20 +00:00
Bloop
0d3c71aeb2 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
/🆑
2023-02-01 17:23:46 +01:00
GoldenAlpharex
d0aba2412e Being wet no longer causes you to be EXTRA flammable (#72843)
Being wet no longer causes you to be even more flammable, and instead
properly lets you dry up instead of catching on fire even faster when
receiving fire stacks.

What caused this was that there was some double-negatives happening,
which meant that both fire and wet stacks would be increased together
when both were present at once, rather than both being reduced and one
of the two cancelling out the other.
2023-01-22 21:31:35 +00:00
Rhials
66b7310039 STAY IN THE LIGHT: Adds terrify Nightmare spell, terrified status effect, and a reason to mind the shadows (#72282)
Adds the Terrify spell, and its associated status effect, Terrified.
This new spell is given to antagonist nightmares, as a part of their
brain. The spell only works in those surrounded by darkness, and will
apply the Terrified status effect if successful. Upon being Terrified,
victims will passively gain **Terror Buildup** if they remain in the
dark. As buildup increases, so do the negative effects, including tunnel
vision, panic attacks, dizziness, and more.

There are two primary methods for mitigating terror buildup. The first
is moving into the light, which will reverse the passive terror buildup
and eventually make it go away. The other method is by getting a hug
from a friendly hand, which will reduce buildup significantly.

Getting a hug from an UNfriendly hand (a nightmare, for instance) will
cause the victim to freak out and be briefly knocked down. This can be
spammed on targets who are caught alone in the dark, keeping them in an
unfavorable position (sideways) and adding to the victim's terror
buildup considerably. Escape into the light as soon as possible, or
you'll be pushed to MAXIMUM TERROR BUILDUP.

To what end? Heart failure. Past the soft terror cap (which limits how
much passively generated terror you can make) exists the hard terror
cap. Bypassing that threshold will cause a stress induced heart attack
and knock you unconscious (embarrassing!)
2023-01-17 00:07:54 +00:00
MrMelbert
c3a1f21c1a Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind (#72267)
## About The Pull Request

- Nearsighted is now a grouped status effect.
- Blindness is now a grouped status effect.
   - Eye handling of blindness has improved. 
- When eyes are removed, they now cause you to become blind, rather than
handling it in `update_tint`.
- Being ahealed no longer blinds you for one tick, meaning that black
overlay on aheal is gone.
- Temporary Blindness is now a status effect.
- Both Nearsightedness and Blindness have been exorcised from mob vars
and life chains. This means that we've finally cut 2 procs from life,
`handle_status_effect` and `handle_traits`, and moved both to event
based processing. Wooo optimizations.
- Swapped pacifism status effect to use apply and set helpers. 
- Removed an unused admin toggle that disabled welding helmet tint but
also tint from every clothing item and also blindness from losing your
eyes.
- Clothes now generally all blind their mob more consistently.
- Oculine, eye surgery, and sensory restoration are now no longer the
only way to fix blindness from eye damage. If your eyes are healed
through any other means, it will also heal your blindness.
- Some things that made you blind, such as ling blind sting, no longer
just flat made you blind from eye damage forever. They now cause eye
damage directly, which in turn makes you blind from eye damage, as
expected.
- Pacifists can't eyestab anymore. Eyestabs now have a limit on the
amount of blur applied.
- Refactored some `is_x_covered` procs to accept flags rather than have
a lot of arguments for some silly reason.
- Unit tests for blindness. 

## Why It's Good For The Game

Blindness was exceptionally poorly handled prior, primarily due to the
fact that it was tied to the mob instead of separated out

On top of that the system put a LOT of faith in proper handling of
blindness on the coder's end which was misplaced evidently. Many places
didn't update or handle blindness correctly, or just let people
perma-blind.

Deferring it to a status effect improves this a lot

## Changelog

🆑 Melbert
refactor: Refactored blindness and nearsightedness. Important to note is
that all mobs are naturally blind until their eyes are actually created.
refactor: Refactored "is covered" procs
fix: Less sources of blindness now cause permanent blindness. Includes
the "Blind" Spell and "Blind Sting" from changelings.
admin: Ahealing someone no longer flashes the blind overlay for 1 tick.
admin: I removed an unused (sort of) inaccessible admin verb that
allowed you to toggle the tint from all welding helmets (and clothing)
(and lack of eyes) in existence, let me know if you want similar back
balance: Changeling "Blind Sting" now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Visionloss virus symptom now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Oculine has been reworked slightly. Prior, Oculine arbitrarily
healed blindness and nearsightedness from eye damage reagrdless of how
damaged the eyes were, and applied blur on success. Now, Oculine just
heals eye damage, and blindness / nearsightedness is restored in the
process. There is now a probability every tick that eye blur is applied
based on how pure the oculine is while healing very damaged eyes.
balance: Pacifists can no longer eyestab.
balance: Any clothing item that covers your eyes contributes to getting
the bonus while sleeping, and to removing temporary blindness faster
/🆑
2023-01-15 23:01:40 -08:00
ShizCalev
61bbafec0a Fixes scientists & the RD not being able to reach the Ballmer peak. (#72687)
🆑 ShizCalev
fix: Drunk scientists & the RDs rejoice! You can now reach the Ballmer
peak!
admin: Fixed a bunch of liver traits not being assignable.
/🆑
2023-01-14 18:00:01 +01:00
MrMelbert
148e8cc180 Fixes a neck slice runtime (#72582)
## About The Pull Request

The neck slice status effect didn't remove or react properly in tick,
and kept going after deleting itself. Adds some returns. Also adds an
examine message since i'm here.

## Why It's Good For The Game

Less runtime

## Changelog

🆑 Melbert
fix: Fixed a runtime from neck slices on headless mobs. 
qol: Neck sliced folk now have an examine message saying as much. 
/🆑
2023-01-13 14:32:50 -08:00
MrMelbert
acb96fee1d Refactors memories to be less painful to add and apply, moves memory detail / text to memory subtypes. Adds some new memories to demonstrate. (#72110)
## About The Pull Request

So, a huge issue with memories and - what I personally believe is the
reason why not many have been added since their inception is - they're
very annoying to add!

Normally, adding subtypes of stuff like traumas or hallucinations are as
easy as doing just that, adding a subtype.

But memories used this factory argument passing method combined with
holding all their strings in a JSON file which made it just frustrating
to add, debug, or just mess with.

It also made it much harder to organize new memories keep it clean for
stuff like downstreams.

So I refactored it. Memories are now handled on a subtype by subtype
basis, instead of all memories being a `/datum/memory`.

Any variety of arguments can be passed into memories like addcomponent
(KWARGS) so each subtype can have their own `new` parameters.

This makes it much much easier to add a new memory. All you need to do
is make your subtype and add it somewhere. Don't need to mess with jsons
or defines or anything.

To demonstrate this, I added a few memories. Some existing memories had
their story values tweak to compensate.

## Why It's Good For The Game

Makes it way simpler to add new memories. Maybe we'll get some more fun
ones now?

## Changelog

🆑 Melbert
add: Roundstart captains will now memorize the code to the spare ID
safe.
add: Traitors will now memorize the location and code to their uplink.
add: Heads of staff winning a revolution will now get a memory of their
success.
add: Heads of staff and head revolutionaries who lose their respective
sides of the revolution also get a memory of their failure.
add: Completing a ritual of knowledge as a heretic grants you a quality
memory.
add: Successfully defusing a bomb now grants you a cool memory. Failing
it will also grant you a memory, though you will likely not be alive to
see it.
add: Planting bombs now increase their memory quality depending on how
cool the bomb is.
refactor: Memories have been refactored to be much easier to add.
/🆑
2023-01-03 11:23:31 -08:00
MrMelbert
0d4b56435b Converts drowsy and eye blur to status effects, striking yet another two carbon level status vars (#71950)
## About The Pull Request

You know the deal by now.

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

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

## Why It's Good For The Game

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

## Changelog

🆑 Melbert
refactor: Drowsiness and Blurred Eyes are now tracked via status effect.
/🆑
2022-12-26 19:58:21 +01:00
GoldenAlpharex
00e7d5d746 *hand, or That /One/ Emote You Always Felt Was Missing (#71600)
## About The Pull Request
It's happened to me _repeatedly_ that I'd see someone down on the floor,
and wanted to just, give them a hand, so they could take it and get up
that way, without just, directly clicking on them, since that's a little
bland. I've also wanted to just, offer my hand to someone so they could
grab it, so that I could pull them alongside me, rather than just
targeting one of their arms and ctrl-clicking them.

I've had this idea for a _long_ time, and only just decided to do this
today.

Now, I know what you might say. "Golden, that's a lot of code for
something this simple!" You're not wrong. _However_. I decided to go
along and to give some more love to the `/datum/status_effect/offering`
status effect and the offering-related alerts, to make them a lot more
versatile and a lot less hardcoded. Hence the whole "refactoring" part
of this.

Of course, when I add something, I don't do it half-way. So, the way the
emote works is much like the `*slap` emote, except that:

- When you click on someone, it does the exact same as if you were
offering the item to them, except that it's targeted (much like
ctrl-shift-click).
- If there's nobody directly adjacent to you, it won't do anything.
- If there's at least one person lying down around you, you will offer
them your help to get up. Should they take your hand and let you help
them up, you will both receive a simple memory about being helped up (or
helping up), as well as a 45-seconds-long small mood buff, because it
feels nice to be on either end of such a friendly gesture. If they get
up, they automatically get disqualified from being offered some help
standing up, and likewise, if you lie down, that offer goes away as
well.
- If there's at least one person around you, you will instead extend
your hand in their direction, for them to grab onto it. Should they do
so, you will then grab them by their arms and pull them.

I reworked the offering status effect to no longer have a hardcoded
`can_hold_items()` check, so that kisses and the hand offering would no
longer need you to have free hands to complete. The logic here is that
you can still pull someone even with both hands filled, so I figured I'd
leave it this way.

Note: If anyone would like to give the item a better sprite, by all
means, go ahead, that'd be amazing. I'm just not really a great spriter
and couldn't be bothered to waste hours making a very _meh_ hand.

## Why It's Good For The Game
It's fluff, and nice fluff at that. It makes it easier for people to be
nice to one-another without having to necessarily spend so long writing
up an emote that the person on the floor will already have gotten back
up. I'm sure the MRP folks will like it, and I'm certain the HRP
downstreams will love it too ;)

## Changelog

🆑
add: Added the *hand emote, which you can offer to someone standing up
in order to give them the possibility to grab onto your hand and let you
drag them away, or to someone lying down to help them back up, which
always makes everyone involved a little happier!
refactor: De-hardcoded and genericized a lot of the offering status
effect and alert code, to make it require a lot less copy-paste to
handle new cases.
fix: Offering a kiss no longer requires the receiver to have free hands
to accept said kiss!
/🆑
2022-12-17 20:30:14 -08:00
Dani Glore
a847f0970c Fix: Robotic Damage / Reagents Refactor (#71937)
## About The Pull Request
This PR is a continuing refactor of and fixes bugs introduced by my
prior PR #71864


![when-you-finish-fixing-something-and-it-no-longer-works](https://cdn.discordapp.com/attachments/752427120365404172/1052037482771906640/Attachment.jpg)

Due to many functions in reagents having been implemented on top of
prior buggy code, their new behaviors are not as expected in-game, and
as a result reagents damage/heal robotic/cybernetic bodyparts/organs
when not appropriate; bugs like healing robotic arms with Libital is
currently possible.

To fix the errant behaviors in the newly debugged code, I have added
three variables to `datum/reagent` which are used throughout reagent
code, mainly inside of `on_mob_life` etc:

- `affected_bodytype = BODYTYPE_ORGANIC` - Used if the reagent
damages/heals bodyparts (Brute/Fire) of an affected mob.
- `affected_biotype = MOB_ORGANIC` - Used if the reagent damages/heals
generic damage (Toxin/Oxygen) of an affected mob.
- `affected_organtype = ORGAN_ORGANIC` - Used if the reagent
damages/heals organ damage of an affected mob.

The diff is large, and I have refactored the readability/maintainability
around the sections of code I was modifying. At one point I chose to
perform a quality pass on reagents because I found it quite hard to
maintain reagents code in its current state. This PR also replaces many
single-letter variables with more descriptive and readable variable
names. I also found and fixed a stray tab which was located in the
flavortext of `proc/item_heal_robotic`

## Why It's Good For The Game

Due to an old bug being fixed recently by PR #71864 a lot of
healing/damaging reagents now have an effect on robotic bodyparts. This
PR corrects the issue and changes reagents to explicitly define the body
type, bio type, and organ type which they can affect with
helaing/damage. This PR replaces a lot of single-letter variable names
with more descriptive names. I also fixed a small typo in
`item_heal_robotic` which was inserting an extra tab.

## Changelog
🆑
fix: Fixed a stray-tab typo in "item_heal_robotic"
fix: Fixed reagents and other effects which were inappropriately
affecting robotic limbs.
code: Refactored all of reagents code to be more readable and
maintainable.
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2022-12-13 20:31:03 +00:00
Salex08
e463890361 Sleeping status now considers being deaf (#71879)
A bug in the sleeping status effect made it impossible to adjust the
healing threshold with wearing earmuffs or being deaf alltogether, this
PR fixes that issue
2022-12-10 16:03:27 -06:00
Tim
48e36ef2c7 Saycode refactor, unit tests, and fixes (#69799)
<!-- 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! -->

Fixes #69798
Fixes #71621

When using hypnosis on a victim, the language should be accounted for
and whether the victim can properly hear it. Before the hearing code
would magically translate any message, this is no longer the case.

This also fixes the language barrier involving hearing for:
- Mind echo trauma
- Phobia trauma
- Hypnotic trigger trauma
- Split Personality brainwashing trauma
- Codeword hearing
- Hypnotize status effect
- Impure Inacusiate reagent

## Why It's Good For The Game

<!-- 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. -->

Better consistency, improved readability, and less bugs in the future.

## 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. -->

🆑
fix: Fix hypnosis, mind echo trauma, phobia trauma, hypnotic trigger
trauma, split personality brainwashing trauma, codeword hearing, and
impure inacusiate reagent all bypassing language and hearing checks. If
you try to give commands to a victim in a language they don't
understand, they will no longer magically understand the words.
fix: Fix sign language having accent modifications
refactor: Refactored saycode to be more robust, readable, and have more
unit tests.
/🆑

<!-- 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. -->

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-09 20:28:17 +01:00
Fikou
6d1dc8dd26 fixes linters (#71814) 2022-12-07 22:27:45 +00:00
itseasytosee
478a969cbb Delimbs Stamina (#71663)
## About The Pull Request
This changes stamina damage from a damage that affects limbs (like brute
and burn) to a damage that affects the body at whole (such as tox or
oxy)
Stamina being run like brute or burn is rooted all the way back to when
it was halloss, and used exclusively for holodeck items and
hallucinations.
Most coders probably didn't even know that stamina worked like this, and
most implimentatiosn of stmaina mechanics use a generic "adjust stamina"
or a "apply_damage(type = stamina zone - body_zone_chest)" to avoid the
issues that come when stamina is evenly distributed among limbs (and
some limbs only count as a fraction to stamina damage total)

The only thing that is truly lost here, is disabling limbs (arms and
legs) with stamina damage, by aiming specifically at them with disablers
(batons always apply their stamina damage to the chest, no matter where
they hit) our through smashing limbs on tables.
The idea of making an opponent drop a weapon out of pain is fun, but
stamina doesn't support it, or make sense in context.

A depth filled limb-based pain system that has interactions with
painkillers and replaces damage based move slowdown would be fun, and
maybe something that could be implemented in the future.
## Why It's Good For The Game
The biggest draw here, is that it will make stamina easier to maintain 
## Changelog
🆑 itseasytosee
code: Stamina no longer affects individual limbs. 
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-12-08 10:20:57 +13:00
Rhials
bf1b85ca78 Adds nest sustenance status effect, halves xenomorph nest escape time (#71691)
## About The Pull Request

Hosts who are buckled to a xenomorph nests will gestate their xenomorph
egg 20% faster (4 minutes in a nest, 5 without) as long as they are
trapped. To keep them alive in the nest, they will recieve temperature
stabilization and be healed until they are pulled (or break) free.

To ensure the gift of life is not wasted by captured humans, they can
now break free from resin nests after one minute of struggling, down
from two.
## Why It's Good For The Game

There's currently no incentive to not kill facehugger infectees
immediately after they're impregnated. Dead bodies can't run away,
gestate at the same speed, and hives are often breached from space
making them deadly to live captures regardless. This serves the dual
purpose of incentivizing live captures, while also making them a
feasible option, without removing the ability to infect dead bodies and
seriously impacting the xenomorph playstyle.

Cutting the escape timer in half (while also ensuring that captured
humans are alive enough to break out) means there will be many more
opportunities for live captures to escape. Additionally, the xeno
players will have to spare manpower to actively defend hosts and if they
wish to ensure they do not escape. Hopefully it should give more reason
to play defensively and set up a proper hive, instead of the
hypermobile-hyperviolent playstyle you sometimes encounter.
## Changelog
🆑 Rhials
balance: Xenomorph nests will now sustain humans that are buckled to
them, and gestate xenomorph eggs slightly faster.
balance: Xenomorph nests evolved healing capabilities in exchange for
some of their grip. They now take only one minute to escape from.
/🆑
2022-12-06 21:19:37 -08:00
Rhials
8b373aef89 Fixes unconciousness (typo) (#71648)
## About The Pull Request

Made a typo while doing a github search, but it still gave me results.
This removes the "unconcious" typo from a few different places,
including code comments, tgui interfaces, descriptions, etc.
## Why It's Good For The Game

Good spellign
## Changelog
🆑
spellcheck: removes a bunch of instances of "unconcious" from the code.
/🆑
2022-12-02 18:35:25 -08:00