Commit Graph

2105 Commits

Author SHA1 Message Date
SyncIt21
ecf99a90e5 [NO GBP]Fixes plumbing for good(hopefully) & more reagent code (#78947)
## About The Pull Request
1. This should be the end of all problems related to plumbing and I
swear if another issue popes up I'm goanna delete my GitHub account. Or
to be more realistic just ping me and I'll be back :D

   - Fixes #78945
  
And this time I am **100%**(if I'm wrong then fuck me) sure that
reagents will not flow in excess amounts into reaction
chambers/synthesizers or whatever plumbing component you can think off.
    
Reagents flowing in excess amounts is what caused the factory to grind
to a halt as the components will stop processing if they detect excess
amounts of reagents (which is why plunging them with a plunger would
clear them of their reagents and help them resume processing again which
obviously is not an ideal solution)
    
Also, now it's no longer required to see reagent volumes in 4 decimal
places so I rounded it back to just 2 places again so values like 0.999
or 1.001 will become just 1 again.
    
Also plumbing reaction chamber was doing too much work so I fixed that.

2. Made defines for min & max ph. any change to ph values of any reagent
will be confined between these values i.e., 0 & 14. Also converted some
vars into defines. Using a variable makes sense if it's value changes
but if it doesn't then just define it as a constant so you can save
memory. Made synthesizer lists static to further save memory.

3. Significantly boosted the ph balancing mechanism for reaction
chamber. You will be surprised.

## Changelog
🆑
fix: plumbing setups should(hopefully) no longer grind to a halt nor
will overflow with excess volume of reagents.
code: created defines for min & max ph. Improved some reaction_reagent
code. Made synthesizer dispensable reagent list values static to save
memory.
refactor: ph balancing mechanism for reaction chamber is significantly
improved. Optimized it's code overall
refactor: examining each individual reagent will display their results
back to 2 decimal places again and not 4 for easy readability.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-10-15 18:26:51 +00:00
Jacquerel
cf5c1fa08c Basic Space Dragon (#78979) 2023-10-14 15:53:28 -07:00
Jacquerel
eb28d04f08 Watcher Nest Lavaland Ruin (#78790)
## About The Pull Request

Adds a small new lavaland ruin, the Watchers' Grave.


![image](https://github.com/tgstation/tgstation/assets/7483112/9c3fa6f0-3e7d-4540-8646-5229eb11445b)

![image](https://github.com/tgstation/tgstation/assets/7483112/93bc14f0-9a0c-40d3-bd30-cc79a0d85752)

You will need to figure out yourself how to find a way through the walls
surrounding it (it's not very hard).
This is mostly just atmospheric but also serves as a delivery vehicle
for a unique item; an orphaned Watcher egg.
(That's kind of it in terms of loot, unless you count a handful of
lavaland mob corpses and mushrooms).

You can either eat this (it's an egg), throw it at someone to spawn an
angry watcher, or keep hold of it for a while and see what happens.

<details>


![dreamseeker_cMNnZXjfgL](https://github.com/tgstation/tgstation/assets/7483112/841db8fc-19ac-431f-aa66-c9ec5fbedbc3)

That's right it's your very own baby watcher.
It orbits your head and shoots at lavaland creatures for unimpressive
damage. It won't ever intentionally shoot a player but they might walk
in front of it, as it doesn't hurt very much they will probably forgive
you.
If you die it will continue circling your corpse to guard it against
predation.
</details>

In creating this ruin I also added a new component called "corpse
description".
It provides some extra examine text to a corpse which is removed
permanently if the mob is revived.
There's a field you can varedit on corpse spawners (or make a subtype)
which will automatically apply it to spawned corpses.
You can use it for environmental storytelling. Or admins can use it to
make fun of how you died.

Also I fixed basic mobs runtiming when examined by ghosts.

## Why It's Good For The Game

More variety in map generation. It's cute.
Adds a tool that mappers might like.

## Changelog

🆑
add: Adds a new lavaland ruin where you can find a unique egg.
/🆑
2023-10-11 17:00:22 -06:00
Jacquerel
504e6acfa3 Basic Mob Gorillas (#78918)
## About The Pull Request

Now we can make basic mobs with hands easily so I did, they don't
actually use their hands for anything with AI.
In the future we can come back and share the monkey AI where they pick
up items to hit people with, but frankly few weapons are more deadly
than a gorilla's fists.

IIRC I didn't really change their behaviour much, this is mostly just a
straight conversion. Main difference is that they will prioritise eating
nearby bananas and fruit salads over punching people.

When I make these conversions nowadays I need to decide between "does
this attack at the speed that it did as an NPC mob or the speed it did
as a player?"
I am arbitrarily deciding that gorillas are usually not players and
electing for the former, but tell me if you disagree.

I also made "show basic inhand sprites" into a component shared by
Gorillas, Drones, and Dextrous Guardians (all also now available to
become basic, once I get around to it),

And I added an AI behaviour to run a basic emote. This is similar but
different to "random speech", which kind of sucks and needs rewriting
anyway.
Gorillas don't speak, only ooga.

## Why It's Good For The Game

https://www.youtube.com/watch?v=npuuTBlEb1U

## Changelog

🆑
refactor: Gorillas now use the basic mob framework. Please report any
unusual side effects.
/🆑
2023-10-11 16:58:29 -06:00
SyncIt21
eb0be123aa [NO GBP] Some more code maintenance for reagents (#78884) 2023-10-11 15:11:23 -04:00
ViktorKoL
13a1cd6d9d Adds several new sound effects for the blood cult (#78714)
## About The Pull Request

A remake of this: https://github.com/tgstation/tgstation/pull/64770.
Adds a new sound effect for when the cult gains its red eyes, for when
their halos appear, and a global sound effect for when the cult begins
to draw a Nar-Sie rune.



https://github.com/tgstation/tgstation/assets/44502667/f9d478a0-5fc6-4c8c-aa1a-16b7f4e86203



https://github.com/tgstation/tgstation/assets/44502667/4dd40ec6-f501-405d-a8ed-f7214f6a6613



https://github.com/tgstation/tgstation/assets/44502667/6ee8962e-fdbb-41a8-8962-cc19cb0ea1b7


I should probably also note that in the process of folder organization,
I moved the blood cult's old antag gain sound effect and renamed it. I
hope it doesn't cause any issues...
## Why It's Good For The Game

All these occasions do not have a sound effect unique to them yet. I
think they deserve it.
## Changelog
🆑
sound: the blood cult's rise to power is now accompanied by several new
sound effects
/🆑
2023-10-11 00:58:02 -07:00
Ben10Omintrix
0f5d14e68b Mook village and basic mook refactor (#78789)
## About The Pull Request
refactors mooks into basic mooks and re-adds them to the game

## Why It's Good For The Game
this refactors mooks into basic mobs and re adds them to the game. mooks
are now a part of lavaland. they come as a part of a random ruin which
consist of a entire village of friendly mooks. Mooks will aid players
but they will still attack ashwalkers because of some troubled history
between them.

![mookvillage](https://github.com/tgstation/tgstation/assets/138636438/ad1c5d63-c168-475a-a85d-b727dff43e7b)

mooks are a very diseased specie. nanotrasen discovered a small tribe of
mooks and cut a deal with their tribal chief to aid ss13 miners in
exchange for medical supplies.

tribal chief in his decked out home

![tribalchief](https://github.com/tgstation/tgstation/assets/138636438/cc0e0a11-9bf0-4322-b3ae-c7be43092ee8)

male mooks go out and mine and haul ore off back to their village. they
will deposit ores into a stand which is managed by another mook. they
will all return to their village to rest once a lavastorm comes.

![mookstand](https://github.com/tgstation/tgstation/assets/138636438/c7adbf4e-6322-4347-acfc-4e8d45aff798)

players can use this stand to withdraw any ore they like

![mookui](https://github.com/tgstation/tgstation/assets/138636438/a1318be8-50f7-49b2-827c-97bafdb2488a)

female mooks will stay behind in the village to guard it from
ashwalkers. they will also heal male mooks when they come back from a
long day of work. the tribal chief is a bum and chooses not to go out
and mine. he will stay behind in the village and issue commands to his
people rather than work

the village also has its own bard! he follows player visitors and plays
nice music for them while they are in the village (although he is not
very talented).

![mookbard](https://github.com/tgstation/tgstation/assets/138636438/5123e492-6657-4755-9dc7-ab94d4beb554)

he is still a warrior at heart tho so he will be smashing his guitar
over ashwalker skull

![mookshmash](https://github.com/tgstation/tgstation/assets/138636438/bf211bf0-e963-4dbb-b004-e653e06e3974)




## Changelog
🆑
refactor: mooks are now basic mobs. please report any bugs
feature: added mook village to lavaland ruins!
/🆑
2023-10-10 22:41:32 -06:00
lizardqueenlexi
ec4defe598 Basic Constructs: parent type + Harvester (#78807)
## About The Pull Request

I kind of hate cult as a whole, but I like these little guys. Let's
basic-ize them.

This PR begins the process with the harbinger of the Red Harvest, the
Harvester! Their actual capabilities have been changed very little,
except that most of their unique properties have been moved to
components and elements. The basic parent type of constructs has also
been set up to make the next bunch of conversions easier.

- Constructs capable of repair now receive the healing hands component.
Healing hands has been extended, to allow the healing particles to come
in custom colors, and to allow it to print the target's health if the
target is not a carbon.
- Repairing constructs also receive a new element: Structure repair is a
lighter-weight variant on healing hands that allows repairing clicked-on
atoms of specified types.
- Constructs capable of damaging walls, meanwhile, receive the wall
smasher element.

Harvesters in specific have two special elements: 
- The existing "amputating limbs" element, making them instantly rip a
limb off of any carbon they attack. As before, if they attempt this on a
carbon with no arms or legs, the harvester will hear Nar'Sie's call to
bring the victim to her.
- A new "wall walker" element, allowing them to walk through walls of
specified type (cult walls for harvesters) and allowing them to drag any
atom through as well.

Other than laying the groundwork, there's not much else here. I started
with Harvesters specifically because they are only ever
player-controlled, which makes things easy.

I'm not completely happy with the use of healing hands here - it gets
the job done, but currently loses a bit of the previous flavor (a
healing beam as a visual; printing the target's health in cult span). I
may extend it further to allow this behavior.

I've included an UpdatePaths script, even if these things shouldn't be
mapped, just in case something fucky is going on on a downstream. You
never know.
## Why It's Good For The Game

Constructs, currently, occupy _19_ spots on the simple animal list. This
is something close to 10% of all the remaining ones. Also, like
everything to do with cult, construct code is janky, old, and
desperately in need of updating. This is the first step.
## Changelog
🆑
refactor: Harvester constructs have been updated to the basic mob
framework. This should have very little impact on their behavior, but
please report any issues.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-10-10 15:55:09 -06:00
san7890
3415828c6b Refactors Revenants into Basic Mobs (#78782)
## About The Pull Request

I felt bad about taking all the "easy" ones, so let's change it up with
a decently difficult one. Revenants are now basic mobs! This alone
doesn't change much of anything because it pretty much overrode much of
simple_animal code. However we do a few new things.

* Multiple code improvements! No more weird proc names that aren't
`snake_case`, cleaner variable names, more dmdoccing, etc.
* Files are now reorganized, Rather than a 800-line dogshit monofile,
we're all nice now
* Multiple logic improvements, like early returns to make stuff more
readable and the like. many `isnull()` yes
* Instead of abusing key ownership logic, we use `mind.transfer_to()`
instead for much cleaner behavior when we need to change stuff
* Instead of iterating over the entire list of mobs to find dead mobs,
we use a new `revenant_relay()` system that automatically handles
broadcasting revenant messages to all observers and fellow revenants
(like `blob_talk()`)
* Instead of having a weird invisible "corpse", we move the revenant
inside the actual ectoplasm when they die. This drastically simplifies a
lot of wacky code that was completely useless since we still had the mob
to work with, but now it's a lot cleaner when it comes down to it.
* Some more hooks into stuff like `Life()` that might be useful for
other people in the same way this is.
* Less <span> crap, more macros, wahoo
* Uses an `examine_block()` for when we relay instructions to new
revenants. also cache those instructions to save time in the long run
* Revenants being stunned, inhibited, and revealed are now managed by
status effects rather than being chicanery on `Life()`
* Everything should now just in general be a lot nicer to work with.
This list is not exhaustive but a lot of the junk 7-year-old code has
been gutted and replaced with the modern standards.

There are stuff that I explicitly didn't touch and will not be touching
in this PR as it's already rather large.
* Revenant actions. I touched some proc names but I didn't alter the key
ways they work.
* Revenant movement. That's another can of worms.
* Revenant event code. I just made it use the transfer to system to make
a closed loop and that's about it.
* Revenant AI. They don't have any, it's an event/admin spawn. I'm not
adding AI here.
## Why It's Good For The Game

Revenants are more extensible now rather than being a real big
clusterfuck of bullshit, should be much easier to tweak stuff here and
there or logically follow how the code for this fella should go. The
number of weird revenant bugs should go down since we do stuff more
simply- but there could be some sleeper bugs that can bite us.
## Changelog
🆑
refactor: Revenants, the mob that's split between planes of Life and
Death, have been refactored into a basic mob. While this alone shouldn't
touch behavior, a lot of the backend code has been gutted and refactored
to try and furnish a better antagonist experience. This might mean that
some weird stuff can come up and around, report something if it's
utterly broken.
code: In order to better facilitate some code, you do not ghost outside
of a revenant on death, you simply get transferred into the ectoplasm.
You should still be able to speak with your ghost friends on how hard
you got wrecked or if you'll be able to resurrect though.
code: The timing on revenant stuff such as being revealed, stunned, and
inhibited (by holy weapons) should be tweaked a bit to allow better
management. This should mean that getting unstunned and such should be a
bit more precise now.
qol: Revenant instructions are now relayed in a neat little examine
block.
/🆑
2023-10-09 23:15:20 +01:00
GPeckman
a6f52781d5 Warm donk-pockets once again have omnizine in them (#78815)
## About The Pull Request

One of the post-foodening cleanup PRs inadvertently prevented warm
donk-pockets from getting the omnizine they were supposed to have. This
PR fixes it by adding a new argument to the microwaveable and bakeable
elements, which donk-pockets now use. The new argument has also been
added to the grillable element for future use.
## Why It's Good For The Game

Bugs aren't good.
## Changelog
🆑
fix: Warm donk-pockets should now have omnizine in them again.
/🆑
2023-10-08 23:10:35 -06:00
admeeer
5288c7e891 Adds supermatter attackby_hit typecache to deal with similarly-handled objects (#78779)
## About The Pull Request

Adds a typecache for objects that are similarly handled in the
attackby_hit proc

I decided to omit cigarette from the list since it has so much custom
code. I could just check to see if the item is a cigarette, but I don't
think that is very readable.

## Why It's Good For The Game

Makes interaction more efficient, also because a maintainer said so

## Changelog

🆑
code: made an eensy teensie weensie change to some supermatter
boilerplate
/🆑

---------

Co-authored-by: FinancialGoose <92416224+TheBoondock@users.noreply.github.com>
Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
Co-authored-by: orange man <61334995+comfyorange@users.noreply.github.com>
Co-authored-by: Cruix <ianjturk@gmail.com>
Co-authored-by: Cruix <discoveryian2@gmail.com>
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: BluBerry016 <50649185+unit0016@users.noreply.github.com>
Co-authored-by: flopp / Daniel Ast <75865592+RunKittenzRComing@users.noreply.github.com>
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
Co-authored-by: Changelogs <action@github.com>
2023-10-08 19:51:22 -07:00
distributivgesetz
86457e37b8 Supermatter shards can be unfastened with right click (#78617)
## About The Pull Request

Title summarizes all.
Closes #68685 
## Why It's Good For The Game

Less people dusting themselves by accident.
## Changelog
🆑
qol: Supermatter shards can now be fastened with right click too. Now,
just don't forget to use a wrench.
/🆑

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-10-08 08:49:06 +02:00
Ben10Omintrix
032419f30f ice demon basic mobs (#78539)
## About The Pull Request
ice demons are now basic mobs. they still have their behavior where they
can teleport around the player, run away from him and shoot him. they
now also have a new ability they will only use when they are on their
last legs, they will spawn weak and slow afterimage clones of
theirselves to attack the player. damaging these clones will also damage
the original ice demons. ice demons can also now be very easily
countered as they are very afraid of fires. they will run away from you
if they see u holding a lit torch/flare/welding tool and while running
away they will freeze the floors around them to try to slip u to stop u
from chasing them. ice demons now also get a new unique trophy! this
trophy will summon 2 friendly spirits that will help you kill ur target,
but these spirits will dissappear after a very short while.


https://github.com/tgstation/tgstation/assets/138636438/6a48fb15-f447-441a-91c6-48ca120dc22c



## Why It's Good For The Game
## Changelog
🆑
refactor: ice demons have been refactored into basic mbos. please report
any bugs
add: ice demons now have a unique trophy
/🆑
2023-10-08 03:04:35 +01:00
Jacquerel
cfcf905a1c Separates COMSIG_LIVING_ADJUST_DAMAGE into 6 different signals (#78814)
## About The Pull Request

As potato requested after the merge of #78744 these should have separate
concerns even if they are very similar.
In addition I improved how mob chains react to glide size changes, and
swapped PAIs to using these signals instead of an override of
`onBruteLoss` just because I can.

I tested it but the unit tests will catch me if i did it wrong

## Changelog

🆑
fix: Flesh Worms will move smoothly more consistently.
/🆑
2023-10-07 11:44:15 -06:00
san7890
82904b766c Refactors Sloths into Basic Mobs (#78752)
## About The Pull Request

Hey there,

This just refactors sloths to the basic mob framework. Nothing new
should be added beyond them seeming a bit more sluggish and being a bit
smarter about the fights they pick/running away.
## Why It's Good For The Game

Three more subtypes off the list, we are now sub-200 simple animals left
to refactor. If people want to play catch with their sloth it should be
much easier to fit that in now.
## Changelog
🆑
refactor: Sloths are now basic mobs, however their overall sluggish
behavior shouldn't have changed much- let us know if anything is broken.
/🆑
2023-10-07 04:41:00 +01:00
GPeckman
e8365f2a36 The laser carbine, a full-auto sidegrade to the normal laser gun (#78685)
## About The Pull Request

This PR adds the laser carbine, a new fully-automatic laser weapon that
can be ordered from cargo. A crate of 3 can be ordered from cargo for
1800 credits, locked behind armory access. Here is a video
demonstration:


https://github.com/tgstation/tgstation/assets/21979502/6f7fecec-ccb6-4a65-8027-21ab887fb91d

Now, I'm sure people are very concerned about the balance implications
of this new weapon. Let me give you some hard numbers:

The gun deals 10 damage per shot, and has a capacity of 40 shots with a
fully charged cell. This means that it has, at most, 400 damage per
charge, which is exactly the same as a normal laser gun.

In terms of DPS, it can put an unarmored human in crit roughly as fast a
laser gun. It is meant to be a sidegrade, not an upgrade to the normal
laser gun.

It also has considerably lower wound bonus. During testing, when all 40
shots were fired into an unarmored human, it dealt tier 1 burn wounds
with the occasional tier 2. I never observed a single tier 3 burn wound
during any of my tests.

Here's a picture of the different sprites (The last one is animated just
like the normal laser gun):


![laser_carbines](https://github.com/tgstation/tgstation/assets/21979502/75c88c8a-aa8a-481d-994d-86850fcdbb9b)

## Why It's Good For The Game

For a long time, there has been a strong push to make crew-available
weapons almost entirely energy based. This trend has been contentious,
to say the least. Many people prefer ballistic weapons over energy
weapons. After spending some time on a different codebase, one where
autorifles are still completely available to order from cargo, no emag
needed, I think I might know why (or at least part of the reason). Part
of what I find satisfying about some ballistics is the fact that they
fire quickly and automatically. Energy weapons might be more enjoyable
to use if automatic energy weapons are also an option.

## Changelog

🆑
add: The laser carbine, a weak but fully automatic sidegrade to the
normal laser gun, can now be ordered from cargo.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-06 16:45:50 +00:00
necromanceranne
053e66b0d3 Makes the Regal Condor realistically simulate being shot dead with a high caliber hand cannon by making it HITSCAN (#78674)
## About The Pull Request

The Regal Condor come with a magazine and ammo already inside.

The recipe for the magazine now no longer needs TC, but does need donk
pockets (sponsored murder gear, you see) and a hell of a lot more
materials per magazine (you're looking at like 40 sheets of various
materials all up). It also needs you to make the Condor first. But it
comes preloaded with ammo.

The Condor is 1 whole TC more expensive. Also needs some metal. The old
recipe is there in spirit.

The Regal Condor and the magazines come with 10mm Reaper bullets.
They're high damage. They're high AP. They are also hitscan.

## Why It's Good For The Game

Apparently people don't like the Condor. Too much effort for not enough
reward. After all, revolvers exist. 'It must be a joke' they say! 'It's
joke content! I went to all that effort to make it for nothing! That
slut Anne tricked us!'

**Wrong, bitch.**

If you want the Condor to make you shit yourself the moment someone with
it appears on the screen, then fine!

### **You get what you fucking deserve.**

## Changelog
🆑
balance: Despite earlier reports suggesting that the famous lethality of
the Regal Condor was largely a myth, there has been rumors that the gun
has once again started to display its true killing potential on any
station that it 'manifests'.
/🆑
2023-10-06 14:02:10 +01:00
Sealed101
9e4948148d Bad food has bad food reagent again (#78747)
still on break so i didn't think too hard about this one

## About The Pull Request

Prevents food interactions from clearing the resulting food's reagents
if the result is a bad recipe.

Blackbox logging is also iffy here, some of them log it even if the
resulting food is a burned mess, some don't. It's weird!

## Why It's Good For The Game

Fixes #78400
<details><summary>Makes one car moth happy</summary>

![no habla
espanol](https://github.com/tgstation/tgstation/assets/75863639/a3f26acb-3a7c-44a6-a4de-2b67e4d56230)

</details> 
Did you know the appendix has bad_food reagent in it?


699d09ca33/code/modules/surgery/organs/internal/appendix/_appendix.dm (L5-L15)

## Changelog

🆑
fix: fixed bad food not having bad food reagents
/🆑
2023-10-06 13:30:15 +01:00
Tim
d6f79f4427 Refactor gib code to use bitflags and have documentation (#78754)
## About The Pull Request
This takes all the gib related procs:
- `gib()`
- `spawn_gibs()` 
- `spill_organs()`
- `spread_bodyparts()`

And adds heavy documentation that communicates what the procs are used
for and how the different bitflags affect them. The difference is
noticeable:

`gib(TRUE, FALSE, FALSE, null)` vs `gib(DROP_ORGANS|DROP_BODYPARTS)`

The code is now much more legible which is important considering it's
used in a lot of places!

Another robust change, is that we had several places in the code where
there were double negatives like so:

```
/mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts)
	if(!no_bodyparts) // DOUBLE NEGATIVES ARE BAD M'KAY?!?
		// do stuff here
```

This is a mindfuck to untangle. I inverted a lot of these parts so we
don't lose our sanity.

Last thing that was changed was a big `if()` loop in the `spill_organ()`
proc. This was refactored to just be a simple `for` loop with `continue`
statements where we needed to skip enabled bitflags. It's now shorter
and cleaner than before.

The only slight gameplay change this affects is that gibbing a mob now
guarantees to drop all items unless the `DROP_ITEMS` bitflag is
deliberately omitted. Some places like admin gib self, we don't want
this to happen.

## Why It's Good For The Game
Gib code is very old. (~15 years) People kept adding more arguments to
the procs when it should have been a bitflag initially. By doing it this
way, there is more flexibility and readability when it comes to adding
new code in the future.

## Changelog
🆑
refactor: Refactor gib code to be more robust.
qol: Gibbing a mob will result in all items being dropped instead of
getting deleted. There are a few exceptions (like admin gib self) where
this will not take place.
/🆑
2023-10-06 13:12:22 +01:00
GPeckman
5f090aea5e Adds sanity checking to the tippable component (#78771)
## About The Pull Request

The tippable component doesn't actually have any sanity checking for if
the tippable thing has already been tipped. This means that if two
people try to tip something over at the same time, it will appear
untipped but be immobilized as though it were tipped. The sprite will
also stay permanently flipped until the bug is preformed again. Now that
doesn't happen. Closes #64232.
## Why It's Good For The Game

As funny as it is to see upside-down borgs running around, its still a
bug.
## Changelog
🆑
fix: Borgs will no longer become permanently upside-down if tipped over
by multiple people at the same time.
/🆑
2023-10-06 12:40:43 +01:00
Jacquerel
3ed187e86b Basic Mob Flesh Worm (#78744)
## About The Pull Request

Fixes #68614

Converts the Flesh Worm (Armsy) into a Basic Mob.
Most of its behaviour has been moved into a component which we can use
to make arbitrary mobs into linked lists of mobs.
To accomplish this I added a signal which is sent when you call any
`adjustXLoss` proc, let me know if my implementation is "calling the
same signal from several places" by a backdoor, I wanted to avoid
registering to 6 signals but I'll change it if I must.

While I was here I killed the unused "lesser" variant because we stopped
using it. Resultingly, Ascended Armsy doesn't need to distinguish itself
by inflating the sprite, so it doesn't. This means that now flesh worms
are using their sprites as intended to be displayed, but if people
really miss all of its segments being poorly scaled by the byond engine
then I guess I can restore it.

## Why It's Good For The Game


![dreamseeker_p8vOpZGXII](https://github.com/tgstation/tgstation/assets/7483112/3389d3a9-16cd-4e1e-938e-dfa18d0da0af)

## Changelog

🆑
refactor: Flesh Worms are now basic mobs. Please report any unexpected
behaviour.
sprite: Flesh Worms are a little bit slimmer.
/🆑
2023-10-05 13:20:16 -06:00
lizardqueenlexi
6bdf052a84 Converts cursed heart effect into a component. (#78554)
## About The Pull Request

Fixes #58401 
Fixes #58799
Fixes #58800

Converts the manual heart-beating effect of the cursed heart into a
component.

Behavior has mostly been maintained, but polished a bit as compared to
the original cursed heart. Most notably, the action for beating your
heart is now a cooldown action - providing a visual indicator of when
you can beat it again, rather than leaving you guessing. Some better
checks have also been put in place for edge cases such as having your
species changed.

Implementation inspired by the existing "manual blinking" and "manual
breathing" components. Currently only used by the cursed heart and the
(now majorly simplified) effect of corazargh.

My first component, so hopefully I didn't miss anything.
## Why It's Good For The Game

The cursed heart was kind of unusably bad - which may have been part of
the intent, but having to count in your head or spam-click the button is
just annoying. With a visual indicator of when you should beat your
heart, hopefully it will be slightly less awful for the cursed.

The real motivation here was that corazargh's implementation was kind of
a travesty - summoning a cursed heart inside of your body while it was
in your system, then restoring your old heart afterward. This was
error-prone as well as just being ridiculous. Making this effect a
component gets rid of these problems, and leaves space open for new uses
of manual heart beating if anyone feels like being cruel.
## Changelog
🆑
fix: Your heart will no longer be deleted if an admin heals you while
you have corazargh in your system.
refactor: The cursed heart has been streamlined a bit, and now gives you
a visual cooldown for when you can beat your heart again.
/🆑
2023-10-04 00:43:25 +02:00
Jacquerel
c78211835d Basic Mob Raw Prophet (#78733)
## About The Pull Request

Might as well start on these now, should be easy enough.
The Raw Prophet actually comes with a couple of new components.

The `wheel` element is sort of like the `waddling` element in that you
give it to any movable atom to have it move like a raw prophet.

![dreamseeker_3qacWEKYQQ](https://github.com/tgstation/tgstation/assets/7483112/d5e1b0b9-79f7-4272-9c88-a21fee049e5f)
Whee!

The focused attacker component can be attached to any mob or item and
causes it to escalate its damage every time you attack the same target.
I'll be honest I consistently forget that the Raw Prophet does this.

The ones in the Ruin have the blinding gaze attack inherited from
Watchers instead of the point-target Blind spell in order to ensure that
you can actually "dodge" it.
I tried to make it jaunt if it got stuck but ran into too many problems.
Another time.

## Why It's Good For The Game

I do this to relax now.

## Changelog

🆑
refactor: Raw Prophets now use the basic mob framework. Please report
any unusual behaviour.
/🆑
2023-10-03 14:26:50 -06:00
Tim
129d88e9e7 Fix butchered and gibbed mobs to transfer reagents and diseases to meat (#78454)
## About The Pull Request
Fixes #78386
Fixes #60352

Butchering monkey meat or gibbing mobs will now properly transfer all
reagents and diseases to the byproducts.

## Why It's Good For The Game
More realism is nice.

## Changelog
🆑
fix: Fix butchered monkeys to transfer reagents and diseases to meat
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-03 14:08:56 +02:00
Bloop
68b798efa0 A thorough audit of damage procs and specifically their use in on_mob_life() (with unit tests!) (#78657) 2023-10-03 04:01:32 -04:00
Lamb
0b8f4dc9ce adds boxes of bandages, and bandages to go in them (#78406)
## About The Pull Request
have you ever walked into medbay, picked up a suture, and asked yourself
"how do i know how to stitch myself up?"
do you long for the simplicity of a bandage that can be popped on, no
thought required?
well, look no further! now introducing, the DeForest First Aid Bandage!

![image](https://github.com/tgstation/tgstation/assets/110322848/bb737393-0e2b-4773-a673-ab784a409bed)
each box of bandages holds five each, which are all one time use items.
using one heals up to 25 brute damage from a single part of the body.
boxes of bandages will drain much faster than sutures, and are much less
precise for healing specific increments of damage, but heal more in
exchange. they are also worse at stopping blood loss, but not completely
useless for it.

they can be found in a handful of places:
(some) high value medkits
in paramedic's pockets
some medbay lobbies
some cargo holds
all sec infirmaries
in goodies on the cargo console
maint loot
and nanomeds!

i considered making these replace brute kits, but those are used in a
lot of old references, so it felt a bit passe. so i made a new item that
is a bit more balanced, so they can be mapped in and added to vendors
without much worry.
## Why It's Good For The Game
cute item, heals the people who wouldn't really be going into medbay
anyways, and is fairly flavorful. if it's a bit too strong as is i can
tweak the number, but the goal is to not be powerful enough to outshine
sutures, while still offering somewhat effective healing for rough
housing assistants and antags
## Changelog
🆑
add: adds boxes of bandages, a quick healing item
/🆑
2023-10-01 23:54:46 -06:00
Jacquerel
15efbf64a5 Grand Ritual Finale: An end to death (#78497)
## About The Pull Request

Adds a new Wizard Ritual Finale effect which makes everything immortal.
By this I mean, 10 seconds after death a ghostly image of them will
appear somewhere near where the corpse was and then 50 seconds after
that the mob will return to life at that location.
This applies to every mob, everywhere.
This is likely to cause a little bit of disruption to the rest of the
round, so you can only do it after at least 30 minutes have passed.
After that the crew will have to figure out how to deal with their new
gift of immortality. It will involve throwing people into chasms and
lava, probably.


![dreamseeker_7SwMsSrnt1](https://github.com/tgstation/tgstation/assets/7483112/5b794bcc-fcba-46b5-b228-e95aa685942d)
Here's a gif sped up for example purposes.

You can escape from the cycle of death and rebirth via suicide, purely
because it's pointless to try and force people to play the video game if
they don't want to.

Also I split all of these effects into their own files, the only new
code for those is in `immortality.dm`

shout out to Vekter for distracting Oranges while I posted this
wizard-related PR so I didn't get disapprovingly reacted for posting
magic shit (yet)

## Why It's Good For The Game

This might be _too_ much but I want to see what would happen.
It will allow us to simulate whether polite society can survive when
violence has no consequences.

## Changelog

🆑
add: Wizards who complete the grand ritual can now gift everyone with
eternal life
/🆑
2023-09-30 23:34:02 -04:00
Ghom
db8eca7bf3 The fishing portal generator expansion (plus skill-chip) (#78203)
## About The Pull Request
This is a PR I worked on last month, but had to put on hold while
dealing with some pressing issues with fishing feature, minigame and
other stuff, and because I had to atomize out some of the stuff
previously present here.

I've expanded on the fishing portal generator to do something other than
dispense guppies and goldfishes. It now has multiple settings,
unlockable by performing scanning experiments for fish types, available
from the get go, which also reward a meager amount of techweb points
upon completion. The generator can now be built too. No longer it has to
be ordered from cargo.
It can also be emagged for the syndicate setting, tho right now it only
dispenses donkfish and emulsijack, both otherwise impossible to get
outside of... exodrone adventures.

The advanced fishing rod now comes with an experiment handler component,
specific to the fish scanning experiment, that automatically scans
fished content. The node to get it now requires 2000 points and the
first fish scanning exp to be unock.

A new skillchip has been added, which adds a trait that changes the icon
of the fish shown in the minigame UI, giving some clues on what the
reward will be. The same trait is also gained by reaching the master
(penultimate) level of the fishing skill.

A new fish type has been added, with its own quirks. One of these quirks
included temporarily switching movement direction of the bait.
Currently, it can only be fished in the hyperspace and randomizer
setting of the fishing portal.

Screenshots:
![fuck
yea](https://github.com/tgstation/tgstation/assets/42542238/b4c75951-fa07-44ae-99ee-f602adf8a5a4)

![radial](https://github.com/tgstation/tgstation/assets/42542238/68ff21d8-69fd-4ba5-aa58-9976b6e3282f)

## Why It's Good For The Game
The fishing portal generator is but a stale and underdeveloped prototype
of the fishing feature right now, so much I was thinking of removing it
at first. However, we also have a lot of fishes which are pretty much
unfishable, so I came up with the idea of adding new portal settings
that allow people to actually get them.

As for the skillchip and trait, it's but an extra to both the vending
machine in the library and the fishing skill itself, which has an
overall humble impact on the minigame.

## Changelog

🆑
add: Expanded the fishing portal generator. It now comes with several
portal options that can be unlocked by performing fish scanning
experiments, which also award a modest amount of techweb points.
balance: The fishing portal generator is now buildable and no longer
orderable. The board can be printed from cargo, service and science
lathes.
balance: Advanced fishing tech is no longer a BEPIS design. It now
requires the base fish scanning experiment and 2000 points to be
unlocked.
add: The advanced fishing rod now comes with an incorporated
experiscanner specific for fish scanning.
add: Added a new skillchip that may change the icon of the "fish" shown
in the minigame UI to less generic ones. Reaching master level in
fishing also does that.
qol: The experiment handler UI no longer shows unselectable experiments.
/🆑
2023-10-01 04:11:55 +01:00
SyncIt21
0e899b7b1d Fixes runtime when baking foods that don't have reagents. (#78675)
## About The Pull Request
Fixes #78672

Not all baked foods have reagents
![Screenshot
(313)](https://github.com/tgstation/tgstation/assets/110812394/c2b2440a-f94e-42c7-9524-7316714aef2e)

but when it does then we can clear them and transfer reagents from the
original object to the final baked product

## Changelog
🆑
fix: Aloe and other baked foods that don't have reagents can be baked
again without turning to ash
/🆑

---------

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2023-09-30 12:59:49 -04:00
Jacquerel
7d7f55ee53 Heretic Ascension Tweaks (#78472)
## About The Pull Request

Some changes to Cosmic and Knock heretic ascensions, in response to
feedback.

- Cosmic Heretics can no longer control their summon while jaunted. 
- Additionally the death link element the Star Gazer used... wouldn't
work if there was more than one cosmic heretic. I refactored it into a
component, so that it would.

Frankly there are probably a lot of _other_ abilities which shouldn't be
usable while jaunted but are, but I have been burned in the past by
adding defaults which were applied too widely so we'll leave it
case-by-case for now.

- The Knock rift can no longer summon Flesh Worms of any kind.
- But it _can_ summon fire sharks (we really need to reflavour these...)
and any future "basic mob" heretic mobs (or ones which are converted).
- Additionally the rift can't be clicked by ghosts while it's polling
ghosts automatically because that would create funky empty-minded mobs.
- Finally it goes away when the heretic dies.

## Why It's Good For The Game

For Cosmic Heretics, controlling the Star Gazer in conjunction with
Space Jaunt essentially meant that the heretic was playing an RTS as an
invincible observer with an invulnerable unit, now they have to actually
be present and killable in order to sic The Beast on you.

For Knock Heretics, Minor Flesh Worms are a proof of concept which was
never meant to be used except by admins. They're _barely_ weaker than a
normal flesh worm, extraordinarily tanky, delete walls, and generally
devalue the Flesh path ascension.
Vanishing upon heretic death is because every _other_ ascension is at
least theoretically stoppable except this one. Now this one is too.
It's still _very hard_ to kill the heretic because every _10 seconds_
they can transform into a heretic mob which acts as an extra health
pool.

## Changelog

🆑
fix: If two cosmic heretics ascend in the same round, their star gazer
survival will be linked to each individual heretic and not shared by
just one of them.
fix: You can't click the Knock heretic portal to join as a mob while
already signed up to become a mob.
balance: Cosmic heretics can't order the Star Gazer around while
jaunting.
balance: The Knock Heretic portal cannot summon Flesh Worms, but can
summon Fire Sharks.
balance: The Knock Heretic portal will disperse if its creator is
killed.
/🆑
2023-09-29 16:52:19 -04:00
Helg2
bab9db355f Adds on z impact interaction for SM. (#78428)
## About The Pull Request
Adds interaction for supermatter crystal when it falls on
something/someone.
I changed intercept_z_fall line that prevents sm dusting itself from
continue to return because it didn't spin/dust on fall.
## Why It's Good For The Game
Presumably a little bit more chaos.
## Changelog
🆑
add: SM crystal can now dust someone or something if it falls on it.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-29 19:55:36 +01:00
admeeer
d6e8c56941 Fixes getting dusted when you spray paint the SM (#78666)
## About The Pull Request
Hopefully? implemented the correct fix. It _does_ work, but I don't know
if its the best possible fix. Should resolve #78456
## Why It's Good For The Game
Better consistency 
## Changelog
🆑
fix: You can now spray paint the SM without getting dusted
/🆑
2023-09-29 11:44:22 -06:00
MrMelbert
9e1c71f794 Reworks transformation sting to be temporarily in living mobs, forever in dead mobs (#78502)
## About The Pull Request

- Reworks transformation sting. 
- Transformation sting is now temporary, lasting 8 minutes (number not
final) in humans.
      - If used on a monkey, it lasts forever instead. 
- While the target mob is dead or in stasis, the duration will not
progress, making it functionally infinite until revived and taken off
stasis, where it will resume its timer where it left off.
   - Chemical cost reduced to 33
   - DNA cost reduced to 2

- Removes TRAIT_NO_TRANSFORMATION_STING, instead just checks for
TRAIT_NO_DNA_COPY
   - These were essentially the same traits, so I just combined the two

- Organizes some trait lists alphabetically

- Adds TRAIT_STASIS, to allow for reacting to mobs entering and exiting
stasis via COMSIGS
- Everything that checks IS_IN_STASIS now checks HAS_TRAIT TRAIT_STASIS,
which is probably more performant, so that's a bonus.

## Why It's Good For The Game

A lot of people don't like the current iteration of Transformation
Sting, me included

Right now it's only use is for a meme - you make the entire station into
felinids until you get lynched, and that's it.

It's not really a healthy ability for ling's current kit, so this pr
attempts to soft rework it to make it a bit more in line with how ling
should be acting - turning it into a source of short term confusion
between people, or using it on a body to cover your tracks.

This accomplish it two fold - One, it is now cheap enough to use twice
in rapid succession, allowing for quick on-the-spot "BE CONFUSED"
situations while you abscond. Two, as mentioned in the last paragraph,
you can poke a body of someone you murder to obfuscate the crime scene
and maybe help out in taking over someone's identity.

## Changelog

🆑 Melbert
balance: Transformation sting now lasts 8 minutes, down from permanent.
However, the effect is paused for dead and stasis mobs, making it
permanent SO LONG AS they stay dead or in stasis. The effect is also
permanent if used on a monkey.
balance: Transformation sting now costs 33 chemicals, down from 50. 
balance: Transformation sting now costs 2 dna points, down from 3. 
fix: Transformation sting works on monkeys again.
refactor: Refactored a bit of human randomization. 
/🆑
2023-09-28 13:47:39 -06:00
Jacquerel
79ab52c0ed Only drop wall-mounted objects on turf change if it changes into a floor (#78651)
## About The Pull Request

Fixes #78643
It was clearly the intent of this feature to drop stuff onto the ground
when the wall is destroyed.
If we turn a wall into a _different_ wall then there isn't any need to
do this.

If there's some side effect to this that I haven't thought about, I
haven't thought about it.

## Why It's Good For The Game

Dimensional anomalies aren't supposed to destroy lights, fire alarms,
APCs, and air alarms.

## Changelog

🆑
fix: Dimensional Anomalies no longer destroy wall-mounted equipment.
/🆑
2023-09-28 13:42:00 -06:00
san7890
b368687208 Turns Robot Customers into Basic Mobs (#78611) 2023-09-27 21:15:37 -04:00
Jacquerel
f861532d24 Basic Legion & Hivelord (#78624) 2023-09-27 18:41:07 -04:00
Tim
d24cd6e32b Fix altars not allowing items to be sacrificed (#78542)
## About The Pull Request
Fixes #78529
Caused by #78429

They forgot to include the `!` operator when doing an early return for
sacrificial items. Also cleaned up a little bit of the code.

## Why It's Good For The Game
Chaplains can now perform their holy duties properly.

## Changelog
🆑
fix: Fix altars not allowing items to be sacrificed
/🆑
2023-09-27 15:53:58 +01:00
carlarctg
8d57758420 Converts slapcrafting into a component (#78450)
## About The Pull Request

Converts slapcrafting into a component!

The component is added on to an ingredient (presumably the main
ingredient) with a list of recipes attached. If you interact an
ingredient (if no ignredients, a tool) with it, you will start crafting
the recipe. If there's multiple, pick between them with a radial menu.

Opening on draft as there's just a liiiiil bit left to do. The actual
wired rod was left for last.

## Why It's Good For The Game

Slapcrafting is simply better and more accessible and less laggy than
menu crafting. By making it a component we can attach it to things in
which it'd make sense to while stopping unintended weirdness that might
arise from this being global.

Additionally the way examine lets you see crafting recipes opens up
visibility for those, which allows new players to learn about them in a
intuitive manner.

## Changelog

🆑
refactor: Turned slapcrafting into a component! You can examine
compatible items to see what recipes they can be used in, and what the
ingredients for them are. For example, spears and the head-on-spear
crafting recipe.
/🆑
2023-09-27 12:38:10 +01:00
distributivgesetz
5ae576d39f Fixes a callback qdeletion during acid component deletion (#78536)
## About The Pull Request

Title summarizes all.

## Why It's Good For The Game

callback qdel bad runtime good

## Changelog

nothing playerfacing lets be real
2023-09-26 15:29:22 -06:00
Jacquerel
517d33e6f0 Basic blob mobs (#78520)
## About The Pull Request

I remembered today that blob code is ass, especially blob spores.
There's still a lot to improve but I cleaned up _some_ of it by
converting these mobs.
Now they use a newer framework and more signal handling as compared to
circular references.

I _expect_ the behaviour here to largely be the same as it was or
similar. I haven't added anything fancy or new.

This is a reasonably big PR but at least all of the files are small?
Everything here touched every other thing enough that it didnt make
sense to split up sorry.

Other things I did in code:
- Experimented with replacing the `mob/blob` subtype with a component.
Don't know if this is genius or stupid.
- AI subtree which just walks somewhere. We've used this behaviour a lot
but never given it its own subtree.
- Blob Spores and Zombies are two different mobs now instead of being
one mob which just changes every single one of its properties.
- Made a few living defence procs call super, because the only thing
super does was send a signal and we weren't doing that for no reason.
Also added a couple extra signals for intercepts we did not have.

## Changelog

🆑
fix: Blob spores will respond to rallies more reliably (it won't runtime
every time they try and pathfind).
fix: Blobbernaut pain animation overlays should align with the direction
the mob is facing instead of always facing South
refactor: Blob spores, zombies, and blobbernauts now all use the basic
mob framework. They should work the same, but please report any issues.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-09-26 15:28:26 -06:00
GPeckman
3cf748f223 Fixes tackling issues with stun immune tacklers (#78494)
## About The Pull Request

When a human uses gripper gloves and such to perform a tackle, it does
some stuff with knockdowns. First, at the start of the tackle, the
tackler is given 1 or 2 seconds of knockdown. This knockdown bypasses
stun immunity. If the tackle and its rolled to be an expert or monster
tackle, then this initial knockdown is cleared. However, the knockdown
clearing does NOT bypass stun immunity. This ironically meant that stun
immune tacklers would remain knocked down when landing a monster tackle,
and it would cause a runtime because knocked down people can't grab.
This PR just makes the knockdown clear bypass stun immunity as well.
Closes #78441.
2023-09-25 12:49:15 -05:00
MrMelbert
7c2cb68a35 Changelings can now speak through their decoy brain if placed in an MMI (#78342)
## About The Pull Request

- If a changeling's decoy brain is placed in an MMI, they will now be
prompted to speak through it.
- They can speak through the decoy even if incapacitated or dead (or
fake-dead).


https://github.com/tgstation/tgstation/assets/51863163/804bd48a-c4b8-4feb-b021-019ea70e4b8e

## Why It's Good For The Game

The oft-controversial ling MMI test has been brought up time and time
again so I figure I throw my cards in for a solution.

We want as few ways as possible for people to hard and fast discover
whether someone is an antag, especially changling which is supposed to
revel in paranoia. This soft-patches out a big way, the MMI test, in
which you place a ling's brain in an MMI to determine if it's vestigial
and therefore, a ling.

Now the ling player can provide some benefit of the doubt by speaking
through the brain as normal, appearing active while actually in their
body still.

## Changelog

🆑 Melbert
add: Changelings can now speak through their decoy brain if it is placed
in an MMI, to maintain the illusion they are actually dead and have been
debrained.
/🆑
2023-09-24 07:17:23 +00:00
Jacquerel
ad81ca6f4c Allows admins to overrule God (#78429)
## About The Pull Request

Adds a "manage religious sect" verb to the "game" menu of the admin
panel.
It can be used to assign the chaplain's sect if they haven't picked one
yet, or reassign it (to a different one, or to nothing) if they already
have.
This is likely mostly going to be used for ahelps where someone
misclicks or suddenly logs off and wants to be replaced by a different
chaplain with different ideas.

## Why It's Good For The Game

Admins asked me to make it

## Changelog

🆑
admin: Admins can now reset or modify the chaplain's sect from a UI
panel
/🆑
2023-09-22 19:13:38 -06:00
lessthanthree
2fe2418c0f Fix ghosts/godmode mobs causing supermatter resonance (#78492)
## About The Pull Request

Adds the incorporeal/godmode check to living mob interactions with the
supermatter. Already in hand_hit() but there are other procs that can be
triggered as well.

## Why It's Good For The Game

Ghost animals, revenants, mobs with godmode enabled should not cause
supermatter resonance messages when interacting with it.

Fixes https://github.com/tgstation/tgstation/issues/78490

## Changelog

🆑 LT3
fix: Ghosts and godmode mobs will no longer create resonance when
touching the supermatter crystal
/🆑
2023-09-22 21:39:00 +01:00
lessthanthree
00fc613f07 Dusting Poly causes a power surge (#78495)
## About The Pull Request

With surges now added, causes a power surge event when Poly is dusted on
the supermatter crystal.

Requires https://github.com/tgstation/tgstation/pull/78492

## Why It's Good For The Game

Adds some flavor to killing the engineering department's pet.

## Changelog

🆑 LT3
add: Poly now causes a power surge when dusted by the supermatter
crystal
/🆑
2023-09-22 16:36:02 -04:00
lizardqueenlexi
84ca9d8278 Fixed several Foodening taste issues. (#78481)
## About The Pull Request

Fixes a number of issues with taste that arose from the Foodening:
- Foods with special `check_liked` callbacks were having these thrown
out without effect. This made food with special "liked" conditions get
ignored - for example, security lizards didn't like donuts anymore.
- Ageusia was completely ignored when determining taste reactions (the
entire point of the quirk!).
- Foods with a toxic ingredient still gave the normal toxic reaction,
but would not always show up as inedible on examine if they were very
complex or had several liked foodtypes.

These issues have been fixed through a rewrite of the
`get_perceived_food_quality()` proc - all relevant checks are now made
within this proc rather than some coming before (and being partly
discarded).

Food quality checks take on the following hierarchy:
`silver slime toxicity > check_liked > toxic foodtypes > ageusia > liked
+ disliked foodtypes`

- **Silver slime toxicity** is about the same as before, except it will
return a toxic result early if the eater is not a jellyperson, or
increase the perceived quality by 2 if they are.
- **check_liked** will return early with a value based on the result of
the callback: -8 (toxic) if toxic, -2 (disliked) if disliked, and 2 (a
nice meal) if liked. As before, these ignore all further foodtype
calculations.
- **Toxic foodtypes** will return the toxic threshold if present.
- **Ageusia** will always return 0 - you can't taste anything, so if it
doesn't poison you it tastes completely neutral.
- **Liked + disliked foodtypes** are how things already work - save for
toxic foodtypes no longer being needlessly factored into the math.

As part of unifying two disparate sets of checks, perceived food quality
of -8 or lower now gives the toxic reaction rather than the disliked
one. This threshold would be incredibly difficult to reach via disliked
food alone, requiring four different disliked foodtypes at once in a
non-handcrafted food. This could potentially be set to a less extreme
value, like -4, if you wanted disliked-enough food to act as toxic -
but, as this would be a minor balance change, I haven't done that here.

Finally, as a miscellaneous change, a vestigial "fraction" field has
been removed from the invocation of check_liked - this was not used, and
was inconvenient for the rewritten code.
## Why It's Good For The Game

Restores several features that were lost or muddled in the Foodening,
and should not have been.

Note that, while this change generally preserves old behavior, it
diverges somewhat from the _intended_ design of the Foodening. Namely,
toxic foodtypes will _always_ give the toxic disgust/moodlet (unless
superseded by the above hierarchy), rather than being weighed against
the other foodtypes. I personally think this is fine, as I disagree with
the notion that wrapping poison in nice ingredients will make them
edible.
## Changelog
🆑
fix: Foods that have special conditions for liking/disliking them (such
as donuts for sec officers) have these conditions again.
fix: Characters with ageusia properly ignore non-toxic food types that
they eat.
fix: If you examine toxic food, it can no longer appear to you as
edible.
/🆑
2023-09-22 20:32:39 +02:00
Jacquerel
7025e5da5e Replaces "Bread" smite with "Objectify" (#78445)
Instead of turning people into bread, the bread smite can now turn people into any object (including bread).
2023-09-21 08:24:37 +02:00
Shadow-Quill
428828373d RCD construction effects no longer fall into chasms (#78446)
## About The Pull Request

Adds the construction effect to the chasm blacklist.

## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/44811257/76a9cb90-19d9-447b-85d2-56916d8cd8ca)
Fixes #78440 

## Changelog
🆑
fix: RCD Construction effects will no longer fall into chasms.
/🆑
2023-09-20 14:43:52 -06:00
SyncIt21
aa44be14e8 Makes /datum/component/wall_mounted actually do it's job (#78439)
## About The Pull Request
This component added in #77417 never actually worked. It has 2 problems

**1. Nothing even gets dismounted**


https://github.com/tgstation/tgstation/assets/110812394/8859794c-e2da-4bf2-bf2e-cd44fb240872

This is because a ton of objects in game don't actually pass a callback
when the object is getting dismounted i.e. they pass no params to the
`find_and_hang_on_wall()` proc for e.g.


11ec431834/code/game/objects/items/wall_mounted.dm (L58)

and because the callback is null the action 


11ec431834/code/datums/components/wall_mounted.dm (L54)

never gets executed. Now to combat this in the `Initialize()` proc a
null check is done to ensure the callback is not null

11ec431834/code/datums/components/wall_mounted.dm (L15-L18)

But this code itself is broken for 2 reasons
1. We create a callback using the `CALLBACK` macro they are not the same
as `TYPE_PROC_REF` also we never specify which object this proc ref
should even be called on
2. `on_drop` ends up null anyway because we first check if the param is
null and set its value here

11ec431834/code/datums/components/wall_mounted.dm (L15-L16)
But then we again overwrite `on_drop` with the param passed(which is
null) so it ends up becoming null again

11ec431834/code/datums/components/wall_mounted.dm (L18)

So this never did it's job. Also we simply can't create a callback on
`obj/deconstruct` because this proc accepts a boolean as it's param

11ec431834/code/game/objects/obj_defense.dm (L150)
But we pass the `hanging_param` as its param when invoking the callback

11ec431834/code/datums/components/wall_mounted.dm (L54)

Which would cause undefined behaviour so we have to manually do a null
check for this param and call the `deconstruct` proc explicitly to
ensure correct behaviour


**2. Wall mounts created in round would runtime**

**Reproduction**
1. Use some iron sheets to construct an air alarm wall frame(or any
wallmount of your choice)
4. Put on wall
5. Get stack trace


![Error](https://github.com/tgstation/tgstation/assets/110812394/2f802dc2-faaa-4ee3-aacf-38b83adef17d)

This occurred because the component received an invalid parent when
mounting was attempted.

![Cause](https://github.com/tgstation/tgstation/assets/110812394/aed12757-edf6-4f79-8763-00f4a86251ca)

Which was caused by

11ec431834/code/game/objects/items/wall_mounted.dm (L45)

We should be doing this the other way around i.e. 

`hanging_object.AddComponent(/datum/component/wall_mounted, on_wall)`

But the truth is even this is not required nor is this


11ec431834/code/game/objects/items/wall_mounted.dm (L58)

These 2 lines of code are not necessary because a lot of objects call
`find_and_hang_on_wall()` proc by themselves in their `Initialization()`
proc for e.g.


11ec431834/code/modules/atmospherics/machinery/air_alarm/_air_alarm.dm (L127)

So the work is already done for us. we were just adding the component 2
more times for no reason and causing problems.

## Changelog
🆑
fix: wall mounted objects air alarms, fire alarms etc now actually falls
off/gets destroyed when their attached wall is deconstructed
fix: wall mounts crafted in game also properly falls off/gets destroyed
when their attached wall is deconstructed
/🆑
2023-09-20 16:53:38 +02:00
Bloop
e712aa2b41 Fixes rescue hooks, adds a unit test to help prevent it from breaking again (#78418)
## About The Pull Request

Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/23763

Somewhere along https://github.com/tgstation/tgstation/pull/77739 and
the following fishing PR's this feature got overlooked and broken.

The args for `dispense_reward()` and `find_chasm_contents()` needed to
be updated as they were just wrong.

This sets them straight and adds an additional fishing unit test for the
rescue hook to hopefully prevent this edge case from being overlooked.

## Why It's Good For The Game

Rescue hooks work again, hooray.

## Changelog

🆑
fix: rescue hooks will once again drop the mob next to the fisherman
instead of just displaying a balloon alert and doing nothing
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-09-20 14:50:48 +02:00