Commit Graph

88 Commits

Author SHA1 Message Date
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
Rhials
42d929a100 Adds the Ectoplasmic Outburst, a rare ghost-centric anomaly event (#73024)
## About The Pull Request

This PR description might be a bit rushed because I accidentally
submitted the PR and want to bang out a quick explanation of what this
is before people start asking questions.

Adds a new, rare, ghost-themed anomaly event -- The Ectoplasmic
Outburst.


![Animation](https://user-images.githubusercontent.com/28870487/215292488-cc5ce589-39be-490d-bd80-92a2ed6e948b.gif)

This event increases in power as more ghosts orbit it, with three
important thresholds to meet.

If 10% or more of all active observers are orbiting the anomaly, an
effect will occur in the nearby area akin to the revenant's defile
spell, damaging flooring, windows, and making a mess.

If 35% or more are orbiting the anomaly, nearby objects in the effect
radius have a chance to become haunted, and will fling themselves at
anyone nearby for a bit. Spooky!

Now, at 50% or more participation, things get serious. Ghosts orbiting
the anomaly will be polled to be brought back into the world for a brief
period as a vengeful spirit, anchored to a SUPER spooky ghost portal.
The portal closes after two minutes (alternatively, smash it with a
toolbox) and deletes all of the ghosts it spawned. Vengeful spirits are
mostly just meant to smash stuff and be a nuisance while they can. It's
a wonderful opportunity to let deadchat desalinate a little.

![spooky
ghosts](https://user-images.githubusercontent.com/28870487/215293550-f7bbede2-cfa0-49b1-87fe-f38ee45d1df8.gif)

Oh, also, the anomaly is deadchat controlled. With enough ghosts, you
could theoretically outrun anyone trying to neutralize it!

The associated reactive armor has an effect similar to the anomaly,
haunting nearby objects for a time when the wearer is struck. Not
particularly outstanding, but it can introduce an element of chaos into
a fight that your opponent might not expect.

## Why It's Good For The Game

Anomaly events are great for ghosts. Why not make one tailored just for
them!

Gives admins something to spawn when a wizard has killed half of the
crew but it's not quiiiite time for an ERT.

It's a bit of a silly event with a novelty reward, but I think it's rare
enough not to be a huge issue.

## Changelog

🆑 Rhials
add: Ectoplasmic Outburst anomaly event
add: Reactive Ectoplasm Armor
/🆑
2023-02-11 19:11:20 -07:00
Bloop
e41cc39888 Fixes being able to breathe in space, fixes any lingering biotype related damage issues (#73147)
## About The Pull Request

Fixes #73276

This is a followup PR from my series of biotype updates. Changed oxyloss
to default to ignoring biotype requirements. Fixes a bug in lung code
that was preventing mobs from suffocating under certain conditions.

~~Now biotype requirements for oxyloss are respected only when `forced`
is set to `FALSE`, which I have done for all applicable reagents. This
is more of a temporary fix for until the damage system gets a refactor
to better accommodate biotypes. @Time-Green and @LemonInTheDark would
know what I mean, we were just talking about this. There is a problem
with `MOB_ORGANIC` being the deafult and this is the ugly workaround.~~

Edit: I felt that oxyloss (which should be renamed to something else at
this point) should have its own flag to check what type of respiration
the mob's lungs can do. Because you can have organic mobs that breathe
different gases. It gets messy when you try to use the same flag for
everything.

So I refactored oxyloss to use a new lung flag, `respiration_type`,
which is automatically set based on the `safe_min_oxygen`,
`safe_min_plasma` etc variables within the lung code. This will allow
for individual lung types to dynamically determine whether they can take
oxyloss from reagents, or any other sources that pass the
`respiration_type` in the `adjustOxyLoss` proc.

## Why It's Good For The Game

Plasmamen can't breathe without plasma anymore. Humans can't breathe
without oxygen anymore. Etc.

Adds better handling for dealing with the 'oxyloss' damage type,
allowing it to be applied based on the type of gas being breathed by the
specific lung. The argumentless default is to apply it regardless of
respiration_type e.g. it behaves exactly as it did before.

## Changelog

🆑
fix: fixes oxyloss not being applied when there is a partial pressure of
0 (no more being able to breathe in space)
code: fixes any lingering damage-application issues related to non
MOB_ORGANIC biotypes
refactor: refactored lungs to have a respiration_type flag which is then
used by adjustOxyloss/setOxyloss to determine whether to take 'oxygen'
damage.
/🆑
2023-02-06 22:56:20 -08:00
Jacquerel
8ee01d27b3 Basic Mob Spiders I: Ability refactor (#73201)
## About The Pull Request

This morning a man presented me with a mission

![image](https://user-images.githubusercontent.com/7483112/216712023-788f2f35-feaa-4152-acee-a2a58e1e6d2c.png)
I realised that I can achieve this in merely _three_ pull requests.
...because I'm leaving one that adds new AI until after feature freeze
february.

This one pulls all of the ability code out of the giant spider mob file
and spruces it up a bit in preparation for making them into basic mobs.
It removes an ancient "todo" about merging the spider and genetics web
abilities by, doing that.
Spider abilities no longer extend from a shared and reasonably pointless
"innate" root ability and also don't require their owners to be spiders
to work properly any more.

Also while I was in there I fixed a bug where the "set directive"
ability did not actually pass that into the antag datum of a new spider
unless they logged out and back in.

## Why It's Good For The Game

Code should smell nicer now.
Removes an essentially duplicated ability.
Clears up some chat log spam which didn't need to be in there.
You can actually set an objective for spiders you create as a spider
brood mother.
I guess you can make spiders-man as an admin by giving spider abilities
to other mobs.

## Changelog

🆑
refactor: Tidied up spider ability code, they should all work the same,
but please report if they do not.
refactor: Spiders and Geneticists now use the same ability to make webs
rather than two virtually-identical ones, which should also perform just
as it did before this change.
fix: Setting a directive as a Spider Midwife should properly pass and
announce itself to new spiders.
/🆑
2023-02-06 20:15:09 -07:00
Comxy
7e41cd3c0b Netherworld Mobs Refractor (#73086)
## About The Pull Request

This PR refactors netherworld mobs into basic mobs as best as possible.
Also makes some of them run faster when they are getting damaged or deal
more damage. Now the mobs might be able to keep up a little with the
players.
## Why It's Good For The Game

Makes the mobs have better movement and more dynamic movement. Makes the
quality of these mobs better.
## Changelog
🆑
add: Added new damage buffs for netherworld mobs
refactor: Refactors netherworld mobs into basic mobs
/🆑
2023-02-05 12:42:07 -07:00
Jacquerel
9a6172120e [no gbp] Dehydrated Carp will follow orders correctly (#73079)
## About The Pull Request

Fixes #72914
The order of operations here were wrong, such that it was calling a proc
which sent signals to inform a component about a new "master" before
actually adding the component.
I switched the proc calls around so that now it adds the component
before telling the component that there is someone to listen to.

## Why It's Good For The Game

Item you spent a valuable single telecrystal on did not work as
advertised, now does.

## Changelog

🆑
fix: Rehydrated Carp should now properly recognise who is the boss and
follow their instructions.
/🆑
2023-01-31 16:30:26 -08:00
ophaq
d5ce6dcb3a Adds Axolotls to List of Cytology Creatures (#72924)
## About The Pull Request
Adds axolotls to list of cytology creatures. Edits the name of the cells
for frogs by changing to "anura amphibian cells" and for axolotls,
"caudata amphibian cells." These mean both "frog" and "salamander"
amphibian cells respectively. Also makes axolotls swabbable, adds their
cell lines to fern's list, and they are now distinguishable from the
frog's reagent lists.
## Why It's Good For The Game
Adding more thing to cytology is always good. Frogs could be grown but
not axolotls despite them coming from the same place and are amphibians.
Adds more ways to get axolotls and another reason why you should do
cytology.

Reinforces the PR
([https://github.com/tgstation/tgstation/pull/72922](url)) I added for
amphibian cytology.
## Changelog
🆑
add: Axolotl lovers rejoice! I added axolotls to cytology and as such
are now swabbable.
add: Frog cells are now named "anura amphibian cells." This literally
means "frog amphibian cells."
add: Axolotl are "caudata amphibian cells." This literally means
"salamander amphibian cells."
/🆑

---------

Co-authored-by: kawoppi <94711066+kawoppi@users.noreply.github.com>
2023-01-31 10:19:20 +01:00
carshalash
141b2cac1b Adds nutriment factor to liquid gibs. (#73033)
## About The Pull Request

Over the years I've heard quite a few lizard players scratch their heads
in confusion due to the lack of gibs filling you up. I gave it a fairly
low value of 2 so people don't end up trying to power game it.

## Why It's Good For The Game

Adding an alternative use to gibs is always nice, at the moment it's
mostly just used for soap and cytology (Which barely anyone does.)

## Changelog

🆑
balance: Gibs now provide a small amount of nutriment.
/🆑
2023-01-30 23:40:24 -07:00
Jacquerel
66cb9133c4 Dominate & Lazarus Inject basic mobs. Lazarus Injected mobs don't fight each other. (#72440)
## About The Pull Request

Fixes #72404 
The Lazarus Injector doesn't currently work on basic mobs, but should.

Problem:
The EMPed state of the Lazarus Injector is intended to make a revived
mob hostile to everyone except you, including other mobs you have
revived wtih an EMPed Lazarus Injector.
This is trivial to achieve for Simple Mobs which essentially all share
the same AI, but I could not think of a single workable solution for
Basic Mobs which don't, or at least any which didn't come with a tedious
requirement to closely consider this niche item when programming any
additional AI.

Solution:
Change the default behaviour of the Lazarus Injector so this is not a
problem.
If all it does it make the mob loyal to you _and_ friendly to other mobs
which are loyal to you, then it's pretty easy because we can just use
the existing faction flags.

This is unambiguously a buff to using the item for nefarious purposes as
now if you revive four ice drakes and fulton them onto the station they
won't kill each other until only one is left, but is the only workable
solution I could really think of.
A lot of the very dangerous mining fauna can't be dragged so
transporting your army to the station still poses a question.

The alternate solution was just to replace the AI controller of any
emp-revived basic mob with a "zombie" AI controller, but this has the
problem that
A- It would now make things like cows and dogs into hostile creatures
when they previously weren't.
B- It loses any interesting behaviour the mob previously had and for
cases like Bileworms doesn't even make any sense (they'd try to walk and
just get stuck in place).
This ultimately leads to needing to make bespoke versions for various
mobs, which doesn't seem desirable from a maintainability standpoint.

As a side note it's still not a great idea to revive Bileworms _anyway_
as, their ability to move is tied to their ability to attack so once
they don't have a target they will just kind of sit there and if they
_do_ get a target their attempts to help you fight are difficult to
distinguish from attempts to kill you... but at least being able to
revive them makes it easier to make one sapient if you really want to
trap a player's mind inside a body which is incapable of leaving
lavaland.

Additional edit:
At Fikou's suggestion I've also added a sentience comparison proc to
`mob/living` and removed some code duplication which dealt with this
problem in the sentience/mind transfer potions, as well as added it to
the Dominate spell.

## Why It's Good For The Game

This device is meant to revive mobs and it shouldn't be required for
players to memorise an arbitrary list of which mobs it does and doesn't
work on.
Especially as the goal is eventually that all simple mobs should be
basic mobs.
This way of working is more intuitive, even if it is also stronger. I
was surprised when I used EMPed injectors and my "new minions" just
killed each other.

## Changelog

🆑
fix: You can now revive 'basic mobs' with a Lazarus Injector, such as
dogs, cows, axolotls, or carp.
fix: The same category of mobs can also now be effected by the Runic
Golem Dominate spell.
fix: Basic Mobs will switch target if they can no longer attack their
current target; meaning that if you become a Bileworm's friend it will
stop attacking you.
balance: Mobs injected with the Lazarus Injector while it is EMPed will
no longer attack other mobs revived by EMPed Lazarus Injectors.
/🆑
2023-01-30 16:14:23 -08:00
MrMelbert
0007686bf5 Adds checkgrep for improper or missing atom Initialize args (mapload) (#72846)
## About The Pull Request

Adds a grep for atom initialize overrides which does not include mapload

Regex used
`^/(obj|mob|turf|area|atom)/.+/Initialize\((?!mapload).*\)`

Also replaced some space indentation with some tab indentation in some
other greps


![image](https://user-images.githubusercontent.com/51863163/213883049-ef6d953a-e11f-4876-9852-c09633ddc289.png)

## Why It's Good For The Game

See #69107, #61759, #61623

## Changelog

No player facing changes
2023-01-26 13:58:47 -08:00
NamelessFairy
59211b5168 Viscerators no longer feature active camouflage (bugfix) (#72826)
## About The Pull Request

#72517 removed Viscerators icon state, thus making them invisible, this
adds the icon state back to them.

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

## Why It's Good For The Game

Viscerators are not supposed to be invisible.
## Changelog
🆑
fix: Viscerators are no longer invisible.
/🆑
2023-01-21 09:40:27 -08:00
Fikou
519bf69869 Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) (#72517)
## About The Pull Request
revive of #68760
this time a proc, not an element
this time supports cardboard cutouts
this time supports mob corpses

![image](https://user-images.githubusercontent.com/23585223/211064291-81070650-189f-4afa-8116-81b687e3ea35.png)

## Why It's Good For The Game
prevents these icons ever being outdated, they'll always look what they
are supposed to, saves spriting work

## Changelog
🆑 Fikou, a hood by Viro
refactor: humanoid mobs and cardboard cutouts automatically generate
their sprites, they no longer will be outdated
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-18 20:04:10 +00:00
Comxy
b485ad1e47 New Mob [Garden Gnomes] (#72672)
## About The Pull Request
Garden gnomes can go into the ground when they stand still for a while.
If they are damaged and underground they will heal. If they are
underground they will also gain damage resistance. They can make people
trip when underground and deal some damage. They are available through
golden slime cores or you can collect them from cargo with an emag. If
one of them gets damaged they will all retaliate against the attacker.

They have a very realistic colour pallet based on online gathered data.
Depending on their colour pallets some of them have a very low chance of
spawning.
## Why It's Good For The Game
These new garden gnomes come with expanding the world building of space
station 13. These gnomes will add more variety to the game play and use
an interesting AI and behavior that interacts with the player.

![gnome_promo1](https://user-images.githubusercontent.com/25363960/212195653-0b434f17-e73c-4a87-b8b8-e96dcf057269.PNG)

![gnome_promo2](https://user-images.githubusercontent.com/25363960/212195658-4cbcd863-dcab-4643-9e3b-686e79dcb435.PNG)
## Changelog
🆑
add: Adds garden gnomes.
imageadd: Adds garden gnome sprites.
/🆑
2023-01-17 10:02:20 -08:00
Rhials
2293350c8f [NO GBP] Fixes a runtime caused by basic ghost mobs (#72622)
## About The Pull Request

Fixes a runtime that was causing the CI to fail. The Bald hairstyle and
Shaved facial hairstyle had no associated sprites in the hairstyle
global lists. This would cause a runtime when trying to generate the
hair/beard sprite.

Bonus behind-the-scenes picture of the debug process:


![image](https://user-images.githubusercontent.com/28870487/211610958-fa7432a2-d848-4757-9ae1-e2f91d573ac3.png)
## Why It's Good For The Game

I get scared every time Fikou pings me and this will make him stop.
## Changelog
🆑
fix: Bald/Shaved ghosts will no longer cause a runtime and spawn without
a name.
/🆑
2023-01-13 13:52:48 -08:00
Jacquerel
d650a1a7cb Basic mobs don't become dense upon death (#72554)
## About The Pull Request

In #72260 what was previously a var became a flag, which was a sensible
change, however this inverted the default behaviour.
In virtually all cases we want dead mobs to _stop_ being dense, this
added a requirement for the flag to be present for that to happen and
then didn't add the flag to any mobs.

Rather than add this to every mob I inverted the function of the flag.
My reasoning here is that _simple_ mobs seemingly never required this
behaviour, basic mobs are probably going to need it rarely if ever, and
including it in `basic_mob_flags` by default seems messy and easy to
leave off when setting other flags (plus #72524 implies to me we want to
avoid adding more default values).

Setting this manually on each mob seems kind of silly as a requirement
going forward and I can't think of a way we'd unit test for people
forgetting.

For the same reason I did the same thing with the
`STOP_ACTING_WHILE_DEAD` flag I added to the AI controller in a recent
PR, the flag should denote unusual behaviour not the default.

## Why It's Good For The Game

It looks really odd when you're constantly shuffling places with dead
mobs, they're not supposed to do that.
It's tedious to add `STOP_ACTING_WHILE_DEAD` to every AI controller when
that should be an obvious default assumption.

## Changelog

🆑
fix: Dead basic mobs are no longer "dense" objects and can be stepped
on.
/🆑
2023-01-12 19:58:12 -08:00
NamelessFairy
970d7527ff Fixes mousetraps healing mice (#72564) 2023-01-09 17:34:15 -06:00
Comxy
40a3363525 Basic Faithless Mob (#72479)
## About The Pull Request
Turns the faithless mob into a basic mob with unique behaviors, it will
now break lights and drag around victims bodies. Can also punch open
airlocks if they can be opened.
## Why It's Good For The Game
Now the faithless mob has its own unique behavior and it is cool to see
more AI variety.
## Changelog
🆑
add: Faithless will now also break lights and drag victims around
refactor: Faithless into basic mob
/🆑
2023-01-09 18:08:29 +00:00
Jacquerel
6200bc2360 Basic Mob Carp IX: Carp Rifts & Migration (#72265)
## About The Pull Request

The almost-final part of the much larger PR I tried to make a month ago
(there's actually one more thing but I'm waiting on a dog PR to get
merged first).
This adds _new_ behaviour and abilities to carp.

Now when a Carp Migration occurs, all of the space carp who are spawned
are given a path through the station.
Specifically, each carp which shares a z level will try to path to a
specific station area, then back out into space.

https://www.youtube.com/watch?v=0KtTI4_7a0c
Here in this video we follow one carp and its friends as it attempts to
navigate "Kilo Station" in order to return to its ancestral spawning
grounds, via the dormitories.
Why are there walls underneath those windows? That's a question nature
has no answer for.

In order to ensure that they don't destroy Arrivals, Departures, and
anywhere else with windows in the process of trying to get inside they
have also gained a new "Lesser Carp Rift" ability.
This allows carp to teleport a short distance once per minute, leaving a
rift at their exit point. Any other mob can enter the rift to travel to
a similar location to the space carp (within the same 3x3 area).


https://user-images.githubusercontent.com/7483112/209584254-afb5839b-a1cd-4c5a-b701-dbb47a024272.mp4

Teleporting puts their attack on a one second cooldown so you won't be
_immediately_ bitten for 20 damage out of nowhere.

Their AI has been updated appropriately and they will use these
abilities:
- If they're trying to migrate through the station and encounter an
obstacle.
- If they're trying to atack something and encounter an obstacle.
- If they're trying to run away, as soon as possible.


https://user-images.githubusercontent.com/7483112/209584287-4402bf5b-3c41-4603-9205-5c4da8b4cd1c.mp4

That last point includes the HoS's pet Lia, who is an occasional target
of traitor objectives, which can either work in your favour (scaring her
to a less secure location) or against it (wait, where did she go?).

Also this fixes an embarassing bug where space carp weren't spaceproof
but I am going to pull that out into its own PR so it can be merged
without also needing to review this.

## Why It's Good For The Game

Carp are an iconic space animal but also quite boring, which this
hopefully remedies.

In the current game the Carp Migration event announces itself to the
crew and usually advertises to ghosts that a cool shark mob has spawned
and this changes essentially nothing about the round, the only people
Carp will usually attack are people who go out to set up the solars, and
the occasional wandering curator or lone operative.
This should make the announcement mean something, as suddenly it means a
belligerent animal might unexpectedly try to pass through your
workplace.

Non-magical space carp are weak enough that even an unarmed spaceman can
take on one or two at a time (and even being mildly armed with makeshift
weapons you have around makes them fairly non-threatening) but it can
give you a bit of excitement.

The ability for Carp to teleport allows them to do this without causing
_too much_ property damage or breaching the station, in my tests they
will _generally_ find a way in which doesn't involve them busting
windows open en masse. Also it just makes them a bit more interesting.
Traitors with dehydrated carp are not much able to make use of the Carp
Rift ability as there isn't any way to get them to do it on demand, but
you could spawn one which is not allied to you and then try to scare it
in an appropriate direction which I think is a fun use of the item.

This undoubtedly will make Space Dragon player-controlled carp more
dangerous in a way which is difficult to predict, but it also makes
playing as them more fun and might encourage some guerilla tactics and
cooperation which wasn't previously possible.

## Changelog

🆑
add: Space Carp seem to have begun associating the station with food and
attempting to enter from the outside, rather than simply congregating
around solar panels. Employees are advised that these are wild animals,
and should not be fed.
add: Space Carp can intermittently teleport short distances, leaving a
short lived rift which other nearby carp will be attracted to follow
them through.
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-01-07 22:36:29 +01:00
khevy
e0bfd78cc5 Adds mobroach to the game. Stronger glockroach (#72426)
Adds a stronger glockroach, with a lil hat and a tommygun. This roach
has a 4 shot burst on a 2 second cooldown.

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2023-01-07 10:53:06 +00:00
Rhials
2b141d34d7 Converts ghosts mobs to a basic mob, slightly changes how ghosts are given their identities (#72196)
## About The Pull Request

Performs a very simple conversion of ghosts to basic mobs. They're
relatively lacking in unique behavior in their current state, but they
didn't really have any when they were simple animals either. They
retaliate, they float, they do everything they did before, but now as a
basic mob.

Kilostation and Derelict Station 6 have had their mapped-in ghosts
converted to the new type as well. I'm unsure if there are any other
mapped instances of ghosts that will need changing, but please let me
know if there are.

Also in this PR is a slight rework of how ghost's get their hair/name.
As an ADDED BONUS, ghosts now get random hair to gow ith their randomly
generated names, rather than hair only being only possible through
varediting. (Thank you tattle for helping me figure this out).
## Why It's Good For The Game

Strikes another simple_animal from existence. Gives ghost mobs a bit
more _visual flair_.
## Changelog
🆑
code: Ghosts are now basic mobs! You might not notice any difference,
but...
code: Ghost mobs now spawn with hair and sometimes facial hair.
/🆑

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-01-06 13:02:35 -08:00
Jacquerel
583f65f28b Dogs become tamed when given bones (#72363)
## About The Pull Request

Previous to this PR Ian (and any other dog) would swear allegiance and
kill (or at least growl aggressively) in the name of anyone who clicked
on them sufficiently with combat mode disabled, which is boring.
Now instead Ian wants Jumbo Dog Bones.
The HoP and Warden (as dog owners) both start with one of these mythical
items which otherwise can be ordered from cargo if you want to get into
a dog's heart, but they're not cheap.
You can also use regular bones of the kind you may harvest from Lavaland
animals or Skeleton crew members but these dogs are picky and so you
have significantly less chance of success than if you buy the premium
package.

Jumbo Dog Bones also fully heal dogs, as a bonus.

Additionally to this, I added functionality to the `tameable` component
to allow it to not delete itself upon successful taming, to preserve
Ian's ability to have more than one friend.
Additionally to that, I split the "stop being friends if you attack me"
behaviour into its own element rather than being part of the "start
being friends if you pet me a lot" one, so he could also keep doing
that.
And finally I added a new signal `COMSIG_ATOM_AFTER_ATTACKEDBY` which is
sent by an atom after an item attacks it (so if it manages to get
through the attack chain and is probably actually being used for an
attack) and registered to this in the `relay_attackers` element in place
of `COMSIG_PARENT_ATTACKBY`. This means that dogs can now recognise that
when you use a bone on them you are trying to feed them, not attack
them.

## Why It's Good For The Game

The loyalty of Ian and McGriff will now be most easily available to
their owners rather than anyone with access to their office.
... which doesn't really effect very much, I just think spam-clicking
Ian was boring as a solution and spending money is at least marginally
better.
Gives you something to spend money on if you want to befriend a dog, for
instance if you're a mailperson or felinid who is tired of getting
growled at by one. Or if you bought a dog from cargo.
Removes some unintuitive edge cases where a mob might get mad at you
doing something helpful to them.

## Changelog

🆑
balance: While Ian still enjoys being petted, his heart will now most
closely belong to anyone who gives him an expensive luxury dog bone.
code: Using an item which _can_ deal damage on a mob tracking hostile
actions (such as a dog) won't automatically be considered to be a
hostile action if you aren't actually hitting it with the item.
/🆑
2023-01-06 12:44:39 -08:00
Mothblocks
f54dcda1c0 afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)
Necessary for #72292 to work effectively, and probably not very useful
out of that context. Split out of its own PR because this is long and
boring.

I want to make sure that we're catching actual mistakes there, and not
just experiencing side effects of how shitty the attack chain is.
2023-01-04 21:10:41 -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
Time-Green
bf73344399 [READY] DRAMATIC SHUTTLES!! You can now fly around the shuttle (#71906)
You can move around shuttles during transport now! Instead of them
teleporting you instantly into deepspace, you can move around somewhat
depending on your space-mobility and grip-strength.


![image](https://user-images.githubusercontent.com/7501474/206866132-3fae024c-a8a2-4f4a-b4b8-37c96a254498.png)

**Please watch the demonstration aswell, it should answer most
questions:**
https://www.youtube.com/watch?v=Os77qDOVSXE

Interactions:
- Being within armsreach of a wall or solid object means you 'cling',
where the shuttle pull is very weak and you can basically run around the
shutt;e (but dont fuck up or you're gone)
- Being in range of nothing gives you a very heavy pull, you can barely
resist if you have a decent jetpack
- Objects are instantly power-yeeted
- Being pulled or riding something excempts you from hyperspace pull
- Touching a space tile while being on hyperspace dumps you in
deepspace, you either go back to the shuttle or enjoy deepspace
- On shuttle hyperspace tiles are a lot less dangerous, and will instead
launch and freeze you instead of teleporting you into deepspace
- In-case it wasn't obvious, you can rest outside the shuttle as long as
something is blocking your path. I think it's funny but I might nerf it

🆑
add: You can now fly around the shuttle during transit! Woohoo! You can
either cling to the side or grab a jetpack and try and keep up with the
shuttle! Carps can move around freely in hyperspace
qol: Increased shuttle hyperspace size from 8 tiles to 16
/🆑

- [x] Find a way to detect when a shuttle arrives and do something with
the shit left in hyperspace

Things I will do in another PR: 
- Engines spit fire and hurt (almost finished but I want to keep this
small)
- Random shuttle events. You might run into dust meteors or migrating
carps OR A CHANGELING INFILTRATOR
- Hyperspace turfs on the shuttle pull you under the shuttle

### Why it's good for the game
It's so much more immersive than being instantly teleported into
deepspace. It gives you a chance to recover if you get spaced or for
daredevils to look cool

It's also just very cool idk
2023-01-03 11:10:56 -08:00
Jacquerel
eb6c0eb37c Dogs use the Pet Command system (#72045)
About The Pull Request

Chiefly this refactors dogs to use the newer component/datum system for "pet which follows instructions". It also refactors it a little bit because I had better ideas while working on this than I had last week. Specifically, instead of passing around keys we just stick a weakref to our currently active behaviour in the blackboard. Basically the same but skipping an unecessary step.

Additionally it adds a component for the previous "befriending a mob by clicking it repeatedly" behaviour which hopefully we won't use too much because it's not very exciting (I am planning on replacing it for dogs some time after Christmas).
The biggest effort in here was making the Fetch command more generic, which includes multiple behaviours (which might be used on their own?) and another component (for holding an item without hands).

Additionally I noticed that dogs would keep following my instructions after they died.
This seems unideal, and would be unideal for virtually any AI controller, so I added it as an AI_flag just in case there's some circumstance where you do want to process AI on a dead mob.

Finally this should replicate all behaviour Ian already had plus "follow" (from rats) and a new bonus easter egg reaction, however I noticed that the fetch command is supposed to have Ian eat any food that you try to get him to fetch.
This has been broken for some time and I will be away from my desk for a couple weeks pretty soon, so I wrote the behaviour for this but left it unused. I will come back to this in the future, once I figure out a way to implement it which does not require adding the "you can hit this" flag to every edible item.

Also I had to refit the recent addition of dogs barking at felinids to fit into this, with a side effect that now dogs won't get mad at a Felinid they are friends with. This... feels like intended behaviour anyway?
Why It's Good For The Game

It's good for these to work the same way instead of reimplementing the same behaviour in multiple files.
Being able to have Ian (or other dogs) follow you around the station is both fun and cute, and also makes him significantly more vulnerable to being murdered.
Changelog

cl
add: Ian has learned some new tricks, tell him what a good boy he is!
add: Ian will come on a walk with you, if you are his friend.
refactor: Ian's tricks work the same way as some other mobs' tricks and should be extendable to future mobs.
fix: Dogs no longer run at the maximum possible speed for a mob at all times.
add: When Ian gets old, he also slows down. Poor little guy.
add: Dogs will no longer dislike the presence of Felinids who have taken the time to befriend them.
/cl
2022-12-29 14:37:25 +13:00
Comxy
e7d788348f Frog Basic Mob Refactor (#72044)
## About The Pull Request
Refactors the frog into a basic mob. The frog now does the same as the
old frog and can now properly be commanded by the regal rats.
## Why It's Good For The Game
## Changelog
🆑
refactor: Refractors the frog into a basic mob
/🆑
2022-12-27 21:06:57 -08:00
Fikou
3daf3b0643 fixes silly stuff about basic mobs (#72260)
## About The Pull Request
makes basic mob attacks call their default attacks when done by a
player, rather than calling simple mob attacks
makes basic mob attacks call simple animal attacks by default, until we
remove simplemobs
moves some stuff off to procs and flags, fixes some stuff

## Why It's Good For The Game
im moving holoparasites to basic mobs and i literally cant give them
secondary click attacks

## Changelog
🆑
fix: fixes moonicorns not applying pax
/🆑
2022-12-27 14:29:14 -08:00
Jacquerel
32277e51cf [no GBP] Carp no longer die in space or break CI (#72266)
## About The Pull Request

See title
Apparently I didn't notice that "default atmospheric tolerance" was
merged while my carp refactor was open, so on live they're not
spaceproof and all die shortly after spawning

Also additionally two things were failing CI tests due to hard deletions
and now don't

## Why It's Good For The Game

They probably shouldn't do that

## Changelog

🆑
fix: Space Carp can now breathe in space
/🆑
2022-12-27 21:01:54 +01:00
Jacquerel
b174af7661 Basic Mob Carp Part VIII: Basic Mob Carp (#72073)
## About The Pull Request

Wow we're finally here. This turns carp into Basic Mobs instead of
Simple Animals.
They use a variety of behaviours added in previous PRs to act in a
marginally more interesting way than they used to.
But don't worry there's still 2 or 3 PRs to follow this one until I'm
done with space fish.

Changes in this PR:
Carp will try to run away if they get below 50% health, to make use of
their "regenerate if not attacked" component.
Magicarp have different targetting behaviour for spells depending on
their spell;
- Ressurecting Carp will try to ressurect allied mobs.
- Animating Carp will try to animate nearby objects.
- Door-creating Carp will try to turn nearby walls into doors.

You can order Magicarp to cast their spell on something if you happen to
manage to tame one.
The eating element now has support for "getting hurt" when you eat
something. Carp eating can rings and hating it was too soulful not to
continue supporting.

## Why It's Good For The Game

Carp are iconic beasts and I think they should be more interesting.
Also we just want to turn mobs into basic mobs anyway.

## Changelog

🆑
add: Carp will now run away if their health gets low, meaning they may
have a chance to regenerate.
add: Lia will now fight back if attacked instead of letting herself get
killed, watch out!
balance: Magicarp will now aim their spells more intelligently.
add: Tame Magicarp can be ordered to use their spells on things.
refactor: Carp are now "Basic Mobs" instead of "Simple Mobs"
fix: Dehydrated carp no longer give you a bad feeling when they're your
friend and a good feeling when they're going to attack you.
balance: Tamed carp are now friendly only to their tamer rather than
their whole faction, which should make dehydrated carp more active.
Order them to stay or follow you if you want them to behave around your
friends.
/🆑
2022-12-25 18:24:18 -08:00
Andrew
0818d6ae4c Crafting/Cooking menu update (#71779)
## About The Pull Request

Updated crafting menu, adding a lot of new functions and recipes that
were not in the crafting menu before.

<img alt="cult"
src="https://user-images.githubusercontent.com/3625094/206009533-aec3a1dd-cbe5-45eb-8515-1b75fabb65c5.PNG">

<img alt="nH77dLyyGx"
src="https://user-images.githubusercontent.com/3625094/206009786-b6706f70-0599-40bf-b051-8f499de43abd.png">


![image](https://user-images.githubusercontent.com/3625094/206623881-12d8abfc-de5e-458e-a01c-3daac8dbe9bd.png)


https://user-images.githubusercontent.com/3625094/206009841-738e4a03-0660-45b7-8d83-15eeb6501967.mp4

## Why It's Good For The Game

It is easier to use, and it has a lot of recipes that were spread
throughout the game, some of which weren't even on the wiki.
Crafting and cooking now count about 1200 recipes in total, including
conditionally available ones.

## Changelog

🆑
qol: Rewrote the crafting/cooking menu UI
qol: Split crafting and cooking menus in two different menus
qol: Crafting is no longer blocking the entire UI, only the "Make"
buttons are disabled
qol: Added stack crafting recipes to the crafting menu
qol: Added cooking recipes that were absent in the crafting menu before
(tool recipes, machine recipes, reactions)
qol: Added option to search recipes by title
qol: Added option to filter recipes by required materials/ingredients
qol: Added food types to the cooking menu, highlighting diet of your
species (liked, disliked foods)
qol: Added total nutrition value of the result to the cooking menu
qol: Added option to filter cooking recipes by the food type of the
resulting food
qol: Added "Can make" category that lists all currently craftable
recipes throughout all categories
refactor: changed categories and reshuffled some items in them
code: Reagents now have default container to get an icon from the
reagent datum
code: Objects now have `desc_controls` var for OOC information about
mouse controls that are visible on examine, but not in the description
fix: Fixed alignment on many food icons
fix: Fixed missing icon for beef stroganoff
/🆑

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-12-25 12:27:49 -08:00
Zephyr
72add64520 Refactors armor into dedicated subtypes (#71986)
## About The Pull Request

See title.
## Why It's Good For The Game

Code is cleaner, and more readable/intuitive
Technically closes
https://github.com/tgstation/dev-cycles-initiative/issues/8
## Changelog
🆑
refactor: armor, from the ground up basically
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-23 16:21:22 -08:00
jimmyl
100cb71111 Turned most syndicate mobs (+ viscerators) into basicmobs (#71871)
## About The Pull Request
Turns the syndicate simpleanimals into basicmobs: (+ stormtrooper, +
space variants) Base Mob, Knife syndies, pistol syndies, SMG
syndies,shotgun syndies, viscerators
also changes some instances of the simple_animal path into the basicmob
ones
Removes civillian syndicates which were useless and also completely
unused
Also removes mech pilots:
![2022-12-09
20_02_18-Window](https://user-images.githubusercontent.com/70376633/206777829-2e49e445-3532-4e8e-8e7c-8d9b0a3a14d0.png)

Also,
makes the basic targetting datums health check configurable
basic attack behavior can now fire in bursts


https://user-images.githubusercontent.com/70376633/206766607-cf2e3659-0c5e-4117-9af7-e573e35bdf80.mp4

https://user-images.githubusercontent.com/70376633/206766630-15b4469f-68be-44c7-9394-1f2b6fe07811.mp4

https://user-images.githubusercontent.com/70376633/206766613-69b42457-a03b-449d-a1b8-a5aa556c76e5.mp4

https://user-images.githubusercontent.com/70376633/206766619-5560a178-8d2f-4b22-adf1-22ace6f63a51.mp4

https://user-images.githubusercontent.com/70376633/206766627-e671d064-fd9e-4204-b823-aa2e07f7fc26.mp4

https://user-images.githubusercontent.com/70376633/206766633-108c1574-3554-4bc1-a9ac-8faed0ec4062.mp4
## Why It's Good For The Game

simpleanimal stinks basic mob good
syndicate AI was really bad to begin with so here we are

## Changelog
🆑
code: Turned most syndicate mobs into basicmobs, making their AI better
and (possibly) more deadlier!
del: Removed syndicate mech pilots and syndicate civvies
/🆑

Co-authored-by: kawoppi <94711066+kawoppi@users.noreply.github.com>
2022-12-22 00:47:28 -08:00
Jacquerel
8cb4947084 AI actions won't unassign each other's movement targets & Mice stop being scared of people if fed cheese (#72130)
## About The Pull Request

Fixes #72116 
I've had a persistent issue with basic mob actions reporting this error
and think I finally cracked it
When replanning with `AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION` it can run
`Setup` on one action leading to the plan changing, meaning that it runs
`finishCommand` to cancel all other existing commands
If you triggered a replan by setting up a movement action in the middle
of another movement action, cancelling the existing action would remove
the target already set by the current one.
We want actions to be able to remove _their own_ movement target but not
if it has been changed by something else in the intervening time.

I fixed this by passing a source every time you set a movement target
and adding a proc which only clears it if you are the source... but this
feels kind of ugly. I couldn't think of anything but if you have a
better idea let me know.

Also while I was doing this I turned it into a feature because I'm
crazy.
If you feed a mouse cheese by hand it will stop being scared of humans
and so will any other mice it attracts from eating more cheese. This is
mostly because I think industrial mouse farming to pass cargo bounties
is funny.
Mice controlled by a Regal Rat lose this behaviour and forget any past
loyalties they may have had.


https://user-images.githubusercontent.com/7483112/208779368-3bd1da0f-4191-4405-86e5-b55a58c2cd00.mp4

Oh also I removed a block about cancelling if you have another target
from the "hunt" behaviour, everywhere using this already achieves that
simply by ordering the actions in expected priority order and it was
messing with how I expected mice to work.
Now if they happen to stop by some cheese they will correctly stop
fleeing in order to eat it before continuing to run away.

## Why It's Good For The Game

Fixes a bug I kept running into.
Makes it possible to set up a mouse farm without them screaming
constantly.
Lets people more easily domesticate mice to support Ratatouille
gameplay.

## Changelog

🆑
add: Mice who are fed cheese by hand will accept humans as friends, at
least until reminded otherwise by their rightful lord.
fix: Fixed a runtime preventing mice from acting correctly when trying
to flee and also eat cheese at the same time.
/🆑
2022-12-22 00:41:36 -08:00
Jacquerel
fa67ff6e81 Rats can attack obstacles between them and their target (#71741)
## About The Pull Request

Fixes #71568 
I wrote this for basic mob carp but it will be needed in a lot of
places.
Rats used to be able to attack windows or dense objects between them and
their target, but basic mobs didn't have this capability.
Now they do.

Behind the scenes, an important change is that this adds
`AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION` to
`/datum/ai_behavior/basic_melee_attack`.
This is because `basic_melee_attack` essentially enters a loop which
won't end until the target is dead or lost, but there are plenty of
circumstances where we'll actually want to interrupt this to do
something else. Such as attack windows.

## Why It's Good For The Game

Restores accidentally removed behaviour.
Will likely be required for future basic mob development.

## Changelog

🆑
fix: Rats will once again attempt to attack windows or other dense
objects separating them from their targets.
/🆑
2022-12-18 08:24:01 -08:00
Jacquerel
912ac7b29d Basic Mobs can run away (#71963)
## About The Pull Request

That's right I'm still atomising #71421, some day I might even post
something related to carp.
This PR adds various behaviours to basic mobs allowing them to run away,
in a couple of variations.

Mice will flee from anyone who doesn't share their factions, at all
times (so they will scatter from most humans, but not regal rats).
Rabbits and Sheep will flee from anyone who has attacked them.
Pigs will run away from people who have attacked them, but only if
they're below half health.


https://user-images.githubusercontent.com/7483112/207127135-d1737f91-d3f7-468a-ac60-7c7ae5d6623d.mp4

Mice are still plenty catchable because they don't run _very far_ (or
very fast) but I think the chase will be good enrichment.

To achieve this I had to change the signal COMSIG_CARBON_HEALTH_UPDATE
into COMSIG_LIVING_HEALTH_UPDATE but frankly the latter seems more
sensible anyway.

## Why It's Good For The Game

More behaviours to use later when designing mobs, gradually gives mobs
more things to do rather than just sort of moving aimlessly around the
area you left them in.
It'll give people hunting rats in maintenance some exercise.

## Changelog

🆑
add: Mice will now run away from you, you have to catch them if you want
to eat them. Use those traps!
add: Rabbits, Sheep, and Pigs likewise won't just sit there and let you
pulverise them if they can see an escape route.
/🆑
2022-12-18 02:15:34 +01:00
Fikou
febdb61e01 makes status tab use signals, thirds the delay between updates (#72002)
## About The Pull Request
status panel for carbons and humans instead of hardcoding stuff, uses
signals (borg material storage too)
removes combat mode indicator in status tab from xenomorphs which have a
button for it, but adds it to simplemobs, since they dont have a visual
indicator
adds status tab stuff to basic mobs, i think they were missing
everything by accident
offsets unique status tab stuff for all mobs by a single line
the delay between updates is a third of what it was before, mainly to
make shuttle timers more accurate (approved by kyler)

## Why It's Good For The Game
much cleaner code, makes future implementations easy

## Changelog
🆑
qol: you can see your combat mode status as a simple or basic mob, and
you can see your health as a basic mob
qol: status panel updates three times as fast
/🆑
2022-12-16 09:56:49 -05:00
Jacquerel
38bd952b19 Pet Command Component + Regal Rats can order their subjects around (#71590)
## About The Pull Request

Another atomisation of #71421 but I had a fun idea while I was testing
it.

This adds a component based on the existing system for giving
instructions to tamed carp or dogs, but hopefully more modular.
It also gives it to the rat minions of a regal rat.
The basic function allows the mob to listen and react to spoken
commands, which passes things to its AI blackboard. Additionally if you
alt-click a commandable mob it will show a radial menu which both allows
you to select a command, and also contains tooltips explaining what they
do and what audible words trigger it.

<details>
  <summary>Video</summary>
  

https://user-images.githubusercontent.com/7483112/204308693-0eccebec-75c9-411c-81c5-5aa0d682d1a5.mp4

</details>

Now if you riot some rats, you can alt click on them individually to
give them specific orders (more useful for other creatures than rats),
or you can speak out loud to command your legion.
Rats aren't very smart so you can't give them many instructions, but
this is expandable for other creatures.

Additional change: Mice don't squeak if stepped on by other mice because
this made an absolutely unholy noise and I am not sure there's a way to
get non-dense mobs to spread out.

## Why It's Good For The Game

Allows for giving more mobs the ability to be tamed and instructable by
their owner, without copy/pasting code which lives inside a specific
mob.
Yelling at your rats to give them commands is funny. It also adds the
possibility of telling your rats to stop biting someone if they have
agreed to your demands, allowing for more courtly roleplay.
When Regal Rat is converted to a basic mob its AI can also give other
AIs instructions by yelling at them which I think is a good feature.

## Changelog

🆑
add: The followers of Regal Rats will now respond to simple
instructions, if given by their rightful lord. Except frogs. They're too
busy licking themselves and watching the colours.
/🆑
2022-12-13 12:34:23 -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
Dani Glore
5ddfd035e6 Fix: Robotic/Non-Organic Bodyparts not Healing/Damaging (#71864)
# About The Pull Request
Around 4 years ago an overriding proc in carbons, `take_overall_damage`,
dropped a positional argument for stamina, but the calls to it were not
adjusted. This PR fixes a 4 year old bug wherein the `adjustBruteLoss`
and `adjustFireLoss` functions were not working as expected for robotic
bodyparts, and in most cases leads to robotic limbs being invulnerable
to spread damage/healing. The bug also affected the Var Viewer and any
admin-heals. In downstream repositories such as Skyrat-tg, where there
are fully robotic characters, some severe impact was seen such as the
inability to revive/heal players without fully respawning them.

The bug was caused by out-of-order positional arguments in the calls to
`/mob/living/carbon/take_overall_damage` and
`/obj/item/bodypart/proc/receive_damage` within `adjustBruteLoss` and
`adjustFireLoss`, which caused its `updating_health` argument to wind up
in the wrong position, occupying the same position as `required_status`
which is then interpreted by the proc to mean bitflag
`BODYTYPE_ORGANIC`. Furthermore, the default argument for
`required_status` and `heal_overall_damage` is currently also
`BODYTYPE_ORGANIC`, which would cause the issue to persist and prevent
most forms of spread-healing and spread-damage to robotic/surplus limbs.

I also found that, after fixing the bug, robotic limbs were suddenly
vulnerable to space/pressure damage. @Fikou has requested that I re-add
this mechanic, as it is now a feature of the game. To implement it, I
made a small change to `/datum/species/proc/handle_environment_pressure`
so pressure damage only damages organic bodyparts.

I also found that any limbs which do not set a `max_damage` simply do
not show up in the list returned by `get_damageable_bodyparts`, which
could stop them from being damaged/healed, which I think may be
intentional. I didn't think this was a bug, but I can change this too if
it's asked of me.

## Why It's Good For The Game
The PR includes a bugfix which allows non-organic bodyparts to be
damaged by spread damage again. An out-of-order argument to the
ubiquitous `take_overall_damage` and `receive_damage` functions was
causing an argument to shift one position over to the right, and those
functions receive a default `required_status` argument of
`BODYTYPE_ORGANIC`; both issues combined caused the functions to almost
completely ignore non-organic bodyparts, and only deal/heal damage to
organic bodyparts.

The PR should allow more admin-heals to work as expected, and more
sources of damage will now work as expected for non-organic bodyparts.

## Changelog

🆑 A.C.M.O.
fix: Fixed robotic/surplus limbs not taking damage/healing as expected;
including via the Var Viewer, Player Panel, and from sources of
spread-damage.
/🆑

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-12-11 12:45:26 +01:00
Jacquerel
58b61a17a7 Basic Mob Carp: Retaliate Element (#71593)
## About The Pull Request

Adds an Element and AI behaviour intended to replicate the "retaliate"
behaviour which made up an entire widely-populated subtype of simple
mobs.
The behaviour is pretty simply "If you fuck with me I fuck with you".
Mobs with the component will "remember" being attacked and will try to
attack people who attacked them, until they lose sight of those people.
They don't have very long memories so breaking line of sight is enough
to remove you from their grudge list.
The implementation unfortunately requires registering to 600 different
"I have been attacked by X" signals but c'est la vie.

It will still be cleaner than
`/mob/living/simple_animal/hostile/retaliate/clown/clownhulk/honcmunculus`
and `mob/living/simple_animal/hostile/retaliate/bat/sgt_araneus`.

I attached it to the pig for testing and left it there because out of
all the farm animals we have right now, a pig would probably get pissed
off if you tried to kill it. Unfortunately it's got a sausage's chance
in hell of ever killing anyone.

## Why It's Good For The Game

It doesn't have much purpose yet but as we make more basic mobs this is
going to see a **lot** of use.

## Changelog

🆑
add: Basic mobs have the capability of being upset that you kicked and
punched them.
add: Pigs destined for slaughter will now ineffectually attempt to
resist their fate, at least until they lose sight of you.
balance: Bar bots are better at noticing that you're trying to kill
them.
/🆑
2022-12-09 19:53:58 +01:00
kawoppi
81012494d1 Fixes many basic mobs not being vulnerable to extreme atmospheres and temperatures by making it the default (#71817)
## About The Pull Request
**In short:**
This PR causes cows, pigs, rabbits, sheep, cockroaches, mothroaches and
mice to take damage in dangerous atmospheres and temperatures.

**In long:**
So simple mobs take damage from extreme atmospheres and temperatures by
default, this is not the case with basic mobs however. Basic mobs can be
given the `atmos_requirements` and `basic_body_temp_sensitive` elements
to accomplish this, but these are missing on a number of basic mobs that
probably shouldn't be able to survive in space.

This PR gives basic mobs the `atmos_requirements` and
`basic_body_temp_sensitive` elements by default, using the same values
as default simple mobs do. These values have been overridden in the
cases where this was done by the original simple mob (cockroaches and
lavaland mobs) or where the basic mob already had one of the elements
with different values (space bunnies and void puppies).

Not every mob is vulnerable to temperature or atmosphere though. Setting
`unsuitable_atmos_damage` to 0 will make it so the mob isn't given the
`atmos_requirements` element. Setting both
`minimum_survivable_temperature` and `maximum_survivable_temperature` to
0 will make it so the mob isn't given the `basic_body_temp_sensitive`
element.

I'm not sure if this is the best way of doing this. I don't know if mobs
dying to extreme atmos/temp by default was left behind with simple mobs
for a reason or if it was just forgotten about.
## Why It's Good For The Game
Cows, pigs, rabbits, sheep, cockroaches, mothroaches and mice are
probably not intended to be space-faring animals.

Basic mobs matching the same default atmosphere and temperature
vulnerabilities as simple mobs makes it harder to overlook that when
porting them to basic mobs.
## Changelog
🆑
fix: cows, pigs, rabbits, sheep, cockroaches, mothroaches and mice now
take damage in hazardous atmospheres and temperatures
/🆑
2022-12-09 19:27:09 +01:00
kawoppi
b4615f9f40 turns axolotls into basic mobs (#71778)
## About The Pull Request
Changes axolotls from simple mobs to basic mobs. I'm not well versed on
the differences between simple and basic mobs but it looks like axolotls
are still working as before. Their idle movement may be slightly
different compared to before and now they don't move away while you're
pulling them.
## Why It's Good For The Game
Basic mobs are better for AI and probably some other stuff as well and
there's the freeze thing also.
## Changelog
🆑
code: turned axolotls into basic mobs, their idle movement may be
slightly different and they won't move while you're pulling them anymore
/🆑
2022-12-07 13:54:32 -08: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
Tastyfish
ebc0227176 Makes dog a basic mob [MDB IGNORE] (#70799)
About The Pull Request

    Made a basic version of the pet base called /mob/living/basic/pet. It's significantly more stripped down from the old simple_animal one, because its half collar stuff and...

    Made the collar slot a component that you could theoretically remove from a pet to disable the behavior, or add to any other living mob as long as you set up the icon states for the collar (or not, the visuals are optional).
        The corgi's collar strippable slot is now generally the pet collar slot, and in theory could be used for other pet stripping screens.

    I also gutted the extra access card code from /mob/living/basic/pet as it's only being used by corgis. Having a physical ID is now just inherent to corgis, as they're the only ones that could equip it anyway.

    Ported the make_babies() function from simple_animals to a new subtree and associated behavior, called /datum/ai_planning_subtree/make_babies that uses blackboards to know the animal-specific info.
        Note that it's marginally improved, as the female walks to the male first instead of bluespace reproduction.

    Tweaked and improved the dog AI to work as a basic mob, including making /datum/idle_behavior/idle_dog fully functional.

    Made a /datum/ai_planning_subtree/random_speech/dog that pulls the dynamic speech and emotes to support dog fashion.

I've tested base collars across multiple pet types.

For dogs, I've tested general behavior, fetching, reproduction, dog fashion, and deadchat_plays, covering all the oddities I'm aware of.

image
Why It's Good For The Game

Very big mob converted to a basic mob.
Changelog

cl
fix: Lisa no longer uses bluespace when interacting with Ian.
refactor: A large portion of dog code was re-written; please report any strange bugs.
/cl
2022-12-06 09:13:13 +13:00
Comxy
4c8597b2cd Regal Rat - Maint Creatures DLC Update (#71343)
## About The Pull Request
The regal rat can now convert frogs and cockroaches to their army. They
also will not attack each other with the new maintenance creature
faction. BirdBoat has also been added to this faction since he also
naturally appears in the maintenance.
## Why It's Good For The Game
Make sure to avoid stepping on the cockroaches. They do have one extra
health though.

![promo](https://user-images.githubusercontent.com/25363960/202822758-f611f861-596a-4850-8279-af0bac9e3d0f.PNG)
## Changelog
🆑
add: Frogs and cockroaches can now be converted to the regal rats army.
fix: Converted rat do not attack mouses anymore.
imageadd: New sewer cockroach and trash frog sprites
/🆑
2022-12-02 18:43:12 -08:00
Jacquerel
ddc3e57310 [NO GBP] Rabbits won't become dense when they die (#71499)
## About The Pull Request

Made a last minute suggestion change to a PR which was just merged and
then like a couple minutes after that we decided it was a bad idea
actually.
This implements the _actual_ default behaviour we expect mobs to have.
Dense mobs become undense when they die. Mobs which already aren't dense
continue not being dense. They return to their original state when
they're alive.

## Why It's Good For The Game

This is largely how you expect corpses to work,

## Changelog
🆑
fix: Rabbits don't suddenly become more dense when killed than they were
in life.
/🆑
2022-11-25 22:05:08 +01:00
Jacquerel
d74e84adda Basic Mob Carp Part IV: Revived Basic Mobs Look Alive (#71482)
## About The Pull Request

Fourth atomisation of #71421 
Pretty basic fix, if you revived basic mobs they'd retain their dead
appearance forever (as well as losing density if they had it).
Now they don't do that.

There's still some work to do to get the Lazarus Injector to work with
Basic Mobs because of how it changes behaviour, and we don't really have
support for that yet. Probably important once it covers more pets
because once Basic Mob Dogs is merged Ian will be temporarily impossible
to revive with the injector (although strange reagent, wands, etc will
still work fine).
I'll get to that eventually.

## Why It's Good For The Game

If something is alive it should look alive.

## Changelog
🆑
fix: A revived basic mob will stand up again rather than inching around
as a living corpse.
/🆑
2022-11-24 11:28:55 -08:00
Jacquerel
f47b29a392 Basic Mob Carp Part II: Regenerator (#71437)
## About The Pull Request

<details>
  <summary>Video</summary>
  

https://user-images.githubusercontent.com/7483112/203324325-5bf46e0f-b294-4832-9016-aec275036ca9.mp4

</details>


Adds a "Regenerator" component, applies it to carp, and removes the
previous implementation from megacarp.
The function of this component is that any time you take damage a timer
is reset, when that timer expires you will begin regenerating health and
display an animated border for visual feedback.
This was previously a function of mega carp but was extremely obscure
because there was _no_ feedback, so it would only be visible that it was
happening if you were wearing a medical hud.

Additionally because mega carp will pursue a target until it dies you
probably wouldn't notice it even then, it had to survive a fight in
order to gain any value from this.
This will still be true for all carp until AI changes are pushed, so
until then this isn't going to do very much for NPCs but might be a
small buff to player controlled carp (though those can all retreat to a
carp rift for a similar effect).

This also modifies a few "defence" procs which were either directly
setting HP or neglecting to call signals from a base proc, as they would
bypass triggering the effect. This should make them more reliable for
other things which rely on those signals too.

## Why It's Good For The Game

Gives an iconic creature some more unique behaviour than "moves directly
towards you and bites".
Gives visual feedback to some behaviour which has existed invisibly for
a long time.

## Changelog
🆑
add: All Space Carp will now start regenerating health after 6 seconds
of not taking any damage, until they're back to full health. This
behaviour was previously unique to mega carp.
/🆑
2022-11-23 09:40:59 -08:00
AnturK
84f69359a0 More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original
PR this fixes it.

Notable exceptions to the rule:
- Paths in add_verb/remove_verb, we need full path instead of a name
there to access verb metadata so we can't use proc ref macros there.
- regex.Replace, found out that it does not accept call by name. Instead
i added new REGEX_REPLACE_HANDLER so we can at least try to mark these.

There's still leftover global procs that do not use GLOBAL_PROC_REF but
they functionally equivalent so that's for later.

I don't see any reasonable way to grep for this. But if you got any
ideas please share.
2022-11-22 07:55:43 +00:00
MrMelbert
79ffefa06d Allows Fully Heal to be passed a series of flags, fixes Adminordrazine being horrible (#71123)
## About The Pull Request

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

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

## Why It's Good For The Game

Allows for more precise control over full heals. 

## Changelog

🆑 Melbert
refactor: Fully heal can be passed a series of flags. As a result, some
things which previously did a full heal might heal slightly less, or
some things which did partial full heals might do slightly more.
fix: Adminordrazine will no longer completely break every facet of a
person
admin: Ahealing a changeling will refill all of their chems.
/🆑
2022-11-17 10:09:00 -08:00