Commit Graph

108 Commits

Author SHA1 Message Date
Jacquerel
517d33e6f0 Basic blob mobs (#78520)
## About The Pull Request

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

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

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

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

## Changelog

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

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-09-26 15:28:26 -06:00
tattle
2a73427ee0 Add new sounds for animals, basic animals make sound on audible emote (#78499)
## About The Pull Why It's Good For The Game Request
More sound immersion. Also just makes sense for sounds to play when an
animal is both saying something and using an audible emote.

Crab click: https://freesound.org/people/JarredGibb/sounds/263882/
Chitter: https://freesound.org/people/ForSoundDesign/sounds/687302/
Chicks: https://pixabay.com/sound-effects/chicks-very-young-56075/
Chicken: https://freesound.org/people/Breviceps/sounds/456803/


https://github.com/tgstation/tgstation/assets/66640614/29cd4e8e-b9c3-4f71-be0d-8c3f3de40eba


https://github.com/tgstation/tgstation/assets/66640614/9a24c1a8-0707-43ad-adec-b7ce1eddb5f6


https://github.com/tgstation/tgstation/assets/66640614/21cc37ae-c49c-461a-83c5-271f6d577fc6

## Changelog
🆑 tattle
qol: Basic animals now make sounds for audible emotes
sound: Added new sound effects for chicks, chickens, crabs, and insects
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2023-09-25 15:55:16 -06:00
jimmyl
cf5360acd8 [no gbp] fixes blackboard speech error (#78551)
## About The Pull Request

i changed initial to list()

## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/70376633/4c289c2e-8974-4c4e-9d91-f2502134165d)

## Changelog
i dont think runtimes are playerfacing

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-09-25 09:23:47 -04:00
jimmyl
5db7992b09 basicmob clowns (#78448)
## About The Pull Request

this is a mostly 1 to 1 port of simpleanimal clowns to basicmob clowns
this means they have 1 more brain cell
and they waddle



https://github.com/tgstation/tgstation/assets/70376633/0c5f01c7-fea2-4d8c-9fc1-764c1557e1b8



## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/70376633/f92c85ea-33f2-4cf3-858f-103c0958ff97)

## Changelog
🆑
refactor: clowns are basicmobs now
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-23 14:46:11 +00:00
Jacquerel
b2ecd81be4 Basic Mob Brimdemon (#78424)
## About The Pull Request

Fixes #71330

The brimdemon was basically already perfect (well, it has a novel means
of attacking) so I didn't get too fancy with this one, it's _largely_
just a straightforward conversion.
Following this change it's a little slower to back off, but better at
lining up with people in order to blast them. Additionally, its beam is
now a mob ability so you can give it to other mobs if you so desire.

Because I can't help doing a _little_ tinkering, Brimdemons now explode
2.5 seconds after they die, after a brief warning animation.

## Why It's Good For The Game

Simple mobs must die

## Changelog

🆑
add: Brimdemon corpses release an explosion shortly after death, just to
keep you on your toes.
refactor: Brimdemons now use the basic mob framework which (should)
improve their pathfinding somewhat. Please bug report any unusual
behaviour.
admin: The brimdemon's beam ability can be given to any mob, for your
Binding of Isaac event
/🆑
2023-09-22 19:12:43 -06: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
Ben10Omintrix
e44fea3964 fix basic mobs retaliate target not filtering targets (#78359)
## About The Pull Request
basic mobs retaliate targeting would try to target players that they
cant attack anymore,

## Why It's Good For The Game
fixes basic mobs retaliate targeting would try to target players that
they cant attack anymore,

## Changelog
🆑
fix: basic mobs retaliate targetting now selects targets they can attack
/🆑
2023-09-17 18:39:08 -06:00
Jacquerel
e11b69f2e6 Removes watcher overwatch ability (#78292)
## About The Pull Request

Removes the "overwatch" ability from Watchers, allowing them to use
their "look away" ability at any health threshold instead (but only if
it's been fighting you for at least 5 seconds or if you attack it).
Drops the cooldown on the gaze a little bit to compensate.

Also fixes some weird behaviour I noticed while testing:
- It won't cancel its own ability by trying to back away from you.
- It will look at you when it shoots you.

## Why It's Good For The Game

I was cooking too hard with this one.
- Two abilities overcomplicates what are supposed to be a pretty simple
mob you fight in packs.
- It wasn't obvious what you were actually supposed to do when
targetted.
- Doing it wrong could be very punishing in groups.
- Doing it _right_ was still kind of unexciting.

This is an ability to give to an elite, not a random trash mob.

## Changelog

🆑
balance: Watchers will no longer put you at gunpoint.
/🆑
2023-09-15 16:28:07 +02:00
Jacquerel
72174845f5 Basic Watchers & Basilisks (#77630)
## About The Pull Request

This one is a double feature because Watchers and Basilisks share the
same typepath. You might see a couple more of those.
As is tradition I decided to fuck with them rather than just port them.
Here's what's up.

**Basilisks**

![image](https://github.com/tgstation/tgstation/assets/7483112/9e4b0115-65dd-4df7-b62a-21c7be8549bf)

![image](https://github.com/tgstation/tgstation/assets/7483112/59162e68-7d73-4659-9531-5078ff751228)

- Have a new soulless sprite which looks less like a living blue hedge.
- Walk at you and shoot you while you are not in range (just like
before).
- Become supercharged if they become "heated" by lava, lasers, or
temperature weapons. This was a feature they also previously had but
they would never encounter lava, so now it also works if you use the
wrong gun on them.
- Lose their supercharge if you cool them down.
- Otherwise pretty normal mobs.

**Watchers**

https://www.youtube.com/watch?v=kOq_Bf78k5A
Here's a traditional video of me intentionally getting hit by mechanics
(trust me its definitely on purpose)

- They glow emmissively a little bit so you can see them from further
away.
- Their eyes light up about 0.5 seconds before they are able to shoot at
you.
- No longer melee attack, instead try to stay out of melee.
- Will occasionally put you into "Overwatch", meaning they will shoot
you rapidly if you move or act while they're staring at you for a brief
time period (after which you become immune for 12 seconds, and during
which other watchers will play fair and stop shooting at you).
- If they start taking damage they will also start using their "Gaze"
attack, look away or suffer some kind of negative effect!
- - Normal watcher gaze flashes and confuses you.
- - Magmawing watcher gaze obviously burns (and briefly stuns) you.
- - Icewing watcher gaze freezes you and throws you backwards.
- Magnetically attract and eat diamonds. They also used to do this, but
just if they happened to coincidentally walk past some.

**Other accompanying changes**

All basic mobs will now adopt the "stop gliding" trait if they get
slowed down too much.
I moved behaviour for "fire a projectile from this atom" into a helper
proc because I was using it in three places and I will probably use it
in more places. There are probably other places in the existing code
which could be using this.
I think I made the basic mob melee attack forecast default a little more
forgiving, they were fucking me up too much and I am the playtester.

## Why It's Good For The Game

Another one off the list.
New tricks for old dogs.
Framework for making mobs with ranged attacks "fairer" (you can see when
they are ready to shoot you).
More (hopefully) versatile AI behaviours which we will reuse later (I
hope I'm not duplicating one someone already made).
If our players "enjoy" them enough we can give more mobs "don't look at
me" mechanics.
Removes some soul sprites.

## Changelog

🆑
refactor: Basilisks and Watchers now use the basic mob framework. Please
bug report any unusual behaviour.
sprite: Basilisks have new sprites.
add: Basilisks will go into a frenzy if heated by energy weapons or
temperature beams as well as by lava.
add: Watcher eyes will be illuminated briefly when they are ready to
fire at you.
add: Watchers can now briefly put you into "Overwatch" and penalise you
for moving while they can see you.
add: Wounded watchers will occasionally punish players who look at them.
balance: Unusual watcher variants are more likely to appear.
/🆑
2023-08-16 13:04:41 -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
Jacquerel
ddfdc70d73 Basic Lobstrosity (#77253)
## About The Pull Request

I'm slowly chipping away at mining mobs. These ones also got some new
sprites because the old ones were a bit weird except when facing South.

![image](https://github.com/tgstation/tgstation/assets/7483112/015b8819-bab8-471a-86ae-70b1597ae327)
Arctic Lobstrosities are now hairy to give them a little more visual
distinction from Lavaland ones.

In terms of behaviour, they're now a little faster and can charge you
from further away.
They will _only_ attack players who are incapacitated in some way
(primarily from being hit by their charge, but could be from a Goliath
or something too) and will otherwise keep their distance until they can
charge again. They move slower for a short duration after charging
though, so you have time to slap them a bit.

If a Lobstrosity downs you then it will try to snip off one of your
arms, then retreat in order to eat it.
Obviously nobody likes losing an arm, but this does give you an
opportunity to get away while it is distracted? Funnily enough the way
our health system works means that sometimes losing that arm actually
takes you out of soft crit so you can stumble back to the station for a
replacement (or try to wrestle yours back?)

All of these things are achievable also by a player if you make one
sapient, they will pull arms off mobs they attack which are in crit and
can eat arms if they see them lying around if they want.
I added an element to let you dismember people with your bare hands,
maybe someone evil can use it to add a beheading attack some day.

Here's a video of their new behaviours:
https://www.youtube.com/watch?v=9eKxsH7hD7Q

## Why It's Good For The Game

Gives mobs more character.
Reduces our list of frozen simple mobs.
Replaces some ugly side sprites.
Medbay enrichment?

## Changelog

🆑
refactor: Lobstrosities are now basic mobs and have different AI
behaviour. Please report anything which seems like it shouldn't be
happening.
add: Lobstrosities will now only opportunistically attack things they
have knocked over with their charge, and are otherwise timid.
add: Lobstrosities are hungry for fingers and will steal one of your
arms if they defeat you in combat, although this gives you time to crawl
away.
sprite: New sprites for Lobstrosities.
/🆑
2023-08-01 17:26:32 -06:00
zeckle/licks-the-crystal
d0dffe7ca6 Fixes a large amount of spelling and grammatical errors in the Exploration Drones section. Also fixes an angry pine tree quip. (#77095)
## About The Pull Request
Title

## Why It's Good For The Game
It bothered me

## Changelog

🆑 Licks-The-Crystal
spellcheck: Corrected a large quantity of spelling, grammatical and
phrasing errors with Exploration Drone content.
/🆑

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-07-31 12:18:45 +00:00
Ben10Omintrix
cc64ed0ca4 convert the bear to a basic mobster (#77143)
## About The Pull Request
the bear now a basic and he have a new behaviers. the bear now can go to
climbed the trees! he will looked for a tree to climbing and if he
founded a tree he will go climb him. also the bear now love honey he
will look for a bee hives to stole the honey from it so botanists must
be care. the bear will drag the honey behind him so u must chased him to
get the honey back again

## Why It's Good For The Game
the bear is a basic now so he and have more behavier for more depth
mechanis

## Changelog
🆑
refactor: the bear is a basic now. please report any bugs
add: the bear will climb trees and search honey
/🆑
2023-07-28 19:34:39 -06:00
Ghom
d9677e39be Converting crabs to basic mobs (#77109)
## About The Pull Request
Exactly what it reads on the tin. As a bonus, they will flee from
attacking targets, hunt tiny critters (crabs are now small-sized) and
actually move sideways (it's an element that covers both client and
basic movement)


## Why It's Good For The Game
Another simple to basic mob refactor.

## Changelog

🆑
refactor: Crabs refactored into basic mobs. They now hunt tiny critters
and flee from attackers.
fix: Fixed crabs not crab-walking.
/🆑
2023-07-26 17:52:18 -06:00
scriptis
f46c2ff75c add pony (#76955) 2023-07-21 04:08:06 -04:00
Ben10Omintrix
b06e940341 makes the pinguin a basic animal (#76790)
## About The Pull Request
the penguin now is a basic animal and also now he can go and layed
penguin eggs to make penguin babys also the baby have a new behavier he
will now go and looked for his mom and when he found his mom he will
went to her and be happy when he close to his mom or if he mom is died
he will went to her body and he will be sad and also i putted this
behavier in the baby chicken. also now the pinguen mom will go and
looked for her eggs and when she find a egg she will putted it in the
middile of her legs and walked with it
![penguin with a
eggs](https://github.com/tgstation/tgstation/assets/138636438/e5f3d741-edc0-438f-b1b3-9e4ed2280532)


## Why It's Good For The Game
the pinguen now is a advance ai
## Changelog
the pinguen now have a more advance    

🆑
refactor: the penguin is a basic animal
add: the penguin now layed eggs
add: the penguin and the chicken babys will go look for adult penguin or
chicken and be happy when he is near the adult
/🆑
2023-07-18 13:03:00 -06:00
Ben10Omintrix
46e819297a transform the paper wizard from a simple to a basic (#76688)
## About The Pull Request
i transfered paper wizard from simple to a basic and i also gaved him
new fetures he can go and do. now when he will go and walked when he
walks there will be a paper effects when he goes to walk. also he will
he will now go to look for paperes on the floor and then he will write
stuff inside the paper, so a player can maybe distracted the wizard with
a paper because the wizard will stop atacked him for a bit until he
finished writted stuff inside the paper. i follow the instrucions in the
learn-ai md to maked this to a new ai subtree behavier.

## Why It's Good For The Game
the paper wizard is now a basic so he is a better ai and he also have
more feture to gaved him depth mechanics

## Changelog
🆑
refactor: paper wizard have been refactored, please report any
bugs/unintended behavior
refactor: refacted the datum/elememt/trial to an bespoken element
add: paper wizard now have effects when he walking and he will now go
and look for paperes and write stuff in them
/🆑
2023-07-14 16:33:53 +01:00
lizardqueenlexi
a490fbe8dc Converts foxes to basic mobs. (#76662)
## About The Pull Request

As the title says, foxes are now basic mobs.

Foxes have a few new behaviors now, rather than the zero behaviors they
had before. Foxes, being very skittish animals, will flee from anything
that damages them. Additionally, they now have hunting behavior,
tracking down and killing anything of their size or smaller - regardless
of faction. They will not, however, hunt as long as someone is watching
them - which is to say, if any living humans are within 7 tiles of them.
Don't leave a fox and a chicken together while you're transporting your
grain to Lavaland! Also, make sure you don't leave Renault and Ian on
their play date unsupervised...


![image](https://github.com/tgstation/tgstation/assets/105025397/152f56f7-02ae-4b1f-8556-2571ed485683)
## Why It's Good For The Game

Gets rid of another simple animal. We grow ever closer to ascension.

Also, makes foxes a little more interesting rather than simply another
animal that does literally nothing. Renault will now flee from anyone
trying to kill her, for instance. Also opens up unique avenues of pet
murder if you want to make it look like an accident.
## Changelog
🆑
refactor: Foxes are more crafty now. They will run from danger, and hunt
small prey when no one is keeping an eye on them. Don't leave Renault
alone with Ian!
/🆑
2023-07-10 17:52:52 -06:00
san7890
874ada4278 Refactors Ant into Basic Mob (#75662)
## About The Pull Request

On the tin. No new fancy AI wheels or anything, just a simple port. 
## Why It's Good For The Game

Knocks another one off the list, just really light stuff. They're a bit
smarter now too, I think the intention was them for them to be pet-like
as well (according to the code). Should be really rather easy to give
them the pet-like behaviors and elements if someone really wants to in
the future, just sorta paving the way for more work to be done to make
mobs more intricate/interesting.
## Changelog
🆑
refactor: Giant ants are now more capable of distinguishing friend and
foe.
/🆑
2023-06-03 14:41:05 +12:00
san7890
6676702008 Refactors chicks into basic mobs (#75663)
## About The Pull Request

On the tin. They have pretty much nothing in common with chickens, so no
subtyping. They are in the same folder to keep that whole thing tidy,
though.

Also includes fixes to `growth_and_differentiation` element that I made
for spiderlings, since some stuff was yorked without me realizing. It
pretty much worked flawlessly for these chicks otherwise though. It all
works fine now.
## Why It's Good For The Game

More verbose naming scheme (instead of "holo", we get "permanent"
chicks), smarter AI for chicks, knocks them off the list, etc. etc.

One thing that I wanted to do was to have chicks recognize their mother
(if they had one), but that would be way out of scope for this simple
port PR. I'll dwell on adding something cool for that in the future.
## Changelog
🆑
refactor: Chicks are now a bit smarter, be careful not to squish them!
/🆑

Let me know if the whole "COMPONENT_KILL" thing is cringe, I couldn't
figure out a better way to do it without abusing `GetComponent()` to
`qdel()` it that way.
2023-06-03 14:40:55 +12:00
san7890
83723acab0 Turns Chickens into Basic Mobs (#75592) 2023-05-24 15:04:27 -04:00
san7890
9ae0802ead Converts Killer Tomatoes to Basic Mobs (#75516)
Just another lightweight PR porting over a simple animal to the basic
mob framework with zero additional AI implementation (it's a killer
tomato- it spawns into the world to maul you. how much more intricate
does it need to be?).
2023-05-19 16:55:59 -05:00
san7890
e2bc712714 Converts Lizards to Basic Mobs (#75515)
This was pretty simple since they didn't have too much custom behavior,
and whatever they did have already had AI behavior. I got really burned
out the last two times I wrote intricate AI action/decision behaviors so
I'm just taking it light and doing the bare minimum.

one day our shackles will be free of the simple animal scourge. they're
also a bit more intelligent, and i daresay a bit cuter too now.

also that lizard gib animation has been sitting there for god knows how
long completely unseen, so let's actually hook it into the mob.
2023-05-19 00:52:20 +00:00
san7890
fa0225b05c Converts Spiderlings from Structures to Basic Mobs (#75001)
If I could've made this more atomic, I would have in a heartbeat, trust
me.

## About The Pull Request

Hey there. People were mocking us for having spiderlings still be a
subtype of `/obj/structure`. I decided to take a lot of time to fix
that. A lot of behavior it was implementing was just pseudo-mob stuff,
so it was actually easier than it looked for the raw conversion. A lot
of the footwork on spider stuff in the basic framework was already done
previously by Jacquerel, so that was pretty nice.

However, there are two new things that weren't introduced in the code
that had to be put in.

A) A component to handle growth and differentiation into a mob. This may
have already existed, no clue. If it does (and it's NOT
evolutionary_leap), let me know.
B) AI Behavior to handle seeking out a vent, entering a vent, and then
exiting out of a different vent. I may have gone a bit wacky on the
code, but it certainly works as expected (spiderling goes in one vent,
exits the other). Let me know if you can think of a way it can be better
optimized, but it was deliberately written to be very failsafey in case
shit goes yonkers.

One fundamental difference between structure spiderlings and basic mob
spiderlings (beyond the AI and not just a random prob() check for
movement) is the fact that they had vent movement coded in... but we
_really_ don't need stuff like that for our intents and purposes. If the
range turns out to be too OP in the current framework, we can always
change it up a bit, but also there's a _lot_ of vents we can end up in
the station (my testing had one spiderling end up in the AI sat to get
obliterated).
## Why It's Good For The Game

Spiderlings aren't structures! They behave like a mob should! Players
can possess spiderlings! They work seamlessly with differentiating into
a giant spider! Better AI! More room for people to add into this very
under-utilized buggers!
## Changelog
🆑
refactor: Spiderlings are now basic mobs, report any complete
weirdness/deviation from known behavior. They should be a lot more
intelligent now though.
add: AI Spiderlings are super fragile, but they're also super fast,
especially when they get into a vent. Once they're in circulation, they
could end up everywhere! Maybe in the armory, maybe in a locked closet
in maintenance. Be sure to be vigilant and splat them whenever you can
to save the station from a whole lotta heartache!
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-04-30 14:17:02 +01:00
MrMelbert
ed2f04f486 Experiment with replacing weakrefs in AI blackboard with deleting signals, ideally making it easier to work with and harder to cause hard deletes (#74791)
## About The Pull Request

Replaces weakref usage in AI blackboards with deleting signals

All blackboard var setting must go through setters rather than directly

## Why It's Good For The Game

This both makes it a ton easier to develop AI for, and also makes it
harder for hard deletes to sneak in, as has been seen with recent 515
prs showing hard deletes in AI blackboards

(To quantify "making it easier to develop AI", I found multiple bugs in
existing AI code due to the usage of weakrefs.)

I'm looking for `@Jacquerel` `@tralezab` 's opinions on the matter, also
maybe `@LemonInTheDark` if they're interested

## Changelog

🆑 Melbert
refactor: Mob ai refactored once again
/🆑
2023-04-23 17:07:17 -06:00
san7890
43473a4dac Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles (#74784)
## About The Pull Request

deers only show up in the BEPIS but i decided that they would be easy
enough to turn into a basic mob (they were). it was so easy in fact that
i decided to dip my toes into coding AI behavior, and made them freeze
up whenever they see a vehicle. this required a lot of code in a bunch
of places that i was quite unfamiliar with before starting this project,
so do let me know if i glonked up anywhere and i can work on smoothing
it out.
## Why It's Good For The Game

one less simple animal on the list. deers staring at headlights is
pretty cool i think, neato interaction for when you do get them beyond
the joke the bepis makes

i'm also amenable to dropping the whole "deer in headlights" code if you
don't like that for w/e reason- just wanted to make them basic at the
very least
## Changelog
🆑
add: If you ever happen upon a wild deer, try not to ride your fancy
vehicles too close to it as it'll freeze up like a... you know where I'm
going with this.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-04-23 11:31:03 -04:00
tattle
403506439f Farm Sounds DLC (basic mobs can make sounds when speaking) (#74906)
## About The Pull Request

https://user-images.githubusercontent.com/66640614/233747544-aac153b9-a100-486c-9a7a-4a436b8303b8.mov

Cows, pigs, and sheep make noise when their AI makes them speak. 
~~Also House Flipper Farm DLC came out but that's incidental.~~

## Why It's Good For The Game
It's funny, also more sound effects are fun. Gives basic mob creators
more customizability.

## Changelog
🆑 Tattle
qol: basicmobs can now make sounds when their speech is triggered
qol: pigs will now make sounds and emote on their own
sound: cows, pigs, and sheep have new sound effects!
/🆑

---------

Co-authored-by: tattle <article.disaster@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-04-22 15:33:48 -07:00
SMOSMOSMOSMOSMO
f3f274de5c refactors poles and trees into basic mobs (#74812)
## About The Pull Request
refactors poles and trees into basic mobs. If trees now see you holding
a chainsaw, hatchet, or some wood they will get angry and knock you out
for longer. Poles will run around giving some of their charge to APCs
they find along the way. i did them both in this PR coz poles were a
subtype of trees.

## Why It's Good For The Game
refactor

## Changelog
🆑
refactor: refactors trees into basic mobs
refactor: refactors poles into basic mobs
add: If trees now see you holding a chainsaw, hatchet, or some wood they
will get angry and knock you out for longer
add: Poles will run around giving some of their charge to APCs they find
along the way
fix: cells charged by the pole will now have their icon correctly
updated to reflect their charge
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-04-19 16:17:17 -06:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
Jacquerel
17e8000c8e Reduce carp migration devastation (#74608)
## About The Pull Request

I'm not totally satisfied with the amount of random destruction caused
by space carp wandering around, they should certainly be dangerous and
annoying but the random nature of their spawning and pathfinding means
that they would trap themselves in random rooms and then smash all of
the machinery in there.
Because they could attack any dense object they perceived as being in
their way that could result in venting random gas canisters, breaking
terminals, or I even once saw them destroy the supermatter cooling loop
by eating the thermomachines.
While the latter is pretty funny, arbitrary destruction of machines
simply caused because a fish teleported into a room without you knowing
isn't really very engaging and doesn't create very interesting stories.
This ultimately isn't meant to be a heavily destructive event and its
probability to run isn't tuned as if it is.

So, a couple of changes:

I reduced both the range and cooldown of the carp teleporting ability.
This means that AI carp can use it to pathfind past obstacles pretty
reliably and don't spend so much time smashing things, and also reduces
the chances of them getting the drop on you from a location you can't
see.
I also added a short click cooldown to carp travelling through other
carp rifts so people being teleported _to_ have more of an advantage
over people ambushing them (this was already true for the carp creating
the rift).

Additionally I added an optional whitelist to the "attack obstacles to
your pathfinding" AI script, and heavily culled the kind of obstacles
that carp will attack to be ones which are mostly replaceable. They will
still cause a mess and might even vent a room, but they won't smash
vital infrastructure.

Finally I replaced a couple of instances of `get_ranged_target_turf`
with `get_ranged_target_turf_direct` for better precision, and player
carp using the ability can now just click anywhere on the screen and it
will jaunt in that rough direction. With the reduced range, having to
click within its radius was pretty annoying.

With these changes I ran the event 10 times in a row on kilo and then
watched JoJo's bizzarre adventure for 90 minutes and when I came back
the level of destruction seemed pretty reasonable (aside from the big
hole where one of them ran into the supermatter and delaminated it, but
if there were players around that wouldn't happen).

## Why It's Good For The Game

This event was still just a little bit _too_ annoying.
If something destroys important machines it should have happened on
purpose via an event which was supposed to do that, rather than through
chance. Or preferably just be player-driven.

## Changelog

🆑
balance: Carp can't teleport as far, but can do it more frequently.
People who piggyback through their rifts will be blocked from attacking
for a short duration (the same as the normal attack cooldown).
balance: AI controlled carp will now be more selective about which
objects they smash. Player controlled carp (or carp directly instructed
to attack objects by people who have tamed them) can still attack
whatever they like.
/🆑
2023-04-09 16:50:14 -06:00
Comxy
73ba9046df [Ready] New Cosmic Heretic Path DLC (#73915)
## About The Pull Request
This PR adds a new Cosmic Heretic.

![promo1](https://user-images.githubusercontent.com/25363960/224495697-5a398430-54b3-4473-bdf7-a041abb09596.PNG)

![promo2](https://user-images.githubusercontent.com/25363960/224495702-245b0a0b-7dc1-428f-b3b8-d7ef9c66f9ee.PNG)

![promo3](https://user-images.githubusercontent.com/25363960/224495707-d2ba034c-fc4f-4548-a782-78fe37311b37.PNG)

![promo4](https://user-images.githubusercontent.com/25363960/224495710-e9887cfd-cccd-4be4-9270-023b8dd98915.PNG)

![promo5](https://user-images.githubusercontent.com/25363960/224515282-2e9dceb7-e9f1-4136-9338-d370dd11b919.PNG)

Main Paths:
- Eternal Gate: Opens up the Path of Cosmos to you. Allows you to
transmute a sheet of plasma and a knife into an Cosmic Blade. You can
only create two at a time.
- Grasp of Cosmos: Your Mansus Grasp will give people a star mark
(cosmic ring) and create a cosmic field where you stand.
- Cosmic Runes: Grants you Cosmic Runes, a spell that creates two runes
linked with eachother for easy teleportation. Only the entity activating
the rune will get transported, and it can be used by anyone without a
star mark.
- Mark of Cosmos: Your Mansus Grasp now applies the Mark of Cosmos. The
mark is triggered from an attack with your Cosmic Blade. When triggered,
the victim transport back to the Cosmic Diamond, which is the location
your mark was applied to them. After getting transported they will be
paralyzed for 2 seconds.
- Star Touch: Grants you Star Touch, a spell that will give people a
star mark (cosmic ring) and create a cosmic field where you stand.
People that already have a star mark will be forced to sleep for 4
seconds. When the victim is hit it also creates a beam that deals a bit
of fire damage and damages the cells. The beam lasts a minute, until the
beam is obstructed or until a new target has been found. Can remove
Cosmig Runes and teleport you to your Star Gazer when used in hand.
- Star Blast: Fires a projectile that moves very slowly and create a
cosmic field on impact. Anyone hit by the projectile will recieve burn
damage, a knockdown and a star mark.
- Cosmic Blade: our blade now deals damage to peoples cells through
cosmic radiation.
- Cosmic Expansion: Grants you Cosmic Expansion, a spell that creates a
3x3 area of cosmic fields around you. Nearby beings will also receive a
star mark.
- Creators's Gift: The ascension ritual of the Path of Cosmos. Bring 3
corpses with bluespacedust in their body to a transmutation rune to
complete the ritual. When completed, you become the owner of a Star
Gazer. You will be able to command the Star Gazer with Alt+click. You
can also give it commands through speech. The Star Gazer is a strong mob
that can even break down reinforced walls. Star Touch can now teleport
you to your Star Gazer when Star Touch is used in hand."

Side Paths:
- Ash-Cosmic: Fire Fish: Allows you to transmute a pool of ash, eyes,
and a sheet of plasma into a Fire Shark. Fire Sharks are fast and strong
in groups, but are bad at combat.
- Ash-Cosmic: Curse of The Stars: Allows you to transmute a bluespace
crystal, a pool of ash, and a liver to cast a Curse of The Stars on a
crew member. While cursed, the victim will recieve a star mark that
lasts for at least 3 minutes. This star mark makes it so that the crew
member cannot enter cosmic carpet fields. The victim will also recieve a
cosmic carpet trail for at least 3 minutes.
- Ash-Cosmic: Eldritch Coin: Allows you to transmute a sheet of plasma,
a diamond and eyes to create an Eldritch Coin. The coin will heals when
landing on heads and damages when landing on tails. The coin will heal
for more, but only for heretics.

Extra ability information:
- Star Mark: This is a status effect that prevents people from walking
into cosmic fields.
- Cosmig Fields: Only block entities marked with a star mark,
projectiles or throwing items will still work. Lasts only 30 seconds and
5 seconds for the Cosmig Trail trait.

Some things I wanted to mention:
- Why the Star Gazer is balanced: It has 3000 health and can kill people
pretty fast, but at the same time, anyone can space the Star Gazer and
lead it away from the heretic if they do not pay attention.
- The Cosmic Heretics balancing has been carefully considered. It is
relatively weak in group situations but strong in one to one combat.
- Balance changes can also be made after the PR gets merged need be, or
it can be test merged first.
## Why It's Good For The Game
New heretic path means more choice and a different play style.
## Changelog
🆑
add: Adds new Cosmic Heretic.
soundadd: Adds Cosmic Heretic sounds.
imageadd: Adds Cosmic Heretic sprites.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-04-08 14:44:14 +01:00
Jacquerel
966b8e5fd8 March into Mapness: Meateor (#74070) 2023-03-31 19:40:29 -07:00
Jacquerel
1cdc327a8f Station Trait: Spider Infestation (#73893)
## About The Pull Request

Hate having your cables eaten by mice? Nanotrasen have heard your
complaints and settled on a natural, _organic_, and eco-friendly
solution.

When this station trait is active, roundstart and event mouse spawns
have a chance to instead be replaced with duct spiders (both will exist,
it doesn't remove mice).
Duct spiders are largely harmless to humans, actively hunt other
maintenance creatures (such as mice), and have only one _tiny_ downside.

![image](https://user-images.githubusercontent.com/7483112/224345781-2627be98-67f2-4cab-ac40-c6c9b35ea909.png)

These mobs can also sometimes be spawned by a minor scrubber clog event.

As a side note, all spider basic mobs with AI (except Araneus) will now
try to automatically fill a small area around them with webs.

Also I made it so that mobs will ignore their random_walking behaviour
if they're engaged in a `do_after`, just in case.

## Why It's Good For The Game

Adds a little bit of variety to things which can slightly annoy you in
maintenance.
Spiders will automatically make places they live in look like spiders
live there.

## Changelog

🆑
add: A station trait which sometimes populates maintenance with small
spiders. You can wear them as a hat if you wanted to have a spider on
your head for some reason.
add: Spider mobs will automatically start webbing up their environment.
/🆑
2023-03-12 18:53:38 -06:00
Jacquerel
7c30d9d746 Basic Wumborian Fugu & Fugu Gland (#73415)
## About The Pull Request

Fixes #72677 and also converted the "Wumborian Fugu" mob to a basic mob
rather than a simple one.
I will be totally honest: I didn't need to do that in order to fix the
bug. I just didn't like looking at the rest of the code in that file.
Also I have some kind of sickness which makes me do this.

This ended up being one of those "see something related and fix it as
well" ones so there's a couple of only tangentially related changes in
here. If you want me to split it up I will but I think this one is
_probably_ fine because the wide-ranging changes are pretty simple ones?

So what this PR does is:
- Refactors simple mob into basic mob.
- Cleans up its really ugly ability to work in a hopefully nicer way.
- A one line fix to the linked issue above.
- Modifies the default cooldown on `basic_melee_attack` and
`attack_obstructions` to be a widely used cooldown rather than a random
value used by no mob that we have.
- Renamed behaviour "try_mob_ability" to "targeted_mob_ability" and
added a new AI behaviour called "use_mob_ability", the difference
between the two being that the former requires a target and the latter
does not. I... don't actually use this because I realised after adding
it that I still want a target for this mob, but someone will need it
eventually.
- Change everywhere that is passing references to abilities to actions
to pass weak references instead.
- Adds an element to handle "spawn this stuff when a related mob dies".
- Found a few places where people were setting `environment_smash ` as
if it did anything (including me) and replaced them with the proper
ai_controller implementation instead, updated the comment to make it
clearer although that won't prevent copy/paste errors.
- Registered to the "movement speed updated" signal to ensure that basic
mobs actually notice that you have applied a movement speed modifier.

## Why It's Good For The Game

Fixes a linked issue.
Refactors some code which made me sad whenever I saw it.
Restores some mob behaviour which nobody noticed was missing, but was.
Fixes some apparently unreliable code I added in a recent PR reliant on
basic mobs using movespeed modifiers.
Adds element we will definitely need again in the future.

## Changelog

🆑

fix: The Fugu Gland can once more be used on Ian, Carp, Giant Spiders,
or other basic mobs.
fix: Syndicate mobs will once again attack windows to try to reach you,
and space ruin spiders won't.
fix: Netherworld-themed mobs will correctly adjust their speed as they
take damage.
refactor: Made the Wumborian Fugu into a basic mob, which should act
largely the same way but may have slightly different speed and reaction
times.
/🆑
2023-02-15 18:34:41 -07:00
Jacquerel
cbbf7b3613 Basic Mob Spiders III: Sgt. Araneus is no longer a bat (#73350)
## About The Pull Request

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

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

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

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

## Why It's Good For The Game

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

## Changelog

🆑
refactor: Spider code has been refactored and AI-controlled spiders may
have slightly different movement or reaction times.
fix: Basic mobs can now be slowed when they take stamina damage, however
currently only spiders actually _can_ take stamina damage.
fix: Spiders should now more reliably disable their AI when controlled
by a player.
fix: Araneus is no longer considered to be a bat and so cannot fly.
fix: Araneus is no longer considered to be a bat and so is no longer
frightening to people who are scared of the supernatural.
/🆑
2023-02-13 05:22:26 +00:00
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
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
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
Jacquerel
8dc3fb19f2 Some tweaks to mobs running away (#72529)
## About The Pull Request

Mice running away behaviour wasn't working quite how it was supposed to
due to a couple of bugs.
First of all, the action was written as if it would `perform` every
tick, which it doesn't. This means that the code checking if you had
left line of sight didn't function, meaning mobs would continue fleeing
you even when they couldn't see you any more.

Secondly, mobs spent an awful lot of time pathing into walls which was
especially noticeable on mice who just would _not_ stop repeatedly
squeaking in a way that is kind of funny but gets old when you keep
hearing it. Now the pathing stops if it hits a barrier.
I'm not... totally fond of this solution because it has a few
assumptions baked in (that we want to try and path through doors even if
they're dense for one) but I can't for the moment think of a better
"path away from" implementation that isn't way more complicated, and
this doesn't really need to be complicated.

For good measure I noticed a couple of other actions weren't passing a
`source_atom` into `is_blocked_turf` so rats were potentially attacking
"obstacles" they could simply walk over.
Additionally a couple of places were setting
`controller.movement_target` directly instead of using the helper method
which has a minor risk of runtiming under certain conditions.

## Why It's Good For The Game

Mice will stop constantly screaming if they can see someone, and should
repath once they have a different escape route more quickly rather than
dedicating themselves to trying to burrow through an iron wall.
Rats won't bite at tables and racks they can just climb over.

## Changelog

🆑
fix: Mice won't try to path through walls to escape from sight and
constantly squeak.
fix: Mice will stop running away from you if they can't see you any
more.
fix: Rats won't bite racks and tables while passing over them.
/🆑
2023-01-14 19:14:53 +01: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
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
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
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
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
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
san7890
1d256b5506 Refactors Rabbits to be a Basic Mob (#71205)
## About The Pull Request

Back in #64175, I reworked rabbits such that their base behavior was
just a cute fluffy snuggle monster, and not have the "easter" variant be
the default. Now that we're transitioning everything from simple_animal
to basic, I figured now was the time to shift that over too.

Pretty much everything should be the same as it was before, I even took
some time to add behavior to some elements to allow it to work (let me
know if I should handle it a different way) but rabbits as a
simple_animal and rabbits as a basic mob should now not be very
distinguishable (beyond the fact that they only speak via subtrees).

I also got rid of the single-letter icon_states in the DMI and
accomodated the code to fix because I finally got irritated enough to do
something about that.
## Why It's Good For The Game

Although I didn't really have any pressing urge to add more complex AI
behavior to rabbits than just pretty much re-implementing what they had
as a simple_animal, this is an excellent first-step to allowing much
more extensible behaviors to these fuzzy creatures.

Also, it takes three more mobs off "the frozen list". Whoopie!
## Changelog
🆑
fix: Dead Black Space Rabbits should now properly have a sprite.
/🆑

The UpdatePaths is useless for the maps we have on our repository
(holodecks use a spawner code-side), but I'm going to be nice to
downstreams who need it.
2022-11-15 23:40:39 -08:00
MrMelbert
70db96c46f Convert mouse and rat to basic mobs (#70728)
* Converts mice and rats to basic mobs

* Update paths

* Fixes

* Tweaks

* .

* Use helpers

* Unit test

* Correct the targeting

* Fixes the unit test?

* Fixes the unit test

* Docs

* update the path script with pr id

* Faction check tweak

* Review

* AHH
2022-10-28 08:49:17 -04:00