Commit Graph

265 Commits

Author SHA1 Message Date
SkyratBot
8eeca186df [MIRROR] Cleans up some extra args in Destroy() [MDB IGNORE] (#25907)
* Cleans up some extra args in Destroy() (#80642)

## About The Pull Request

After https://github.com/tgstation/tgstation/pull/80628, these shouldn't
be needed anymore right?

## Why It's Good For The Game

Cleans up some vestigial code

## Changelog
EDIT: Not player-facing.

* Cleans up some extra args in Destroy()

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
2023-12-30 01:21:26 -05:00
SkyratBot
09351396ec [MIRROR] Fixes AI behavior with breaking cuffs and resisting aggressive grabs [MDB IGNORE] (#25888)
* Fixes AI behavior with breaking cuffs and resisting aggressive grabs (#80328)

## About The Pull Request

Makes it so that ai's recognize they're in a do_after after resisting,
preventing them from processing and interrupting the do_after while
they're in a condition that necessitates it. If it gets interrupted then
they'll process as normal, or if they finish they'll be free.
## Why It's Good For The Game

Monkeys can now resist things that they should've been, such as
aggressive grabs or cuffs, instead of having their ai completely freeze
when they're cuffed.
## Changelog
🆑
fix: ai can now tell if it is in a do_after for resisting and will not
interrupt it. monkeys also now don't freeze up when aggressively grabbed
and will resist out of those and cuffs.
/🆑

* Fixes AI behavior with breaking cuffs and resisting aggressive grabs

---------

Co-authored-by: Diamond_ <novadiamonddigger@gmail.com>
2023-12-28 08:09:15 -08:00
SkyratBot
d538bf0de0 [MIRROR] Optimize find_potential_targets self cost [MDB IGNORE] (#25883)
* Optimize find_potential_targets self cost (#80602)

![image](https://github.com/tgstation/tgstation/assets/35135081/84ae20b6-5f44-4a69-bda3-0df1435dea5c)

`find_potential_targets/perform` currently has a pretty bad self cost in
part due to it running a second "loop over everything in range" check to
find turrets and mechs. This doesn't drop it down by as much as I'd like
because it still needs `hearers`, it still shows up pretty high, but
this at least cuts out some unnecessary work.

Best case is likely to minimize work AIs need to do when there are no
players on their z-level, as there are a lot of calls from Lavaland.

* Optimize find_potential_targets self cost

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-12-28 07:55:30 -08:00
SkyratBot
cf00bcb7b7 [MIRROR] basic bot path huds and medbot research [MDB IGNORE] (#25870)
* basic bot path huds and medbot research (#80277)

## About The Pull Request
this pr integrates the bot path huds to ai controllers and move loops to
allow basic bots to display their paths in the hud.
also closes #80280 and closes #80330

## Why It's Good For The Game
basic bots now can display their path on huds

## Changelog
🆑
add: basic bots can now display their paths on huds
fix: medbots can research healing again
/🆑

* basic bot path huds and medbot research

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2023-12-27 09:46:33 -05:00
SkyratBot
b79167c173 [MIRROR] Organ movement refactor *Un-nullspaces your organs* [MDB IGNORE] (#25530)
* Organ movement refactor *Un-nullspaces your organs*

* Fix conflicts

I checked the conflicts on the two weird conflicts and no previous TG pr touches them i assume its just github being github because those shoulden't be conflicts *shrug

* Fix #1 uhh...this is going to be a long one

* Fix #2 Modular Movement Flags

* Fix #3 It builds now

* Fix #4 Oh god it builds now, I missed some things

* Fix #5 No more Runtimesplosion Now time for Synths

* Update nightmare_organs.dm

* on_mob_insert

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/25664

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/25685

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/25582

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/25686

* bro the fucking brain does not go into the chest.

* seriously? undocumented code causing shit. if it breaks ghouls, so be it.

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: SomeRandomOwl <somerandomowl@ratchtnet.com>
Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-12-24 19:06:09 +00:00
SkyratBot
0a609c34d4 [MIRROR] Fixes a hard del in monkey AI [MDB IGNORE] (#25713)
* Fixes a hard del in monkey AI (#80425)

## About The Pull Request

![firefox_KI4H4wxvN3](https://github.com/tgstation/tgstation/assets/13398309/6e8c18f3-2413-4eaf-8436-15fd7aea9c51)

Fixes this hard del, caused by a del-on-death mob being qdeleted after
being victim to the monkey's attack. When a mob gets qdeleted, they
remove themselves from the blackboard.

Monkey code was then adding it back immediately after, resulting in the
hard del. Adds safeties to ensure that won't happen.

## Why It's Good For The Game

Less annoying CI failures

## Changelog

🆑
fix: monkeys will no longer cause other monkeys to get angry at the mobs
they just poofed by attacking
/🆑

* Fixes a hard del in monkey AI

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-12-18 13:01:05 -06:00
SkyratBot
2ed6af479c [MIRROR] [NO GBP] Fixes even more AI related CI runtimes [MDB IGNORE] (#25682)
* [NO GBP] Fixes even more AI related CI runtimes (#80262)

## About The Pull Request

Consider this a continuation of
https://github.com/tgstation/tgstation/pull/80202

![firefox_P62DdMv946](https://github.com/tgstation/tgstation/assets/13398309/1a784a27-e5c9-42d1-b160-7eb9251b3997)

~~It seems I missed a few.~~

Edit: Modified per request to handle this more broadly. If a pawn gets
`qdel`'d, the ai controller should be set to off and get removed from
the list of active controllers, and all their actions should be
canceled.

Also adds some qdeleted checks to `finish_action()`, which can still run
after the pawn gets qdeleted as part of the `CancelActions()` chain.

## Why It's Good For The Game

Less spurious CI failures.

## Changelog

Nothing player facing really.

* [NO GBP] Fixes even more AI related CI runtimes

* Update _ai_controller.dm

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-12-17 15:00:53 +00:00
SkyratBot
50fae8d01c [MIRROR] Adds a smaller size targeting strategy, makes crabs use them [MDB IGNORE] (#25603)
* Adds a smaller size targeting strategy, makes crabs use them (#80246)

## About The Pull Request

The PR that added crabs said crabs are now small creatures, and will
hunt tiny creatures. However, their targeting strategy was
`our_our_smaller`, so a group of crabs ended up eating each other. This
PR creates a new targeting strategy, and applies it to the crab AI.

## Why It's Good For The Game

Puts an end to crabbibalism.

## Changelog

🆑
fix: Crabs will properly only target Tiny creatures
/🆑

* Adds a smaller size targeting strategy, makes crabs use them

---------

Co-authored-by: Profakos <profakos@gmail.com>
2023-12-13 15:34:46 -06:00
SkyratBot
c2520730a5 [MIRROR] Fixes a bunch of AI related CI runtimes [MDB IGNORE] (#25552)
* Fixes a bunch of AI related CI runtimes (#80202)

## About The Pull Request

<details><summary>A bunch of the numerous CI issues </summary>

![image](https://github.com/tgstation/tgstation/assets/13398309/70b0419e-0ac4-4a59-8acb-02511f8d6987)

![image](https://github.com/tgstation/tgstation/assets/13398309/4303923d-aaea-438f-9eb2-d27b510c7bc6)

</details>

You can view the full list of them here
https://github.com/Skyrat-SS13/Skyrat-tg/actions/runs/7148986054/job/19470671408.

What seems to be happening is, the `ai_controller` `fire()`s, and at
some point the the `pawn` var has become null from qdeletion. Many of
the `SelectBehaviors()` procs make use of that var, and then try to
access it without any safeties whatsoever.

I believe it is mainly happening because of long `do_after()`s and other
procs that sleep.

This PR just adds those safeties. I probably didn't get them all, but
this should fix the ones I have seen in CI. There may be a better
solution to cover all future cases of this but I will wait on feedback
to proceed. See below comments:

---

I don't know if you would rather this to always be checked at the
controller level instead (or in `able_to_plan()` perhaps?) but I could
do that if it's wanted. I wasn't sure if there were certain things that
depended on `SelectBehaviors()` running for cleanup so I opted against
that.

On that note, shouldn't we just be qdeleting the `ai_controller` when
the pawn gets qdeleted? Is that not already happening? And if not, is
there a reason for it? That would probably be the best way to handle
it...

## Why It's Good For The Game

I would like to stop seeing so many random CI failures, wouldn't you?

## Changelog

🆑
fix: fixes some AI runtimes that were caused by the pawn becoming null
/🆑

* Fixes a bunch of AI related CI runtimes

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-12-10 20:49:07 -05:00
SkyratBot
3d816fc0d5 [MIRROR] basic cleanbots refactor and new janitor skillchip [MDB IGNORE] (#25511)
* basic cleanbots refactor and new janitor skillchip

* Update medbot.dm

* UpdatePaths

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-12-08 19:59:00 -05:00
SkyratBot
a6975112ed [MIRROR] Basic bots (medibots) [MDB IGNORE] (#25384)
* Basic bots (medibots)

* UpdatePaths, modular

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-12-03 02:10:21 -05:00
SkyratBot
7dd661f342 [MIRROR] basic cats and mini kitchen helpers [MDB IGNORE] (#25330)
* basic cats and mini kitchen helpers (#79800)

## About The Pull Request
this pr transforms cats into basic pets! cats now have some new
behavior. they can carry fish and hunted mice in their mouths to deliver
it to kittens, and kittens will eat them.

![catmouse](https://github.com/tgstation/tgstation/assets/138636438/8f146be4-c7b2-41d3-8301-734be49b5efc)

![catfish](https://github.com/tgstation/tgstation/assets/138636438/f8df54f2-9183-406d-afbd-f90f415f7f3d)

if a kitten sees you holding food, it will point at you and meow loudly
until u give it the food.
becareful when putting male cats near each other, there is a small
chance they get into a heated argument and meow loudly at each other
until one of them flees.
also added a new small cat house for cats. cats will use these homes if
u build one near them (using 5 wood planks)

![cathouse](https://github.com/tgstation/tgstation/assets/138636438/9515a78c-fdfe-461b-bad2-6b497117c694)

Chefs can craft the cake cat and breadcat. these are useful cats because
they can help the chef around in the kitchen. they will turn stoves and
grills off when food is ready, so they dont burn. and the cake cat will
help the chef decorate his donuts

## Why It's Good For The Game
refactors cats into basic mobs and gives them a deeper ai

## Changelog
🆑
refactor: cats are now basic pets. please report any bugs.
add: the cake cat and bread cat can now help the chef around in the
kitchen
/🆑

* basic cats and mini kitchen helpers

* Modular

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-12-03 00:37:58 -05:00
SkyratBot
6627b1a9c1 [MIRROR] Refactors Parrots into Basic Mobs (ft. Ben10Omintrix/Kobsamobsa) [MDB IGNORE] (#25100)
* Refactors Parrots into Basic Mobs (ft. Ben10Omintrix/Kobsamobsa)

* UpdatePaths

* Modular, cleanup, porting parrot commands into the new system

* makes poly slightly less of a dick

* Update parrot.dm

* Update parrot.dm

* Update tgstation.dme

* Revert "Update tgstation.dme"

This reverts commit a8b40c4aba524c271db02c271089664649dea1eb.

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-11-20 09:57:34 -05:00
SkyratBot
04021ca486 [MIRROR] [no gbp] gutlunch pop control [MDB IGNORE] (#25066)
* [no gbp] gutlunch pop control (#79772)

* [no gbp] gutlunch pop control

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2023-11-17 17:48:13 -05:00
SkyratBot
aff60235a2 [MIRROR] improve find_and_set/in_list behavior [MDB IGNORE] (#24995)
* improve find_and_set/in_list behavior (#79614)

## About The Pull Request
improves the find_and_set behavior a bit. this is after and before
observing 5 gorillas for 10 minutes

![image](https://github.com/tgstation/tgstation/assets/138636438/d8f5cdcb-71bd-41bd-a069-10b0367224ec)

![image](https://github.com/tgstation/tgstation/assets/138636438/1fd70fea-5769-4021-95ec-038137ce7423)

## Why It's Good For The Game
improves the find_and_set/in_list behavior

## Changelog
🆑
not player facing
/🆑

* improve find_and_set/in_list behavior

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2023-11-13 23:04:34 -05:00
SkyratBot
d8056a2c68 [MIRROR] basic gutlunchers and ashwalker ranching [MDB IGNORE] (#24970)
* basic gutlunchers and ashwalker ranching

* Update goldgrub.dm

* UpdatePaths

* Modular

* Modular

* Modular

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-11-13 09:42:16 -05:00
SkyratBot
b07fff3b1f [MIRROR] [no gbp] Fixes goat runtime [MDB IGNORE] (#24952)
* [no gbp] Fixes goat runtime (#79672)

## About The Pull Request

Fixes #79063
Instead of checking if a list is QDELETED (this doesn't work) we check
if it has a length.

## Changelog

🆑
fix: Goats will now calm down after getting grumpy without causing a
runtime error.
/🆑

* [no gbp] Fixes goat runtime

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-11-12 23:08:37 +00:00
SkyratBot
2e7ad10f7e [MIRROR] Lemon fixes ci [MDB IGNORE] (#24942)
* Lemon fixes ci (#79384)

## About The Pull Request

Sets up moveloops to better catch issues with duplicated loops

Letting people modify the timer var AND have it track what bucket we're
in was a bad idea.
So instead let's store the queued time separate. Also makes
allowed_to_move return true/false instead of flags

This fixed? the null loop issue locally, I honestly have no damn idea
why. I'm gonna be working on the rest of ci here, left trackers so if it
pops up between now and merge I'll know what the issue is.

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
Co-authored-by: Emmett Gaines <ninjanomnom@ gmail.com>

* Lemon fixes ci

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
Co-authored-by: Emmett Gaines <ninjanomnom@ gmail.com>
2023-11-12 11:25:49 -05:00
SkyratBot
6c7b5e649c [MIRROR] Basic mobs check for MOBILITY_MOVE to move [MDB IGNORE] (#24928)
* Basic mobs check for `MOBILITY_MOVE` to move (#79627)

## About The Pull Request

Adds a check for `MOBILITY_MOVE` in basic mob `allowed_to_move`.

This prevents AI controlled mobs which are `TRAIT_IMMOBILIZED` from,
well, not being immobilized

## Changelog

🆑 Melbert
fix: AI controlled mobs which are immobilized are now properly
immobilized
/🆑

* Basic mobs check for `MOBILITY_MOVE` to move

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-11-11 08:11:44 -05:00
SkyratBot
2f4010c992 [MIRROR] Removes final remnants of 'targetted' [MDB IGNORE] (#24927)
* Removes final remnants of 'targetted' (#79626)

## About The Pull Request

Finishing what https://github.com/tgstation/tgstation/pull/79513/
started, removes 'targetted' typo from code. Also updates the basic mob
guide with the new updated var names.

## Why It's Good For The Game

Typos bad. Accurate guides good.

## Changelog

🆑
code: gets rid of the rest of the instances of 'targetted' typo from
code
/🆑

* Removes final remnants of 'targetted'

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-11-11 08:11:32 -05:00
SkyratBot
7c90b0cc48 [MIRROR] Improves how ai movement checks for if movement is allowed [MDB IGNORE] (#24920)
* Improves how ai movement checks for if movement is allowed (#79620)

## About The Pull Request

While looking into the moveloop processing issues I found a place where
moveloops were being interacted with while qdeleted. This restructures
the code a bit to prevent that being possible and also improves the
design overall here so implementers of `allowed_to_move` don't need to
be careful about their return value, which is just begging for a bug
down the line. `increment_pathing_failure` also wasn't getting called
when subtypes stopped movement.

The rest of this description is a bit of an informative lecture.

There's a pattern you do on occasion when designing public facing
functions where you have a public, but non overridden, function with
some default behavior that must always run, calling on an internal
function that *is* overridden but never called from any other location.
This is a good pattern for making sure some core behavior always runs or
for making sanity checks that can't be dodged, as the internal function
never even gets called when it has been determined that something needs
to cancel the whole thing.

Previously this code had something that looked kinda like this, there
was a proc called `pre_move` that was not supposed to be overridden, and
a proc it called called `allowed_to_move`. However, contrary to the
usual reason for doing this, `pre_move` had no behavior itself and was
meaningless. `allowed_to_move` on the other hand had exactly the sort of
sanity check that we'd want using this pattern in the form of
`if(!controller.able_to_run())`. This was allowing subtypes access to a
qdeleted move loop when it had just been deleted in the parent's version
of the proc.

This is your yearly reminder to watch out for cargo culting.

* Improves how ai movement checks for if movement is allowed

---------

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2023-11-11 01:00:56 -05:00
SkyratBot
bbd547ec95 [MIRROR] Targeting Datums Renamed (and global) [MDB IGNORE] (#24885)
* Targeting Datums Renamed (and global) (#79513)

## About The Pull Request

[Implements the backend required to make targeting datums
global](6901ead12e)

It's inconsistent with the rest of basic ai for these to have a high
degree of state, plus like, such a waste yaknow?

[Implements
GET_TARGETING_STRATEGY](d79c29134d)

Regexes used:
new.*(/datum/targetting_datum[^,(]*)\(*\)* -> GET_TARGETING_STRATEGY($1)

Renamed all instances of targetting to targeting (also targetting datum
-> targeting strategy)

I've used GET_TARGETING_STRATEGY at the source where the keys are
actually used, rather then in the listing. This works out just fine.

## Why It's Good For The Game

Not a misspelled name through the whole codebase, very slightly less
memory load for basically no downside (slight cpu cost maybe but not a
significant one.

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>

* Targeting Datums Renamed (and global)

* Update dogs.dm

* Modular

* Modular

* Modular

* Merge skew?

* Revert "Merge skew?"

This reverts commit 0889389ab5cb5c56655f1860d9173ba87efe9a22.

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-11-09 16:37:48 -05:00
SkyratBot
ddbe19d806 [MIRROR] [No GBP] Traders use Pick() to select their first customer [MDB IGNORE] (#24819)
* [No GBP] Traders use Pick() to select their first customer (#79455)

## About The Pull Request

In my trader PR, I made
`/datum/ai_behavior/find_and_set/conscious_person` return the first
person the trader found, since all they had to know was that they found
someone. However, I realized that I made the jumpscare subtype actually
move towards the target, meaning they would always move to the first
target they found in their vision range. This PR makes them use Pick().

## Why It's Good For The Game

Its good if an AI randomly picks from a search list instead of returning
the first one.

## Changelog

Nothing player facing

* [No GBP] Traders use Pick() to select their first customer

---------

Co-authored-by: Profakos <profakos@gmail.com>
2023-11-06 10:36:33 -05:00
SkyratBot
a4c123c212 [MIRROR] new wizard ability and basic leaper refactor [MDB IGNORE] (#24805)
* new wizard ability and basic leaper refactor

* Update riding_mob.dm

* Modular

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-11-05 22:01:26 -05:00
SkyratBot
fdfaf83b22 [MIRROR] Mobs will not path into dangerous turfs. [MDB IGNORE] (#24739)
* Mobs will not path into dangerous turfs. (#79428)

## About The Pull Request

Fixes #79255
Fixes #79272
Fixes #79313
Fixes #79328

As it turns out, "basic avoidance" and "dumb" AI pathfinding were both
broken with regards to dangerous turfs, as was "random walk" idle
behavior. Now, these three things will properly avoid turfs that could
kill the mob.

The global typecache of dangerous turfs has been removed, in favor of a
turf-level proc, `can_cross_safely`, which returns TRUE or FALSE based
on whether a movable atom can cross the turf without being harmed. This
obviously defaults to TRUE, and is overridden for the four dangerous
turf types:
- **Space** can be safely crossed only with TRAIT_SPACEWALK. While space
does not directly cause harm, being sent drifting away is not desirable
behavior.
- **Chasms** and **open space** can be safely crossed with
TRAIT_MOVE_FLYING.
- **Lava** can be safely crossed with TRAIT_MOVE_FLYING or
TRAIT_LAVA_IMMUNE.

If an AI's pathfinding would take it through a dangerous turf, or if it
tries to randomly step onto one, the movement will be cancelled.
## Why It's Good For The Game

Basic mobs have all been ignoring dangerous terrain this whole time.
This means that mobs on Lavaland could walk right into chasms, mobs on
multi-Z stations could be tricked into falling into pits, and so on. In
the case of idle movement, no checks were happening whatsoever, causing
similar problems without players ever being involved.

Notably, skeleton mobs on certain away missions were randomly wandering
into lava, causing one of our many random CI failures of the last week.
They won't do that anymore.

All told, this should make AI behavior a little more believable, by
giving basic mobs literally any sense whatsoever of self-preservation.
## Changelog
🆑
fix: Basic mobs will no longer randomly walk into terrain that harms or
kills them.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@ gmail.com>

* Mobs will not path into dangerous turfs.

---------

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
2023-11-02 16:36:44 -04:00
SkyratBot
b5eb26abcc [MIRROR] Basic Constructs: Wraith [MDB IGNORE] (#24655)
* Basic Constructs: Wraith (#79235)

## About The Pull Request

Converts wraith constructs to basic mobs. The last of the "mainline"
constructs, though there's still one to go after this.

Wraiths are pretty much the same as they've always been - speedy
constructs that pack a bit of a punch, built around doing hit-and-run
tactics with their ability to ethereal jaunt. Notably, I've converted
their ability to recharge their jaunts with attacks into a new
component, `recharging_attacks`. This can be placed on any basic mob to
let them recharge a cooldown action by landing hits, which could
possibly be useful in the future.

NPC wraiths are pretty straightforward, with a twist - they will always
chase down and beat to death the lowest-hp mob they can see. Happening
upon one of these while wounded will end very badly! While I originally
wanted them to be more flighty and use hit-and-run tactics, I couldn't
figure out a way to do this that didn't look kind of silly and make them
less effective overall.

In addition to the wraiths, I've done some much-needed cleanup to basic
constructs as a whole, improving some things and covering some things I
missed along the way.
- Ectoplasm drop types from constructs is now properly based on their
theme. I _believe_ I've done this in a way that will pass unit tests
this time, but we'll see if my local tests were being honest with me.
- Player-controlled constructs now attack faster. I didn't realize that
being basic mobs capped them to attacking once every 2 seconds, which is
a gigantic nerf over the simple animal version. I cut this to just 1
second, which should be much closer to how it originally was.
- Artificers actually seek out and heal the most damaged ally they can
find, instead of the least damaged. Turns out the sort was doing the
exact opposite order from what I thought, which became much more obvious
when using the same targeting behavior on wraiths.
- I put the PR number in the juggernaut update script, which I somehow
missed on that one.
- Removed the extraneous "noncult" construct subtypes that didn't do
anything. The Artificer one, which does something, is still around.
## Why It's Good For The Game

For the same reasons as the previous three. 5 more simple animals gone,
and only one construct to go until I can nuke simple constructs from the
codebase entirely. Other than that, the new component could possibly
come in handy in future designs, and the NPC behavior should hopefully
be a little scary - even if just a little.
## Changelog
🆑
refactor: Wraith constructs have been converted to the basic mob
framework. NPC wraiths are now extra cruel and will attack the
lowest-health mob they can see at any given time. Make sure this isn't
you! Please report any bugs.
fix: Artificers and juggernauts no longer attack significantly more
slowly than intended.
/🆑

* Basic Constructs: Wraith

* Update defcon2.dmm

---------

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-31 03:00:50 -04:00
SkyratBot
e501a5c02e [MIRROR] Converts traders to basic mobs [MDB IGNORE] (#24673)
* Converts traders to basic mobs (#79187)

## About The Pull Request

This PR converts the two trader mobs into basic mobs, these being the
basic debug trader that buys ectoplasm and sells ghost burgers, and Mr
Bones, who buys empty milk cartons and bones, and sells bone relate
paraphernalia.

Traders now use dynamic appearance generation. The old sprites still
exist as hallucinations, and as shop signs.

Trader UI is now summoned via `COMSIG_ATOM_ATTACK_HAND`, which properly
cancels the attack chain, so there is no longer need to put it on
Interact.

I kept most of the original behaviour, but moved them off into a
component. I have also cached all the images generated for the radials,
I hope I have not overengineered it. I have also created a new datum,
which stores the trader's wares, needs, and speech patterns.

Admins can put the component along with the trader data on any living
mobs with an AI controller, turning them into traders. Keep in mind that
most AI has random idle movement, meaning they have a chance to walk
off, closing your trader radial.

![image](https://github.com/tgstation/tgstation/assets/2676196/a2b216e9-f9bf-46e1-83fa-3a41c8447176)

The trader AI consists of the following, first, when a trader sees
someone, they will deploy their shop, if one does not already exists.
The shop consists of a chair, and a holographic sign. If you attack
them, they will chase you with their weapons, and then return to their
chair when victorious. If the chair is somehow destroyed, they will
create a new shop when they see a new potential customer.

![image](https://github.com/tgstation/tgstation/assets/2676196/ad5fcd5a-996c-490f-938b-6bc11c91c4ee)

Mr Bones uses a variant of the AI, where they will run at you, and
deploy their shop when they reach you. I call this the jumpscare
variant. Below you can see me getting actually jumpscared because Mr
Bones has stepped on a yelling frog when I opened the maintenance door.

![image](https://github.com/tgstation/tgstation/assets/2676196/f47a5baa-e32d-4454-97f9-d90d027003d2)

I have also made an element that toggles an ai controlled combat mode
when it gains a target, and when it loses it. I am using it to make
Traders unable to trade while they are trying to kill a robber. To aid
this, I a have made
`/datum/ai_controller/proc/sig_remove_from_blackboard` send the
`COMSIG_AI_BLACKBOARD_KEY_CLEARED` signal, in case the trader kills a
mob that deletes itself on death. This means I could remove a signup
`/datum/component/appearance_on_aggro` was doing towards Qdeleting.

Below you can see Mr Bones shooting me with candy corn.

![image](https://github.com/tgstation/tgstation/assets/2676196/489e1072-e15a-412c-a8eb-9a3f0cca7bf6)

![image](https://github.com/tgstation/tgstation/assets/2676196/8f74b50f-ea35-467c-bb07-2ef38f84c453)

Traders actually only shoot you until you are conscious, so I survived
here in crit. Most mobs don't have crit state, so they just die, so I am
sticking by this voice line.

Thank you @ CoiledLamb  for help with the sale sign!

## Why It's Good For The Game

Two more mobs off the list. The AI and Componentized behaviours allows
us to set up new kind of traders.

## Changelog

🆑
refactor: Traders are basic mobs now. Please alert us of any strange
behaviours!
code: If there is only one option, radial lists will autopick it. This
behaviour can be turned off via a new argument.
/🆑

* Converts traders to basic mobs

---------

Co-authored-by: Profakos <profakos@gmail.com>
2023-10-31 02:16:50 -04:00
SkyratBot
c056f4dac9 [MIRROR] Nanotrasen basic mobs. [MDB IGNORE] (#24573)
* Nanotrasen basic mobs. (#78917)

## About The Pull Request

First and foremost, converts all Nanotrasen simplemobs into basic mobs.

To avoid messy and redundant code, or god forbid, making Nanotrasen mobs
a subtype of Syndicate ones, I've made Syndicate, Russian, and
Nanotrasen mobs all share a unified "Trooper" parent. This should have
no effect on their behaviors, but makes things much easier to extend
further in the future.

While most of this PR is pretty cut-and-dry, I've done a couple notable
things. For one, all types of ranged trooper will now avoid friendly
fire, instead of shooting their friends in the back. Even the Russians
have trigger discipline.

I've also created a new AI subtree that allows mobs to call for
reinforcements. I've hopefully made this easy to extend, but the
existing version works as follows:

- A mob with this subtree that gains a target that is also a mob will
call out to all mobs within 15 tiles.
- If they share a faction, mobs receiving the call will have the target
added to their retaliate list, and have a new key set targeting the
calling mob.
- If they have the correct subtree in their AI controller, called-to
mobs will then run over to help out.

Sadly, this behavior is currently used only by a few completely unused
Nanotrasen mobs, so in practice it will not yet be seen.

Finally, I've fixed a minor issue where melee Russian mobs punch people
to death despite holding a knife. They now use the proper effects for
stabbing instead of punching.
## Why It's Good For The Game

Removes 8 more simple animals from the list.

As said above, making all "trooper" type mobs share a common parent cuts
down on code reuse, ensures consistency of behavior, and makes it much
easier to add new troopers not affiliated with these groups. I expect
that I'll make pirates share this same parent next.

The new "reinforcements" behavior, though extremely powerful, opens up
exciting new opportunities in the future. There aren't many existing
behaviors that allow basic mobs to work _together_ in interesting ways,
and I think adding some enemy teamwork could be fun.
## Changelog
🆑
refactor: Hostile Nanotrasen mobs now use the basic mob framework. This
should make them a little smarter and more dangerous. Please report any
bugs.
fix: Russian mobs will now actually use those knives they're holding.
/🆑

* Nanotrasen basic mobs.

* Modular

---------

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-24 21:42:47 -04:00
SkyratBot
6e2fcee00b [MIRROR] Basic Constructs: Artificer [MDB IGNORE] (#24456)
* Basic Constructs: Artificer (#79015)

## About The Pull Request

Really getting into the meat of the constructs now. Artificers have
become basic mobs.

On the whole, this was a pretty rote conversion, with no significant
gameplay changes other than the switch to using healing hands rather
than a unique heal ability. The player experience as an artificer is
more or less identical.

The _interesting_ part comes with the AI for the seldom-used "hostile"
variant. Hostile artificers, being squishy and laughably weak, are now a
dedicated "medic" role for constructs. They will perform triage, always
seeking the most wounded construct (or shade!) to give healing to. They
will not attack at all, but they _will_ flee with great speed if
attacked and not busy healing. If they are healing another construct,
they will remain even if they are beaten to death.

I've added some more AI functionality that may come in handy in the
future, and done some refactoring to keep things from getting out of
hand:
- A planning subtree for finding targets that will always select the
most heavily wounded living target that the mob can see (or rather, the
one with the least health). Useful again for medical triage, or for
making a particularly cruel mob that always attacks whoever is easiest
to kill. I plan to use this for NPC wraith constructs when I convert
them.
- Targeting datums can now check a blackboard key to see if they should
only target wounded mobs. This is particularly useful for "medic" type
mobs such as this one.
- I've refactored the "minimum stat" behavior of targeting datums to be
stored in a blackboard key. This removes the need to have unique
subtypes for each different minimum stat we might want. Which... for the
most part, weren't even used, leading to proliferation of several
completely identical targeting datums in a bunch of different files.
Hopefully this change will make things cleaner.

In addition, this PR fixes a pair of bugs from #78807 that I didn't
catch:
- Healing constructs can now actually heal shades. Turns out I forgot to
add the correct biotype.
- Healing hands, when set to print the target's remaining health, no
longer does so as a visible message.

The one thing I didn't do that I kind of wanted to is make NPC
artificers heal themselves when wounded and not busy doing something
else, but it ended up being kind of annoying to make a mob willingly
target itself. NPC artificers never had this behavior before, so I
consider it okay, but maybe I'll circle back to it later.
## Why It's Good For The Game

Another basic conversion, another 5 items off the checklist. Very little
should change in-game, though I think the new NPC AI could make for
interesting challenges in ruins or bitrunning or something.
## Changelog
🆑
refactor: Artificer constructs have been converted to the basic mob
framework. This should change very little about them, but please report
any bugs. NPC artificers are now smarter, and will focus on healing
nearby wounded constructs - if you see them, take them out first!
/🆑

* Basic Constructs: Artificer

* Modular

* Modular paths

* Modular paths

---------

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-20 02:54:31 -04:00
SkyratBot
cffff937f6 [MIRROR] new syndicate item - bee smoker [MDB IGNORE] (#24450)
* new syndicate item - bee smoker (#78988)

## About The Pull Request
this adds a new item for traitor botanists they can buy for 4 tc. it
releases smoke which hypnotizes bees to follow ur every command, it can
be used on a single bee or it can be used on a hive to hypnotize all the
bees who live there. u can command the bees to enter or exit their
beehive, and u can also command them to spiral around u where they will
follow u and swirl around u to confuse whichever opponent u are
fighting, and u can also command them to attack people. the bee smoker
comes with some fuel but u can recharge it by putting cannabis into it.
the stronger the weed the more fuel it will provide

https://github.com/tgstation/tgstation/assets/138636438/18c9a350-8e24-4c49-abfa-dffb7622502f

## Why It's Good For The Game
adds a traitor item which gives a new gameplay alternative for botanist
and pacifist players. also i noticed the pet targetting datum was using
some copy paste code so i made it a subtpye of the basic targetting
datum

## Changelog
🆑
add: added a new syndicate item - the bee smoker
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>

* new syndicate item - bee smoker

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
2023-10-20 00:29:10 -04:00
SkyratBot
1dd5011776 [MIRROR] Adds pathmaps, refactors pathfinding a bit [MDB IGNORE] (#24414)
* Adds pathmaps, refactors pathfinding a bit (#78684)

## About The Pull Request

Implements /datum/pathfind/sssp, which generates /datum/path_map

/datum/path_maps allow us to very efficently generate paths to any turf
they contain from their central point.

We're effectively running the single source shortest paths algorithm.
We expand from the center turf, adding turfs as they're found, and then
processing them in order of addition.
As we go, we remember what turf "found" us first. Reversing this chain
gives us the shortest possible path from the center turf to any turf in
its range (or the inverse).

This isn't all that useful on its own, outside of a few niche cases
(Like if we wanted to get the farthest reachable turf from the center)
but if we could reuse the map more then once, we'd be able to swarm
to/from a point very easily.

Reuse is a bit troublesome, reqiures a timeout system and a way to
compare different movables trying to get paths.
I've implemented it tho. I've refactored CanAStarPass to take a datum,
/datum/can_pass_info. This is built from a movable and a list of access,
and copies all the properties that would impact pathfinding over onto
itself.

There is one case where we don't do this, pathing over openspace
requires checking if we'd fall through the openspace, and the proc for
that takes an atom.
So instead we use the weakref to the owner that we hold onto, and hold
copies of all the values that would impact the check on the datum.

When someone requests a swarmed path their pass info is compared with
the pass info of all other path_maps centered on their target turf. If
it matches and their requested timeout isn't too short, we just reuse
the map.

Timeout is a tricky thing because the longer a map exists the more out
of date it gets.
I've added a few age defines that let you modulate your level of risk
here. We default to only allowing maps that are currently
being generated, or finished generating in our tick.
Hopefully this prevents falling into trouble, but consumers will need to
allow "failed" movements.

As a part of this datumized pass info, I've refactored pathfinding to
use access lists, rather then id cards directly. This also avoids some
dumbass harddel oppertunities, and prevents an idcard from changing mid
path.

Did a few things to the zPass procs, they took args that they did NOT
need, and I thought it'd be better to yeet em.

If you'd all like I could undo the caching/can_pass_info stuff if you'd
all like. I think it's useful generally because it avoids stuff changing
mid pathfind attempt, but if it's too clunky I could nuke it.

Oh also I added optional args to jps that constricts how it handles
diagonals. I've used this to fix bot paths.

## Why It's Good For The Game

Much of this is redundant currently. I'm adding it because it could have
saved hugglebippers, and because I get the feeling it'll be useful for
"grouping" mobs like bees and such.
We're doing more basic mob work currently and I want to provide extra
tools for that work.

https://github.com/tgstation/tgstation/assets/58055496/66aca1f9-c6e7-4173-9c38-c40516d6d853

## Changelog
🆑
add: Adds swarmed pathfinding, trading accuracy for potential
optimization of used correctly
fix: Bots will no longer take diagonal paths, preventing weirdo looking
path visuals
refactor: Refactored bits of pathfinding code, hopefully easier to add
new pathfinding strategies now
/🆑

* Adds pathmaps, refactors pathfinding a bit

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-10-18 03:31:21 -04:00
SkyratBot
fa31acc3ec [MIRROR] Fixes a runtime with AI targeting code, refactors faction checking to be at the atom/movable level [MDB IGNORE] (#24386)
* Fixes a runtime with AI targeting code, refactors faction checking to be at the atom/movable level (#78803)

## About The Pull Request

Saw this in CI.

![firefox_lCYnPMJIqm](https://github.com/tgstation/tgstation/assets/13398309/8ef309df-09b6-4096-b6aa-340b59f7446b)

~~Quick fix for it--because turrets are not mobs trying to call this
proc on them will runtime. So let's give them their own implementation
of the proc.~~ Just kidding, let's refactor faction checking entirely

## Why It's Good For The Game

Fixes an issue with basic mob AI targeting and turrets.

## Changelog

🆑
fix: basic mobs will no longer runtime when trying to check the faction
of a porta turret
refactor: faction checking is now done at the atom/movable level
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Fixes a runtime with AI targeting code, refactors faction checking to be at the atom/movable level

* Modular updates

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-10-16 21:41:24 -04:00
SkyratBot
0d5a0c0bb9 [MIRROR] Goats will randomly attack you [MDB IGNORE] (#24312)
* 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>

* Goats will randomly attack you

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-10-13 00:30:01 -07:00
SkyratBot
b2ccdeab8b [MIRROR] Basic Mob Gorillas [MDB IGNORE] (#24284)
* 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.
/🆑

* Basic Mob Gorillas

* Modular paths

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-11 21:27:23 -04:00
SkyratBot
3869212f81 [MIRROR] Mook village and basic mook refactor [MDB IGNORE] (#24269)
Mook village and basic mook refactor

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2023-10-11 02:32:36 -04:00
SkyratBot
fd1d9e4ee8 [MIRROR] Fixes fleeing behaviour [MDB IGNORE] (#24223)
* 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.
/🆑

* Fixes fleeing behaviour

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-09 07:34:46 -04:00
SkyratBot
ade3fb2813 [MIRROR] ice demon basic mobs [MDB IGNORE] (#24188)
* ice demon basic mobs

* Modular updates

* Modular updates

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-08 08:06:23 -04:00
SkyratBot
f6577ec049 [MIRROR] Refactors Sloths into Basic Mobs [MDB IGNORE] (#24171)
* Refactors Sloths into Basic Mobs (#78752)

## About The Pull Request

Hey there,

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

Three more subtypes off the list, we are now sub-200 simple animals left
to refactor. If people want to play catch with their sloth it should be
much easier to fit that in now.
## Changelog
🆑
refactor: Sloths are now basic mobs, however their overall sluggish
behavior shouldn't have changed much- let us know if anything is broken.
/🆑

* Refactors Sloths into Basic Mobs

* Modular path

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-07 23:23:36 +00:00
SkyratBot
08f914ed28 [MIRROR] Basic Heretic Mobs: The Rest of Them [MDB IGNORE] (#24155)
* Basic Heretic Mobs: The Rest of Them

* Update tgstation.dme

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-10-07 19:13:32 -04:00
SkyratBot
42107438c5 [MIRROR] Dogs now flee from mobs with tongs [MDB IGNORE] (#24161)
* Dogs now flee from mobs with tongs (#78797)

AI dogs with the dog controller behaviour will flee from a target with
tongs in hand.

Untested because I literally cannot play byond.

## Why It's Good For The Game
https://www.youtube.com/watch?v=cXIAZtwvgz0

## Changelog
🆑 oranges
add: Dogs now react to centrist grillers more realistically
/🆑

* Dogs now flee from mobs with tongs

---------

Co-authored-by: oranges <email@oranges.net.nz>
2023-10-06 18:53:40 -07:00
SkyratBot
58c20a99fb [MIRROR] Basic blob mobs [MDB IGNORE] (#23938)
* Basic blob mobs

* Update blackmesa.dmm

* Modular update

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-09-30 00:15:55 -04:00
SkyratBot
8cdc0fbe61 [MIRROR] Refactors Snakes into Basic Animals [MDB IGNORE] (#23972)
* Refactors Snakes into Basic Animals (#78612)

* Refactors Snakes into Basic Animals

* Modular paths

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-09-28 03:21:34 -04:00
SkyratBot
d157d55a33 [MIRROR] Turns Robot Customers into Basic Mobs [MDB IGNORE] (#23978)
* Turns Robot Customers into Basic Mobs (#78611)

* Turns Robot Customers into Basic Mobs

---------

Co-authored-by: san7890 <the@san7890.com>
2023-09-27 23:31:37 -04:00
SkyratBot
37a8f73ae3 [MIRROR] Basic Legion & Hivelord [MDB IGNORE] (#23964)
* Basic Legion & Hivelord

* Update modular + fix diffs

* Fixing diffs

* More diffs

* Adds an AI behavior to replace the 'wander = 0' varedit for the hivelord gate guardians

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-09-27 22:30:02 -04:00
SkyratBot
f5781b2aa1 [MIRROR] Add new sounds for animals, basic animals make sound on audible emote [MDB IGNORE] (#23917)
* 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>

* Add new sounds for animals, basic animals make sound on audible emote

* Sound path changes

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: tattle <article.disaster@ gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-09-27 02:41:08 -04:00
SkyratBot
997480df18 [MIRROR] basic mobs ranged attacks can check for friendly fire [MDB IGNORE] (#23918)
* basic mobs ranged attacks can check for friendly fire (#78451)

## About The Pull Request
basic mobs can check for friends in the way before firing a attack. if
they find someone in the way they will try to adjust their position so
their friends dont get hit by the projectiles

## Why It's Good For The Game
nice optional feature people can put on the monsters they create

## Changelog
🆑
add: added ranged attack friendly fire checks for basic mobs. minebots
and hivebots will now try to avoid shooting their friends
/🆑

* basic mobs ranged attacks can check for friendly fire

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2023-09-26 00:55:42 -07:00
SkyratBot
df0d2b6ab4 [MIRROR] [no gbp] fixes blackboard speech error [MDB IGNORE] (#23901)
* [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>

* [no gbp] fixes blackboard speech error

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
2023-09-25 13:40:49 -04:00
SkyratBot
3836aaad45 [MIRROR] basicmob clowns [MDB IGNORE] (#23867)
* 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>

* basicmob clowns

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
2023-09-23 14:37:18 -04:00
SkyratBot
7509292edd [MIRROR] Basic Mob Brimdemon [MDB IGNORE] (#23863)
* 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
/🆑

* Basic Mob Brimdemon

* Modular

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-09-23 03:52:28 -04:00
SkyratBot
b5f951d9c6 [MIRROR] seedling basic mobs [MDB IGNORE] (#23857)
* seedling basic mobs (#78224)

## About The Pull Request
this is a mob that was removed from the game since years ago. this pr
refactors them and readds them to the game. seedlings now can have
different colored petals!

![petalcolors](https://github.com/tgstation/tgstation/assets/138636438/7c657c49-9186-4563-a93f-eba35e335ce9)

to obtain this monster, botany can now grow them out of 'seedling' seeds
that they can find in the exotic seeds crate. this mob loves to help all
plants and when its grown out of the seed, it will help the botanists
look after their plants. it can water plants (if it finds a bucket),
remove weeds and remove dead plants. they will also use their solarbeam
ability to provide small healing to damaged plants. it will try to
refill its bucket with water if there is a water source near by. it will
also follow the orders of whoever harvested it.

![plantbotany](https://github.com/tgstation/tgstation/assets/138636438/4cde0613-0869-4fea-8851-2e6f4680d9d7)

traitors can buy a seed from the uplink that grows an evil version of
the seedlings, they can command them to attack people and use abilities
and to cause chaos on the station.

## Why It's Good For The Game
refacotrs the seedlings into basic mobs

## Changelog
🆑
refactor: seedlings have been refactored into basic mobs please report
any bugs
add: seedlings now can have different colored petals and can look after
botanys plants
add: seedlings are re-added to the game! they grow out of seedling seeds
obtainable from exotic seed crates or traitor uplink
/🆑

* seedling basic mobs

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2023-09-22 11:09:30 -07:00