Commit Graph

533 Commits

Author SHA1 Message Date
Jacquerel
cf5c1fa08c Basic Space Dragon (#78979) 2023-10-14 15:53:28 -07:00
Jacquerel
41699c260e Goats will randomly attack you (#78930)
## About The Pull Request

We accidentally lost this behaviour when we converted goats to basic
mobs.
_Formerly_ (and now again) goats had a 0.5% chance per second to simply
decide to attack you for no reason at all.
While attacking you they also have a 10% chance per second to get bored
of doing that and stop.

Additionally, we were outputting a fluff message every time you attacked
a goat which would spam chat if you were trying to fist fight each
other. I added a 20 second cooldown onto it.

As is often the case, implementing this led me down a bit of a rabbit
hole.
We were previously bypassing faction checks via a mixture of flags on AI
behaviours and blackboard keys.
I have moved this _entirely_ to the blackboard now, rather than making
targetting subtypes just to skip faction checks.

This entails having one blackboard key which is "by default do we care
about factions?" and another which is "are we currently ignoring
factions for some other reason?"
Retaliatory AI will generally enable the second flag, so you can get
pissed off at someone you would usually not mind hanging out with if
they start something with you. Certain mobs which want to hunt other
mobs but not be hunted in return just ignore factions entirely all the
time and use the former.

The upshot of this is that the default behaviour for expected default
retaliatory AI shouldn't require you to set any specific kind of
targetting datum and will Just Work.

In a similar vein because I was touching largely the same mobs I made
the "flee when injured" component apply its "don't flee because not
injured" flag instantly upon application rather than needing to manually
set it in the blackboard definition, so that also Just Works.

## Changelog

🆑
fix: Pete's anger management training has worn off, and he will once
again sometimes pick a fight with you for absolutely no reason.
qol: Attacking a goat will not spam messages so frequently.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-10-13 00:27:21 -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
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
Jacquerel
6d59d8eb91 Hands management element (#78887)
## About The Pull Request

Places "setting up being able to use hands" into an element so it can be
easily applied to non-carbon mobs.

## Why It's Good For The Game

This is one of the last roadblocks for basic mob implementation and
people were intimidated by it but it turns out this shit is easy, 90% of
this code is already just on `living` and I put a little bit more there.
The element _really_ only handles stuff like dropping items on death,
picking things up rather than biting them, and adding examine text.

This also removes some copy/pasted code between `simple_animal` and
`carbon` and unifies some behaviours which were implemented for some
dextrous simple animals but not others.

Changes to give Ian a single hand representing his mouth will come at a
later date.

## Changelog

🆑
qol: You can now see what drones and gorillas are holding by examining
them.
admin: It's now easier to give handless mobs hands by applying the
"dextrous" element.
balance: Spiders and Bears can now climb railings (you know if... they'd
rather do that than destroy them).
/🆑
2023-10-10 15:27:12 -06:00
Jacquerel
ed907096e3 Fixes fleeing behaviour (#78821)
## About The Pull Request

This PR does three things:
- Fixes fleeing, I broke it in a recent PR so mobs would walk to a
location then sort of stand there doing nothing. This is due to using
`>=` instead of `>`.
- Makes lobstrosities stop running and charge at you more responsively
(when they detect they can charge).
- Inverts the `BB_BASIC_MOB_FLEEING` blackboard key to
`BB_BASIC_MOB_STOP_FLEEING` so that the default behaviour is "to perform
the behaviour that you put on the mob" instead of to not do that.

## Why It's Good For The Game

Makes commonly used behaviour work properly.
Removes footgun we hand to ai developers.

## Changelog

🆑
fix: Cowardly mobs will consistently run away from you instead of
getting tired and just sort of standing there after an initial burst of
movement.
/🆑
2023-10-08 23:27:31 -06: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
Jacquerel
5e2c8459dd Basic Heretic Mobs: The Rest of Them (#78757)
## About The Pull Request

Raw Prophet and Armsy had fun stuff going on and merited their own PRs,
but the rest of these guys are basically just statblocks with abilities
so I converted them all at once.

Rust Walkers are present in a ruin and so have new AI which will
actually use their abilities. They rust the area around where they spawn
and throw their rust blast at people.

I also gave Flesh Stalkers AI even though nobody has put them in a map
because I thought it would be cool. This adds an AI behaviour where if
they're not doing anything else they will turn into an animal and chill
until someone's been around them for a bit, before attacking. They will
also use EMP almost immediately upon performing their ambush, which
kills the lights in that room. Spooky!
To support this I needed to make some changes to let AI continue
processing and targetting correctly while shapeshifted.

I didn't give Maids or Ash Spirits AI because they'd be really boring.

Other changes:
I made the maid in the mirror flicker when it takes examine damage
because the `visible_message` says it does but despite having the power,
nobody made it actually flicker...

## Why It's Good For The Game

No more simple mob heretic summons.

## Changelog

🆑
refactor: Rust Walkers, Ash Spirits, Flesh Stalkers, and The Maid in the
Mirror now use the basic mob framework. Please report any unusual
behaviour.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-10-06 16:06:22 -06:00
Ghom
bbf81e637a [NO GBP] Fixes silent catwalks over otherwise silent turfs (open space, chasms) (#78742)
## About The Pull Request
Exactly what it reads on the tin.

## Why It's Good For The Game
Fixes #78646.

## Changelog

🆑
fix: Fixed silent catwalks.
/🆑
2023-10-06 13:33:21 +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
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
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
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
Ghom
1242bf98d1 [NO GBP] fixes crab walking (#78648)
## About The Pull Request
the sideway movement element isn't working as intended, because
apparently the client dir and not the mob's (which is always SOUTH) was
being sent with the signal, and the existence of the `turn(dir, angle)`
proc hadn't crossed my mind while I coded the element.

## Why It's Good For The Game
This fixes the above.

## Changelog

🆑
fix: Fixed crabs not correctly (kinda) walking sideway.
/🆑
2023-09-28 13:42:23 -06:00
san7890
b368687208 Turns Robot Customers into Basic Mobs (#78611) 2023-09-27 21:15:37 -04:00
Sealed101
1b483e7b28 Prevents moonicorns from placing fairy grass on space/chasm/lava/water turfs (#78368)
## About The Pull Request

Apparently space turfs aren't openspace. Who knew!
They already don't create bridges over openspace turfs, so no reason for
em to make space bridges either.

## Changelog

🆑
fix: fixed moonicorns making space/chasm/lava/water bridges with their
fairy grass
/🆑
2023-09-21 05:47:40 -04:00
Coconutwarrior97
7b9d3d5ce6 Holo para refund fix (#78431)
## About The Pull Request
Holoparasite injector can be refunded if its been used, this is because
the uplink_reimburse element is not removed from it when its used. Added
some signal code to it so that this is fixed.

## Why It's Good For The Game
Fixes a bug.

## Changelog

Fixes a bug allowing holopara injectors to be refundable when used. 

🆑
fix: Fixes a bug allowing holopara injectors to be refundable when used.
/🆑
2023-09-20 14:27:59 -06:00
jimmyl
4b73b37d60 Heretic Knock Path (#78108)
## About The Pull Request

other changes: GODMODEd mobs cannot receive embeds or bleed, admins can
now use the traitor panel to give heretics a focus

adds a new heretic path, the path of knock
its a path about opening shit and having access
wound opening included, and stealing
this is its award icon

![ascended](https://github.com/tgstation/tgstation/assets/70376633/01473bf2-5c44-4574-850c-83fb5db204fd)
its knowledge is as follows:

### A Locksmith’s Secret
starting knowledge, unlocks the key blade which also works as a crowbar


https://github.com/tgstation/tgstation/assets/70376633/3690232d-5687-4b0c-a9cc-b6374e7f1850

### Grasp of Knock
it literally just opens stuff (also makes a knocking sound)
unbolts bolted airlocks and opens them, opens locked closets, opens
mechas, logs you into consoles
(comms consoles are with barebones head-level access, no buying shuttle,
but hey you can shitpost over comms)
Sidepaths: Ashen Eyes, Codex Cicatrix


https://github.com/tgstation/tgstation/assets/70376633/8b890d69-ee03-4d12-99dd-dde7b4483cd4

### Key Keepers Burden
transmute a rod,wallet, and some id card to create an eldritch id card
(very original naming), the ID card used is not preserved
this ID card functions essentially as a superior agent card, using other
IDs on it makes it be consumed by the eldritch ID and have its accesses
and forms added into it, you can use it inhand to turn it into any of
the cards that were consumed
in addition you can hit two airlocks with it to link them together to
create portals under the doors, which has a green glow
going through the portal as a Heretic gets you to the other destination
going through as a nonheretic lands you in a random onstation airlock,
SM chamber included if youre unlucky
1 id card can only have 1 set of portals, making another destroys the
former set, one of the airlocks being destroyed also destroys them


https://github.com/tgstation/tgstation/assets/70376633/e96a518e-b35d-44aa-9a7c-8f2103feab6f

### Rite Of Passage
transmute a white crayon, a multitool, and a plank to create consecrated
lintel
heretics can use this cool looking book to create a 8 second shield that
knocks back any nonheretic that tries to pass
also its ranged


https://github.com/tgstation/tgstation/assets/70376633/036e0875-c422-433e-87b3-71328cb2bf8a

### Mark Of Knock
the mansus grasp will now mark its victim for like 10 seconds
marked victims are denied access by all objects, public airlocks
included


https://github.com/tgstation/tgstation/assets/70376633/6187ef36-30f4-4a92-af21-e5b288afb869

### Burglars Finesse
steal a random item from the victims backpack (or other storage item if
they dont have a backpack) and puts it into your hand
the victim will probably hear you and also gets a chat message about
this



https://github.com/tgstation/tgstation/assets/70376633/2529fa78-616d-4a46-ae18-3cb22efb1ab1

### Ritual of knowledge
this is nothing new i put this here to keep it in order

### Apetra Vulnera (sidepath with flesh)
the victim receives bleed wounds on every single bodypart that has more
than 15 brute
if they dont have a bodypart that has >= 15 brute they get a random
wound anyway so
side paths are: blood siphon and void cloak



https://github.com/tgstation/tgstation/assets/70376633/3c2cd21e-edbc-4956-8c2d-cd9a42b87f33

### Wave of Desperation (sidepath with flesh)
cannot be casted uncuffed with no bola, can be casted cuffed with no
bola, with a bola and no cuffs
adjacent mobs are knocked down, mobs are repulsed away, your cuffs and
bola are destroyed, and you gain a status effect that:
after 12 seconds makes you unconscious for 20 seconds
5 min cooldown


https://github.com/tgstation/tgstation/assets/70376633/da480921-d5dd-4b46-b2e8-0cf543640bf9

### Opening Blade
your blade has a 35% chance to cause a weeping avulsion on hit


https://github.com/tgstation/tgstation/assets/70376633/b6fd2837-6b0a-4a5a-bc7b-b9c3f7f715d1

### Caretakers Last Refuge
you can only cast this when not near sentient living beings
while in refuge you are invincible and near transparent, cannot use your
hands or spells
also immune to damage slowdown, being hit with a null rod cancels this
also if you lose your focus you get out of refuge


https://github.com/tgstation/tgstation/assets/70376633/f053cfd8-2a16-4195-8004-17df077983ca



https://github.com/tgstation/tgstation/assets/70376633/72330486-5273-4123-a108-b437b56120c4

### Many secrets behind the Spider Door (Ascension)
ritual needs 3 bodies without organs in their chest
when successfully performed you ascend and;
open a tear in reality (not the BoH one) which;
Polls all ghosts with sentient mob enabled to spawn and siege the
station, ghosts can interact with the portal to spawn as a random
eldritch mob
spawned mobs are loyal to whoever ascended and on examine can identify
their master
also fills the entire room with purple light

also the heretics opening blade is upgraded to a 65% chance, and they
gain Ascended Shapeshift which allows them to shapeshift into eldritch
mobs, and its not 1 choice only



https://github.com/tgstation/tgstation/assets/70376633/8d06286e-789d-442f-b33c-878d26deab07


## Why It's Good For The Game

its cool i think and an option for those wanting to steal and be sneaky
and stuff

## Changelog
🆑
add: heretic knock path and its respective items and award
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-19 19:07:51 +00:00
Zephyr
1b96345e44 Multi-Z Support for Lazy Templates | Cleans up some turf flag misuse (#77786)
## About The Pull Request

Adds multi-z support for lazy templates
Also fixes some improper use and placement for turf flags
## Why It's Good For The Game

Shadow needs/wants this for bit runner maps.
Turf flags are also why lava has been generating in places it shouldnt.
(inside of ruins)
## Changelog
🆑
fix: Lava can no longer occasionally generate inside of previously
loaded templates and breach and/or destroy shit
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-09-19 01:06:08 +00:00
Nick
9c7f618c58 Light eater can no longer eat space tiles (#78339)
## About The Pull Request
This PR makes it so that the nightmare's light eater can't eat space
tiles because well, it's space. The way I did it was just an explicit
check to exclude space tiles specifically, as I can't really think of
anything else it would apply to. Let me know if I should make it more
general. Doesn't use `COMPONENT_BLOCK_LIGHT_EATER` because as mentioned
by @MrMelbert, there's a lot of space tiles and that would be expensive
## Why It's Good For The Game
It's called light eater, not star eater. 
Fixes #78318
## Changelog
🆑
fix: The Nightmare's Light Eater can no longer suck the light out of
space tiles.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-09-18 22:20:57 +02:00
Tim
e11d1657ad [NO GBP] Fix barricade description element spam (#78351)
## About The Pull Request
In #69676 I added constructable wooden barricades that can be
constructed. I went overboard and added a `This looks like it can be
barricaded with planks of wood.` examine description to the element
without considering the implications that it would get spammed on many
objects. (windows, doors, etc.)

The description spam is unnecessary since we already have contextual
screentips telling people how to use wood to make barricades.

## Why It's Good For The Game
Less description spam.

## Changelog
🆑
fix: Fix wooden barricade description "This looks like it can be
barricaded with planks of wood" being spammed on objects.
/🆑
2023-09-18 19:38:46 +02:00
Jacquerel
257923e090 Synchronise AI and Player basic mob melee behaviours (#78337)
## About The Pull Request

I like for things that mobs do to be consistent regardless of whether
they are controlled by a player or by the AI.
One big offender of this is the melee behaviour cooldown. Basic mobs
piloted by AI have arbitrary melee attack cooldowns which are not
reflected when they are controlled by players who can generally attack
much faster (but in _two_ instances, slower).
To remedy this I added `melee_attack_cooldown` as a var on
`living/basic` (sinful) and the ai now uses NextMove to not click too
often, meaning that players can only bite things as often as the AI can
and also that if you VV the cooldown it can speed the AI up (or slow it
down) as well as a player.
This also gets rid of a lot of subtypes of that datum, as we mostly made
them to change the cooldown.

I also hunted down a few places where there was behaviour placed inside
an AI behaviour which wasn't easily replicable by a player piloting the
same mob, preferably a player should be able to do everything that the
AI can.
Fixing this was largely a simple case of moving code from
`ai_behaviour/melee_attack/perform` to `basic/mob_subtype/melee_attack`
and also adding an element for one thing shared by three different mobs.

Strictly speaking I didn't need the element that much because a player
is perfectly capable of clicking on something they attack to drag it,
but it's nice for it to be automatic?

## Why It's Good For The Game

If you see a mob do something then you should also be able to do it.
Mobs shouldn't have significantly different capabilities when controlled
by a player (aside from usually being smarter).

## Changelog

🆑
balance: Player-controlled basic mobs attack as fast as those mobs can
when controlled by the AI
balance: Player-controlled Faithless can paralyse people they attack,
like the AI does
balance: Player-controlled Star Gazers (if an admin felt like making
one) apply the star mark on attack and deal damage to everything around
them, like the AI does
/🆑
2023-09-18 18:10:05 +02:00
Jacquerel
4cf1f27451 Replace wall/indestructible/destructible typepath with mapping helper (#78365)
## About The Pull Request

#78239 is a fun mapping add but engineered in a way that 
1. Creates a real eyesore of a typepath
2. Would further proliferate a hundred subtypes if it became commonly
used

Instead of using subtypes for this I put the behaviour in a component
and made a mapping helper to apply the component.
Now you can just put the mapping helper on top of any turf you want to
make into a zelda bomb wall and it will be so, rather than having to
make different subtypes for walls with different icons.

## Why It's Good For The Game

Cleaner, more maintainable.

## Changelog

not player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2023-09-16 19:30:30 +02:00
Jacquerel
bd9544012a Removes some food initialize arguments (#78322)
## About The Pull Request

A prior PR added some new initialize arguments to the food subtype which
did not strictly need to be there, this caused a large number of bugs as
a result of places which already had extra initialize arguments not
correctly accounting for these new ones.
As a result I have removed these again in favour of performing the
required operations in a different way (one of these arguments was
seemingly used for butter purity and literally nothing else), for this
food and also some of its subtypes.

In some other cases where it _did_ make sense to have arguments in
`initialize` I also added them to `new` so they can be passed by name.

This will hopefully make the food more maintainable if in the future if
someone does something similar, and solve any remaining bugs related to
"not passing the arguments properly".

## Changelog

Hopefully not player facing
2023-09-15 16:42:50 +02:00
nikothedude
009af8c2ce [TEST-MERGE FIRST] Wound refactor number two: Full synthetic support (#78124)
## About The Pull Request

Heavily refactors wounds AGAIN.

The primary thing this PR does is completely change how wounds are
generated and added - while the normal "hit a guy til they bleed" stuff
works about the same, asking for a specific type of wound, say, like how
vending machines try to apply a compound fracture sometimes, isnt going
to work if we ever get any non-organic wounds, which the previous
refactor allowed.

With this PR, however...
* You can now ask for a specific type of wound via
get_corresponding_wound_type(), which takes wound types, a limb, wound
series, etc. and will try to give you a wound fitting those
specifications - but also, a wound that can be applied to a limb.
* This will allow for a vending machine to apply a compound fracture to
a human, but a collapsed superstructure (assuming my synth wounds go in)
to a robot

There are now new "series types" and "wound specific types" that allow
us to designate what series are "mainline" and randomly generatable, and
what are "alternate types" and must be generated manually - you can see
the documentation in wounds.dm.

The behavior of limping and interaction delays has been abstracted to
datum/wound from bone wounds to allow just, general ease of development

Pregen data now allows for series-specific wound penalties. Example: You
could set a burn wound's series wound penalty to 40, which would make
wound progression in the burn category easier - but it would not make it
any easier to get a slashing wound. As it stands wound penalties are for
wounds globally

Scar files are now picked in a "priority" list, where the wound checks
to see if the limb has a biostate before moving down in said list.
Example: Wounds will check for flesh first, if it finds it - it will use
the flesh scar list. Failing that, they then check bone - if it uses
that, it will use the bone scar list. This allows for significantly more
modular scars that dont even need much proc editing when a new wound
type is added

Misc changes: most initial() usage has been replaced by singleton
datums, wound_type is now wound_types and thus wounds can accept
multiple wound types, wounds can now accept multiple tool behaviors for
treatment, wounds now have a picking weight so we can make certain
wounds rarer flatly,

This PR also allows for wounds to override lower severity wounds on
generation, allowing eswords to jump to avulsions - but in spirit of
refactoring, this has been disabled by default (see pregen data's
competition_mode var).
## Why It's Good For The Game

Code quality is good!

Also, all the changes above allow wounds to be a MUCH more modular
system, which is one of its biggest problems right now - everything is
kinda hardcoded and static, making creative work within wounds harder to
do.

## Changelog
🆑
refactor: Refactored wounds yet again
fix: Wounds are now picked from the most severe down again, meaning
eswords can jump to avulsions
fix: Scar descs are now properly applied
/🆑
2023-09-09 19:20:21 -04:00
Jacquerel
5dddedf340 Collected food fixes (#78190)
I went through the code and tried to find all of the remaining places we
forgot to update the arguments passed into `item/food/Initialize` after
more arguments were added to it, because there were a couple and they
caused things to stop working.
Most notably, golems were unable to eat anything because nothing would
correctly spawn "golem food".

_Additionally_ we were using a bunch of named arguments in new whenever
crafting or cooking food. This runtimed, causing the food not to init
properly.
_On top of that_ a late code review on a recent PR processed a list into
a string_assoc_list twice causing it to become null.

Finally, we were trying to check the food preferences of examining
ghosts or dogs or other non-human mobs. We shouldn't do that.

I also added a unit test for moth and golem food in the hopes that we'll
notice them breaking.
2023-09-09 12:39:42 +00:00
Bloop
86f0eaab3a Fixing this dead mouse related harddel (#78150)
## About The Pull Request

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

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


![image](https://github.com/tgstation/tgstation/assets/13398309/fab09657-12e8-4fb8-9e84-05ef48c9d55e)

When the foodening added some args to the constructor of
`/obj/item/food` some instances of the constructor being passed stuff
got overlooked and were not updated.

This resulted in a mob ref potentially being passed in to
`starting_reagent_purity` in some cases, ultimately resulting in this
harddel.

@SyncIt21 this is exactly the reason I was being so paranoid with #77946
the other day. Tracking constructor uses down can be such a pain when
they aren't prefaced with a type, and are almost guaranteed to get
overlooked during refactors if the compiler does not say anything about
it.

I hate DM.

edit: and I just tested this only to find a second bug with the ice
cream. I can confirm that it is in fact working now after fixing that
one too.

<details><summary>evil ice cream</summary>


![image](https://github.com/tgstation/tgstation/assets/13398309/46cd85cd-1051-46d9-9642-0275af098dbe)

</details>

## Why It's Good For The Game

Fixing a harddel that was causing many CI failures

## Changelog

🆑
fix: fixes creamatorium not producing any suspicious ice cream, and
fixes a dead mouse related harrdel
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-07 19:33:16 +01:00
Ghom
2563528d89 GAGS, recolorable and actually glowing glow shoes. (#78071)
## About The Pull Request
I've converted the gags_recolorable component into an element (it has no
var of its own) and the glow shoes icons to greyscale, added emissive
icon states for the shoes, both for its own sprite or when worn, and the
ability to recolor them with a spraycan (tbh a lot of clothing should be
recolorable with a spraycan in general but that's beyond the scope of
this PR)

Oh yeah, if you examine an item with the gags_recolorable element twice,
it now tells you can use a spraycan to recolor it.

## Why It's Good For The Game
They are called glow shoes yet don't glow, and the supposed glowing
stripes only come in a single flavor of blue. Truly the definition of
lame.

Overall, it looks as goofy as ever: I didn't put much effort into the
grayscale icons beyond the necessary:

![proofthatitworks](https://github.com/tgstation/tgstation/assets/42542238/93aa7701-122d-4214-a890-7f69df3cb309)


## Changelog

🆑
image: The glow shoes from the ClothesMate now actually glow and can be
recolored, even with a spraycan.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-09-07 14:11:32 -04:00
Sealed101
1bd5635a61 mob_transformation_simple sends a COMSIG_MOB_CHANGED_TYPE signal, letting content_barfer mobs spit things out (#78093)
## About The Pull Request

Title; also makes bileworm devour message have a warning span.
~~it's a bit cheeky but i didn't want to add a deletion signal to the
content_barfer's signal list, and the wabbajack signal here kinda makes
sense?~~

## Why It's Good For The Game

Fixes #76791

## Changelog

🆑
fix: fixed bileworm evolution deleting anything they devoured; they will
now eject their contents upon evolution to vileworms
/🆑
2023-09-04 17:23:05 +01:00
Bloop
69f51c6c65 Fixes typo 'transfered', olive oil reaction repath (#78064)
## About The Pull Request

Transferred.

## Why It's Good For The Game

How did this get to be in 71 files?! This bothers me.

Also changes 'quality_oil' typepath in the reactions to 'olive_oil' to
match its rename post-foodening.

## Changelog
N/A
2023-09-02 18:23:18 +01:00
Andrew
b1c5e5e0f6 Foodening (#77887) 2023-08-31 14:57:19 -04:00
nikothedude
554edc60e9 [TEST-MERGE FIRST] Allows all limbs to be dismembered and significantly refactors wounds (#77813)
## About The Pull Request
**_THIS PR UPDATES THE SCAR VERSION - ALL EXISTING SCARS WILL BE
WIPED_**

Expands the wound system functionality to support any type of limb at
all.

To do this, wounds have been significantly refactored. For starters,
wounds now use limb biotype instead of wound type for determining what
they can be applied to. They also use singleton instances for most "can
we apply this" checks instead if copy pasted initial().

Wounds now use a "wound series" instead of wound_type for determining
the, well, series. Previously, all WOUND_BLUNT wounds were considered
bone wounds, making it impossible to have multiple WOUND_BLUNT wounds at
once. Now, its based on wound series - bone wounds are of the blunt bone
wound series, and use the typical logic.
One change that results from this is the ability for everything with a
jointed limb to get a dislocation. Yes, this includes things like
prosthetics.

On the note of external and internal biotypes: Exterior are bones,
Interior is flesh. Interior protects exterior from slash until its
mangled, at which point it either exposes exterior to slash or allows
dismemberment if theres no exterior.
Basically - it acts the exact same way, except its not hardcoded, and
its more modular.

A lot, lot more changes were made - I cant name them all, but if youre
interested, you can read up. Wounds have more procs, more
modularization, and less hardcoding.

Sadly, scars have been updated in such a way so that the wound version
must be updated. Scars will be deleted.

## Why It's Good For The Game

As it stands, half the limbs in the game can't be dismembered. This
changes that, allowing every single limb to be dismembered.

The two dismemberment critera are now:

1. If able to get mangled flesh or bone, it can be dismembered once it
gets mangled flesh and bone (or JUST flesh if it only has a internal
biostate, vice vers afor bone if external only)
2. If it cant be dismembered by the above, it will have a chance to
dismember when at or above 80% of its total max damage

Finally, code being better is usually a good thing.

## Changelog
🆑
balance: Prosthetics and slimepeople can now have limbs dismembered
balance: Slimepeople can now receive slash wounds, but cannot bleed
balance: Most limbs can now be dislocated
refactor: Scar backend reworked, scars will be wiped as they update to
the new format
/🆑
2023-08-29 21:00:36 -04:00
Jacquerel
a6c66a098d Progress bars & cleaning particles will centre on the tile occupied by large icon objects (#77940)
## About The Pull Request

Do_after bars always draw based on the top-left corner of the targetted
atom, for atoms with sprites that are larger than 32x32 this gives them
a weird offset instead of being centred, which bugs me.
I have tried my best to figure out a way to reverse this which does not
interfere with atoms which use pixel_x/pixel_y to visually appear to be
on a different tile.

## Why It's Good For The Game

Before:

![image](https://github.com/tgstation/tgstation/assets/7483112/a1127695-58fa-40fc-aa0a-6bc8a0589e74)
he hates how you missed him completely 😦 

After:

![image](https://github.com/tgstation/tgstation/assets/7483112/deb4fbb8-e286-46b4-84a7-82b65b4f1eee)
now you're cleaning his feet 🙂 

## Changelog

🆑
image: progress bars and cleaning particles are now centered on the tile
occupied by the target, if it is a big sprite
/🆑
2023-08-28 17:18:40 -06:00
carlarctg
4d8ff1f215 Fixes some heretic bugs (?) (#77611)
## About The Pull Request

Items worn on a void cloak's suit storage are no longer visible on the
stripping menu.

Heretic influences protect the turf below them from leaving scannable fingerprints.
2023-08-28 18:59:23 +00:00
FlufflesTheDog
7941c0c26f Makes it easier to place tiles on multi-z holes (#77935)
## About The Pull Request
Adds the "open space click handler" to tile stacks, which makes it so
you don't have to pixel hunt for a turf on the BELOW z level in order to
fix a hole.
This exists on rods and rpds since they're often used to fix holes.
But wasn't added to tiles when they were made to be able to fix holes
directly, without rods.

Additionally, closes #77540 by having the open space click handler loop
up z levels so that it works if you're clicking on items from multiple z
levels away.
## Why It's Good For The Game
The current behavior can be very frustrating to work around, and appears
to not be intended.
## Changelog
🆑
fix: Made it easier to place tiles on multi z level holes 
/🆑
2023-08-28 05:01:03 +02:00
Bloop
7aa4a6d79b Fixes runtime when firing arrows at non-carbon mobs (#77942) 2023-08-27 11:24:23 -04:00
Bloop
1bfee08d54 Fixes greyscale colors not updating when changing their colors via VV, and fixes some issues with accessories (#77806)
## About The Pull Request

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

This fixes a few bugs and cleans up code a bit:

1) Greyscale colors that were changed via the VV modify greyscale menu
will now update the mob's worn clothing accordingly. It wasn't doing
this before. Accessories in particular needed a bit of extra work to
update in this way because it wasn't coded with this case in mind.

2) Accessories will call `equipped()` and `dropped()` when they get
added/removed. This will fix issues like item flags being incorrectly
set, action bars not being added, etc.

3) Accessories will now be returned by `get_all_gear()`. This will
probably fix a few issues I'm not aware of.

## Why It's Good For The Game

<details><summary>Works</summary>


![dreamseeker_xijzQB0ALa](https://github.com/tgstation/tgstation/assets/13398309/eccb35d5-e1ea-4e2c-9906-f5b8c2187d24)

</details>

<details><summary>get_all_gear()</summary>


![dreamseeker_WsG0Uu2tIe](https://github.com/tgstation/tgstation/assets/13398309/d5c272d4-1990-454c-b48f-4da7b6a5f859)

</details>

<details><summary>get_equipped_items()</summary>


![dreamseeker_qe4hMngAO3](https://github.com/tgstation/tgstation/assets/13398309/06469b93-2a58-49db-be7f-c748576bf481)

</details>


<details><summary>item_flags get set now, hopefully preventing future
issues related to that</summary>


![image](https://github.com/tgstation/tgstation/assets/13398309/29a0e25a-a88f-4547-99f8-888da6b85e4d)

</details>

## Changelog

🆑
fix: greyscale colors will now update on the mob when modifying them via
the VV menu
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-26 20:47:59 +02:00
John Willard
ef352ca731 minor changes to living and mob vars (#77820)
## About The Pull Request

Renames m_intent to move_intent and moves it to the living level
renames tod to station_timestamp_timeofdeath
removes stun_absorption and see_override as one was unused and the other
was never actually implemented

## Why It's Good For The Game

Many vars on the mob and living level were intended to be on the living
and carbon level, but weren't for one reason or another. Generally it
was out of laziness to ensure the mobs being checked for these vars were
the intended mobs, and there's some todo comments on how they want it
changed in the future, though it never happened.
I'm hoping to get these all down in the future, I originally wanted to
move ``stat`` from mob to living but it had hundreds of errors so I
didn't want to do it all here.

## Changelog

Nothing player-facing.
2023-08-26 02:24:15 +01:00
Ben10Omintrix
e49fe76180 fixes regal rats not running away (#77888)
## About The Pull Request
fixes the regal rat not running away from whoever attacked him. also
adds a new pet command behavior which makes the king's minions drop
whatever they are doing and defend their king from whoever has attacked
him.

## Why It's Good For The Game
the rats now behave right

## Changelog
🆑
fix: regal rats now run away from whoever attacked them
add: new pet behavior which makes pets defend their owners if they got
attacked
/🆑
2023-08-24 17:51:15 -06:00
Ghom
a3522c6c38 Miscellaneous fishing code changes. (#77739)
## About The Pull Request
This PR contains a few changes that I hadn't got to do earlier,
including: different pressure / air mixture thresholds for different
fish (if amphibious), fish being able to be fed directly without the
need of an aquarium, replacing the `available_in_random_cases` variable
with a weight define of value 0, the preset fishing sources global list
so we don't have to manually instantiate lazy fishing spots and assign
them stupid string defines, chasm detritus made into datums, a couple
balloon alerts and removal of unused code.

## Why It's Good For The Game
The fishing portal generator UI is unused, the perfect variable for the
fishing minigame is also unused.
There's no reason for chasm detritus to be an item instead of a datum.
It isn't a map spawner.
Chasm chrabs, if given the amphibious trait, should be able to survive
Lavaland/Icemoon's atmosphere.
I don't even know why I made a snowflake proc to instantiate the
evolutions global list instead of `init_subtypes_w_path_keys`
The shiny lover and wary fish traits were actually making the minigame
slightly easier.
The background icons for the UI had a zero-alpha, one pixel thin stripe
on top that needed to be colored.
Improved `fish_source/proc/dispense_reward`.
Some doc comments and a typo or two.

## Changelog

🆑
add: You can now feed fish with the can of fish feed without having to
put the fish in a aquarium first.
balance: Some fish may survive in different, harsher atmospheres if
given the amphibious trait, like chasm chrabs on lavaland.
qol: aquarium now uses balloon alerts when feeding fish.
fix: The wary and shiny lover no longer incorrectly remove difficulty
from the minigame if conditions aren't met.
/🆑
2023-08-21 13:41:05 +01:00
Timberpoes
2d4d23dbf1 Replaces the poster and graffiti objectives with assault and early steal & destroy ones. (#77029)
## About The Pull Request

With the blessings of @Watermelon914 I am removing the two objectives
for placing posters and spraying graffiti.

These old objectives are not dead. Their items have moved to the
Badassery section of the uplink.

A box of 3 demotivational posters can be bought for 1TC with 0 rep.
The spraycan can be bought for 1TC with 0 rep.

In their place comes one new objective and one extended objective.

The new objective is Assault a Crewmember. This objective requires you
to attack the specified target 2-5 times (random on objective
generation). It tallies from any attack that filters through the
`/datum/element/relay_attackers` element and has an "attacker"
associated with it.

Although it asks you not to kill the other player, it doesn't fail if
you kill them.

I have expanded the low-risk theft objectives with items like a mime
mask, lawyer badge and a fake moustache (commonly on cooks).

Finally, I've added a very low level set of steal-and-destroy objectives
aimed at some items that will require a bit of basic breaking and
entering, and the destruction of which may hurt crew morale.

```
/datum/objective_item/steal/traitor/donut_box
/datum/objective_item/steal/traitor/rpd
/datum/objective_item/steal/traitor/space_law
/datum/objective_item/steal/traitor/granted_stamp
/datum/objective_item/steal/traitor/denied_stamp
/datum/objective_item/steal/traitor/lizard_plush
/datum/objective_item/steal/traitor/moth_plush
/datum/objective_item/steal/traitor/insuls
```

This PR also fixes clown shoes missing a proc override to allow them to
actually register as a theft objective.


![image](https://github.com/tgstation/tgstation/assets/24975989/775d46cf-f40a-43e5-9bf1-3aa4a31d436e)

![image](https://github.com/tgstation/tgstation/assets/24975989/66c77815-1f2b-4dfb-99c6-b8f2e0061654)

![image](https://github.com/tgstation/tgstation/assets/24975989/85d3878a-c598-4ec0-9bb1-920380a004c6)
## Why It's Good For The Game

Basically my discussion with Watermelon focused on the idea that the
graffiti and poster objectives weren't really crimes. They baited
antagonists into very passive play early-game.

These new replacements encourage a more antagonistic playstyle. Starting
fights plus B&E are two bread-and-butter play paradigms for antaggery.

Giving a few early game theft + destroy options with a mix of impactful
items (like insuls and RPDs) versus more symbolic or emotive items
(plushies, donut boxes, Cargonia stamps) gets antagonists out and about
in the station, warming themselves up.

And having an objective to assault players (even if you don't kill them)
allows cheeky antags with a penchant for shittery to start fights with
players and start genuinely impacting the shift, involving sec and
drawing players into their antaggery.

Both of these natually ease players into the more substantive theft and
murder objectives.

The existing spray and posters are actually thematically super cool.
Traitors now have even more access to them since they can be bought for
1TC per spraycan/3-pack of posters. This lets antags with TC to spare
run gimmicks around them and adds extra fun to the Badassery section.
## Changelog
🆑
del: Traitor objectives to place posters and graffiti the station have
been removed.
add: The items associated with the poster and graffiti objectives can
now be purchased from the Badassery section of the uplink. The posters
come in a box of 3 for 1TC, and the spraycans are 1TC each.
add: Adds a new Assault traitor objective, requiring you to the attack
the target a few times without needing to kill them. Earn TC and
reputation by starting barroom fights and bait players into escalation
battles for fun and profit.
add: Expands low-risk steal objectives to include the Chef's fake
moustache, Lawyer's badge, and Mime's mask.
add: Adds brand new shift start Steal & Destroy objectives for early
breaking and entering. Smash your way into a sec checkpoint to grab a
Space Law book, engineering to grab some insulated gloves or the psych
office to kidnap their moth plush.
fix: Fixes an issue where the steal clown shoes objective would never be
valid.
/🆑
2023-08-21 13:00:19 +01:00
Ghom
54491a67e9 Fixing embedding for projectiles. (#77674)
So, the main issue was that the variables for the embed element wouldn't
set when attached to a projectile but only on items for some
insignificant reason, which means it'll spawn the shrapnel yes, but
won't embed it since the chance is null/zero. I read the code over and
over and over with the assumption that something like this wouldn't have
been done, yet it was.

As for the secondary issue, because of how embedding works, the casing
types of arrows and harpoon aren't spawned when hitting a non-carbon or
reaching their maximum range. So, I'm re-enabling the reusable arg/var
for the caseless component of harpoons and arrows, and modifying the
`projectile_drop` to not drop their payload if the embedding component
would already do that, so we avoid duping.
2023-08-20 16:40:03 +00:00
necromanceranne
c8266cf0a2 Settler Quirk: Tame the Outdoors! Have trouble with tall shelves... (#77654)
## About The Pull Request

Adds the Settler quirk. This gives you bonuses to taming animals and
fishing, as well as making you gain hunger slower than others.

However, you are quite a bit slower than most people, and have trouble
with vaulting objects. You do, however, suffer significantly less from
equipment slowdown. (to the point that it is almost zero)

Settler riders are faster on their mounts than others if they're at
least sane. They start to slow down if they're less sane.

You are also shorter than most people. 

<details>
  <summary>Typical Settler encounters the typical Spacer</summary>
  

![Dr_Xr1nU0AAMsSE](https://github.com/tgstation/tgstation/assets/40847847/86ed4947-de5f-4bdf-a8ae-521dc7c30662)
  
</details>

## Why It's Good For The Game

I wanted to add a lightweight quirk that was kind of the 'opposite' of
Spacer, but a little more focused on interacting with elements of the
game world that would enjoy some attention. So, I thought 'what about an
outdoorsman quirk?'

So, I based it around being from people who lived out on the rim, under
unideal circumstances (and probably heavier gravity than Earth), and
taming the land. The slower movespeed encourages finding an animal to
tame that you can ride, and the bonuses to taming should help make that
a bit easier. The other additions just made sense for someone living it
a bit rough in the wilderness.

Having a bunch of settlers taming cows and riding around on them all
shift just kind of sounds hilarious to me.

## Changelog
🆑
add: Settler quirk! Conqueror the great outdoors....in space. Just make
sure nobody asks you to get anything from the top shelf.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-17 12:09:08 -06:00
Ben10Omintrix
71f8560d7b mega arachnid basic monster (#77601)
## About The Pull Request
the mega arachnid is now a basic monster. he is a very tricky and
opportunistic creature he will plan his attacks carefully and only
attack the weak. he will first try to throw fleshy legcuffs at his
victims, if the victim becomes cuffed he will move in to attack him,
otherwise he will run away from him while trying to throw restraints at
his legs. while he is running away he will also release slippery acid to
slip his prey. also when he is looking for his prey, he will be
transparent for more stealth. after he finds his prey the transparency
will wear off. he is also a very stealthy creature, he will break any
lights and cameras near him and he can also climb trees to hide in them
while he is looking for a victim.

## Why It's Good For The Game
add more combat depth for the mega arachnid

## Changelog
🆑
refactor: the mega arachnid is now a basic monster ,please report any
bugs
feature: the mega arachnid now have an ability to slip victims
/🆑
2023-08-16 13:05:29 -06:00
Bloop
415e1e7035 Fixes a bug with the immerse element (#77585)
## About The Pull Request

What it says on the tin. This runtime was caught downstream in an away
mission unit test where a mob is placed in a water turf.


![image](https://github.com/tgstation/tgstation/assets/13398309/8123321d-8bf4-4186-a63d-944080ad9f8a)

Basically the immerse overlay wasn't being added the very first time it
was created, because it wasn't being returned by
`generate_vis_overlay()`. Derp.

It went unnoticed because the overlays are cached and so every
subsequent `add_immerse_overlay()` works fine. And I guess upstream
doesn't have any mobs that spawn in water during tests so it was never
caught.

Also stops `on_init_or_entered()` from needlessly being called twice in
the case of a movable atom in water being initialized before the water
turf. The signal `COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON` already
sees to that.

## Why It's Good For The Game

Fixes a bug

## Changelog

🆑
fix: fixes immerse overlays not being added the first time a mob enters
a water turf
/🆑
2023-08-14 16:07:27 +08:00
Jacquerel
e150104d13 [no gbp] Dump consumed mobs when shapeshift effect ends (#77574)
## About The Pull Request

Fixes #77536
When you stop being shapeshifted we delete the mob you were previously
transformed into, which obviously also deletes everything in its
contents. If that mob can eat other mobs it deletes those mobs too.
We have an element "content barfer" which resolves this, I have made it
register to the "unshapeshift" signal to trigger dumping the contents
too, and added it to some mobs which were missing it.

## Why It's Good For The Game

Players were surprised by consuming player corpses after transforming
into a gelatinous cube and thus permanently deleting them.

## Changelog

🆑
fix: If you shapeshift into a mob which can eat things such as player
corpses, those things will fall out when you stop shapeshifting
/🆑
2023-08-13 14:45:54 -06:00
Jacquerel
29c3d38c7e Give basic mob ranged attacks a cooldown (#77575)
## About The Pull Request

Atomised change from a different PR I am working on.
This changes the basic mob ranged attacks element into a component so
that it can also track an attack cooldown on the mob, preventing it from
firing until the cooldown is complete.
This was possible with simple mobs but wasn't kept going forwards when
converting things to basic ones.

## Why It's Good For The Game

Ideally player and mob behaviour should be unified as much as is
realistically possible. Currently mobs which are designed to fire a
powerful weapon slowly can blast as rapidly as the click cooldown if
placed under control of a player, which is not ideal.
This isn't currently aligned for melee attacks either but I will look at
that later.

## Changelog

🆑
fix: Player-controlled basic mobs with ranged attacks can now only fire
about as fast as AI-controlled ones.
/🆑
2023-08-13 14:39:47 -06:00
san7890
8e08a38cfb Unit Tests for AI Planning Subtrees not having required element/component (#77539)
## About The Pull Request

Hey there,

I've personally fallen for this stupid thing twice (in #77503 and #75627
(d3575161ca)), so I decided to spend a few
hours to crack out a unit test to ensure that I (and no one else) falls
for this stupid thing again.

Let me know if there's a smarter way to code something like this, but I
couldn't figure out a better way to accomodate the current framework and
be as agnostic to certain oddities as possible.
## Why It's Good For The Game
Catches stuff like this:

```txt
[2023-08-11 21:10:04.019]     FAILURE #1: The mob Garden Gnome does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #2: The mob the morph does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #3: The mob the guard spiderling (946) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #4: The mob the ambush spiderling (255) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #5: The mob the scout spiderling (375) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #6: The mob the flesh spiderling (337) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #7: The mob the hunter spiderling (869) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #8: The mob the nurse spiderling (629) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #9: The mob the tangle spiderling (19) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #10: The mob the broodmother spiderling (855) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #11: The mob the viper spiderling (519) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #12: The mob the tarantula spiderling (963) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #13: The mob the spiderling (100) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
```

(ignore the part about gnomes and morphs, this was an earlier version of
the unit test. everything else was relevant and is fixed)
## Changelog
🆑
fix: Growing spiders will now retaliate against you like they were
always meant to.
/🆑
2023-08-12 23:08:43 +01:00
die_amond
6977b041b7 Adds hauntium as a reagent with new fun uses. (#77471)
## About The Pull Request
Adds the material hauntium as a reagent, along with bringing some unique
effects with the reagent.

There are a few new ways to get it other than just the camera obscura as
before, such as grinding certain ghostly things.

Unique effects it brings:

- It works in metalgen (I believe the metalgen recipe is still broken as
of making this) to make hauntium infused metalgen.


https://github.com/tgstation/tgstation/assets/58376695/121ca6b2-00b7-4203-bc6a-48976b1af802


- Any object touched by the chem will temporarily have the haunted
effect, letting it teleport around randomly and even attack people.



https://github.com/tgstation/tgstation/assets/58376695/103aeee5-ed3e-4fdd-85e4-ac7338823c46


- If you put it in your body, it hurts your "soul" (soul being heart and
mood)

![image](https://github.com/tgstation/tgstation/assets/58376695/34182a4c-face-4fe7-b170-a7b10122a14d)
...unless you are morbid or undead, in which it gives a slight mood
boost and acts like an addiction-less drug
## Why It's Good For The Game
Hauntium previously was super niche and not very useful other than
making funny haunted toolboxes from it. This expands it's usage and
makes it a lot more interesting. I also know a good few people who have
also wished this was available to use in metalgen and now you can!
## Changelog
🆑
add: Lets you grind things into a hauntium reagent which works similarly
to the solid form but is versatile and has some unique effects.

/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-12 03:35:19 +02:00
LemonInTheDark
a803b21a6c Adds Source Count Macro (#77519)
## About The Pull Request

I prefer this to having people manually read the list, plus it seems
like reasonable information to expose, especially if we're gonna start
using it in this pattern.

## Why It's Good For The Game

Less futzing with internals
2023-08-11 20:40:15 +02:00