* Makes immerse use weakrefs (#80594)
## About The Pull Request
Immerse was causing harddels due to it having references to mobs. Makes
it use weakrefs for mobs instead.
## Why It's Good For The Game
Immerse would cause harddels if a mob was deleted while it was in it's
list. It could probably also happen if a turf was deleted too, but doing
that here would be much harder.
no CL since nothing playerfacing
* Makes immerse use weakrefs
---------
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
* Optimize find_potential_targets self cost (#80602)

`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>
* Fix "/datum/element/damage_threshold looks unharmed!" (#80546)
Fixed a bug that would give you the chat message
* Fix "/datum/element/damage_threshold looks unharmed!"
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* initial d
* holy shit i forgot
* i got so much cheese in my pocket, they thought I was a fucking calzone
* opp was sneak-dissing on the 'gram, turned his city into pompeii
* Just fixing some diffs (line breaks should match tg)
* Fixes these edit comments
---------
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Throwing a bee at someone injects reagents (#80354)
## About The Pull Request
Throwing a bee at someone injects that bee's reagents.
This has a larger code footprint than you might expect because venom
injection is done via an element which in turn gives a callback to a
component.
While I was touching that I also separated `COMSIG_MOVABLE_IMPACT` into
`COMSIG_MOVABLE_PRE_IMPACT` because a lot of effects trigger from
`COMSIG_MOVABLE_IMPACT` despite the fact that the throw impact can be
cancelled after the signal is sent.
I also added an inject check onto the venomous element for mob attacks,
so thick clothing can now protect you from venom injection.
I elected that Giant Spiders have big enough fangs to ignore this such
that this isn't a major balance change, as do moonicorns (that horn is
massive), Fire Sharks, and Clowns (no idea how they are applying chems
at all to be honest).
## Why It's Good For The Game
I thought about someone throwing a bee at someone like a little dart and
thought "hee hee"
## Changelog
🆑
add: If you throw a bee at someone it will hit them sting-first and
inject that bee's reagent
balance: Thick clothing can now protect you from the venom of bees,
snakes, frogs, and (small) spiders
/🆑
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
* Throwing a bee at someone injects reagents
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
* Prevents something fucky with elevation and glass tables (#80187)
## About The Pull Request
Objects can be destroyed during a movement loop before the abstract
entered signal can be sent, so we need to make sure only mobs that have
been elevated are dropped down.
## Why It's Good For The Game
Fixes#80169
## Changelog
🆑
fix: climbing or being shoved into a glass table won't cause elevation
issues.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Prevents something fucky with elevation and glass tables
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Attack chain refactoring: Broadening `tool_act` into `item_interact`, moving some item interactions to... `atom/item_interact` / `item/interact_with_atom`
* Patches up merge skew (#80197)
## About The Pull Request
Yeah #79968 (1e76fd70b4) was not
compatible with master but no one said anything on the PR so i got
jebaited into merging it. The code should be up to the same standards
per the documentation I read (preventing thwacking the target in certain
situations while not returning anything in other situations)
master will definitely compile now though
* Patches up merge skew
* Merge conflicts
* Modular adjustments
* Removes this entirely duplicated proc...
* Update tool_override.dm
* Update weldingtool.dm
* Update tool_override.dm
* Update tool_override.dm
* Nope. Copy paste begone.
A skyrat edit is so much easier to deal with here
* Update brand_intelligence.dm
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Fix cult halo and eyes affecting deconverted cultists (#80148)
## About The Pull Request
Fixes#69423
Cult halo and eyes were appearing on deconverted cultists due to a delay
when the element gets attatched. This lead to a small window of
oppurtunity where someone could get converted, then deconverted, and
still have the cult icons appear on them later.
## Why It's Good For The Game
The Antichrist is dead.
## Changelog
🆑
fix: Fix cult halo and eyes affecting deconverted cultists
/🆑
* Fix cult halo and eyes affecting deconverted cultists
---------
Co-authored-by: Tim <timothymtorres@gmail.com>
* [no gbp] some medbot fixes (#80150)
## About The Pull Request
medbots now drop hats when tipped closes#80134
medbots now drop their items when they explode
player controlled bots now have their normal speed back
## Why It's Good For The Game
they will now correctly drop their hats when tipped
## Changelog
🆑
fix: medbots now drop hats when tipped and drop their items when they
explode
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* [no gbp] some medbot fixes
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* [NO GBP] Fixing elevation furthermore (#80099)
## About The Pull Request
fixes#80059fixes#80085.
The tram transportation doesn't use `forceMove()`, instead it just
changes the location of the objects directly. What's more, it doesn't
call `oldloc.Exited()` or `loc.Entered()` but only for areas. The
abstract exited/entered signals are from `Moved()` though, which is
called.
df4bc6d948/code/modules/transport/transport_module.dm (L519-L527)
About beds, well, I just happened to put a minus symbol where it
shouldn't be.
## Why It's Good For The Game
Truly one of the fuckups of the year. Now tested. I'll make a unit test
later.
## Changelog
🆑
fix: Fixed some oopsie whoopsie with elevation, trams and beds causing
people to visually ascend or descend to heaven or hell.
/🆑
* [NO GBP] Fixing elevation furthermore
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* 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.


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)

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>
* Fixes riding vehicles on tables and lying on beds (#80053)
## About The Pull Request
Fixes#80027. My bad.
EDIT: Also fixes#80050.
## Why It's Good For The Game
See the issues above.
## Changelog
🆑
fix: Fixed an issue with the offsets of ridden vehicles on tables, and
another when buckled to a bed.
/🆑
* Fixes riding vehicles on tables and lying on beds
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* [NO GBP] Fixes footsteps runtimes, part 2 (#79936)
## About The Pull Request
https://github.com/tgstation/tgstation/pull/79903 Fixed the most common
one, but there are still more of these runtimes it seems.

This should take care of all the rest. It turns out that any one of the
step types keys in the list returned by `prepare_step()` can have `null`
values—not just the barefoot one—so we have to check for that in every
instance where we read from it.
(Shown here: the list that gets returned. Note that any one of these
turf vars can be `null`, aka these are the values that we need to
nullcheck for)
4a6d2b9297/code/datums/elements/footstep.dm (L96)
## Why It's Good For The Game
Bugfix
## Changelog
🆑
fix: fixed remaining footstep runtimes
/🆑
* [NO GBP] Fixes footsteps runtimes, part 2
---------
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* Different pen types have unique behavior when used in foam darts. (#79587)
## About The Pull Request
This PR makes the following changes:
- Refactors inserting items into foam darts into a component on items
that can be inserted into darts
- Adds the aforementioned component to pens
- Provides an inspection tip for how to modify a foam dart
- Gives different pen types specific behavior when used in a foam dart
Pens typically give a foam dart 5 brute and 50% embed chance (affected
by falloff). The following types of pens give the specified properties
(usually directly derived from the pen's stats and additional
functions):
- Red pen (and four-color pen set to red): Slightly faster dart
- Captain's fountain pen: Slightly faster dart, and 75% base embed
chance
- Sleepypen: Tries to inject its reagents into the hit mob, but doesn't
penetrate thick clothing like syringe guns do
- Energy Dagger: 35 brute, 100% base embed chance, and slightly faster
dart
- Survival Pen: Mines rocks on impact
- Fine Tip Pen (if someone somehow manages to get one): 100 bare wound
bonus and 9000 demolition modifier
## Why It's Good For The Game
Expands the emergent gameplay possibilities of using pens in foam darts.
While there are balance risks involved with traitors being able to buy
the equivalent of reusable 45u syringe shots and 35 brute bullets, you
are not likely to get your pen back once it hits its target, unless you
somehow have the recall spell and have bound the pen to it. There are
probably more TC-efficient ways to achieve comparable projectile
weaponry, but foam dart guns have an air of subtlety to them... at least
until your skin is pierced by a pointy writing implement that may also
be something more deadly. If maintainers still have balance concerns,
please let me know.
## Changelog
🆑
add: Certain types of pens now function like you expect they would when
inserted into a foam dart
qol: Examining a foam dart closely will show you how to modify it, or
what it is modified with
/🆑
* Different pen types have unique behavior when used in foam darts.
---------
Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
* Adds `UPSIDE_DOWN` movetype for negative gravity / makes Atrocinator affected by less things (#79785)
## About The Pull Request
Fixes#79764
I was going to tackle this issue by slamming `TRAIT_NO_SLIP_ALL` on
Atrocinator users and calling it a day, but like, that didn't feel
proper.
So I thought hey, we could just give them the flying movetype, even
though they technically aren't flying it means they're unaffected by
things that flying would make you unaffected by.
Nope, this means the mob technically "negates gravity", so no falling
and no feetsteps.
Let's try floating - this give us feetsteps but no falling upwards.
So instead of going back to square one, with `TRAIT_NO_SLIP_ALL`, I
decided to go for the more complex route of just adding a movetype.
Hence, move type `UPSIDE_DOWN`. This covers situations where a mob would
be "floating" above the ground, but still walking. ...Negative gravity.
This means overall the Atrociator acts more as you'd expect - you don't
slip on ice, you don't trigger bear traps or mouse traps, you can walk
over railings, unaffected by conveyor belts, etc.
## Why It's Good For The Game
Makes the Atrocinator a lot more consistent with how you'd expect for it
to work.
Admittedly it is a bit niche use of movetypes, but it can possibly be
expanded to more things in the future, who knows? I applied it to mobs
on meat spikes (even though they don't move), just for proof of concept.
## Changelog
🆑 Melbert
fix: Atrocinating mobs will now behave more as you'd expect. Meaning
they don't slip on wet patches, can't trigger bear traps / landmines /
mouse traps, ignore conveyors, and can walk over tables and railings.
fix: Floating mobs are unaffected by conveyor belts, acid (on the
ground), glass tables
fix: Floating mobs won't squish stuff like roaches anymore
fix: Fixes bear traps triggering on floating / flying mobs
/🆑
---------
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
* Adds `UPSIDE_DOWN` movetype for negative gravity / makes Atrocinator affected by less things
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
* 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>
* Splits placeontop proc (#79702)
## About The Pull Request
I find the proc hard to read honestly. There's no reason we can't split
this into two functions - the secondary functionality is used only once,
in reader.dmm.
## Why It's Good For The Game
Code improvement
Glorious snake case
## Changelog
N/A nothing player facing
---------
Co-authored-by: san7890 <34697715+san7890@ users.noreply.github.com>
* Splits placeontop proc
* Update brass_spreader.dm
---------
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: san7890 <34697715+san7890@ users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* Fixes some fried food exploits (#79789)
## About The Pull Request
I would've been content to leave these, but you guys just haaaad to
overdo it
- Plates now respect weight class of items on top
- Fried food now respect volume of existing items
## Why It's Good For The Game
These exploits are not intended and have potential and, if abused, can
severely detract from rounds.
## Changelog
🆑 Melbert
fix: Plates now respect the weight class of items on top.
fix: Fried items now respect existing volume cap.
fix: Smartfridges now don't accept bulky food items, good thing we have
none of those right guys?
/🆑
* Fixes some fried food exploits
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Code compression for reagent holder. Lowers plumbing reaction chamber tick usage (#79686)
## About The Pull Request
More code improvements for reagent holder. As you can see it removes a
lot more code than it adds so code savings are significant. This does
not touch on any floating point arithmetic, all that is behind us, this
focuses on removing redundant procs and merging existing procs to
achieve the same functionality so if you do see any changes in reagent
related behaviour it's not intentional and should be reported as a bug
here.
The following code changes can be summarized into points.
**1. Removes procs `get_master_reagent_id()` &
`get_master_reagent_name()`**
Both of these procs have the exact same functionality as
`get_master_reagent()` with the only exception of returning a different
value. Instead we can just call `get_master_reagent()` directly and
infer the name & type of it ourselves rather than creating a wrapper
proc to do it for us, therefore reducing overall code
**2. Removes & Merges `remove_all_type()` proc into `remove_reagent()`**
The proc `remove_all_type()` is highly inefficient, it first uses a for
loop to look for the reagent to remove & then it again calls
`remove_reagent()` on the reagent once it has found it. We can just
embed this functionality directly into `remove_reagent()` by simply
adding an additional parameter `include_subtypes`. This way the
operation is faster, and we reduce the code to get the job done. Also
now `remove_reagent()` will return the total volume of reagents removed
rather that a simple TRUE/FALSE
**3. Removes & Merges `trans_id_to()` proc into `trans_to()`**
Both these procs have the same job of transferring either a single
reagent or all reagents. `trans_id_to()` is a scaled down version of
`trans_to()` because
- It does not have any `method` var. This means if you want to transfer
a single reagent to a mob/organ or any other object it does not have the
functionality to expose the target to that transferred reagent.
- It does not have a `multiplier` var to scale reagent volumes
- It does not have code to deal with organs or stop reactions i.e. it
does not have the `no_react` var.
We can overcome all these short comings by simply adding an extra var
`target_id` to specify what specific reagent to transfer therefore
attaining the same functionality while keeping the benefits of
`trans_to()` proc therefore reducing overall code
**4. Lowers plumbing reaction chamber tick usage for balancing ph.**
Rather than invoking a while loop to balance ph it's much easier for the
player to simply make the reaction chamber wait for e.g. add a reagent
that will never come. This will make the chamber wait therefore giving
the reaction chamber ample time to correctly balance the ph and then
remove that reagent from the list therefore getting correct ph levels.
No need to create code hacks when the player can do it themselves so
the while loop has been removed
## Changelog
🆑
code: removed redundant procs `get_master_reagent_id()` &
`get_master_reagent_name()`
code: merged `remove_all_type()` proc with `remove_reagent()` now this
proc can perform both functions. `remove_reagent()` now returns the
total volume of reagents removed rather than a simple TRUE/FALSE.
code: merged `trans_id_to()` proc with `trans_to()` now this proc can
perform both functions
refactor: plumbing reaction chamber will now use only a single tick to
balance ph of a solution making it less efficient but more faster. Just
make the reaction chamber wait for longer periods of time to accurately
balance ph
refactor: reagent holder code has been condensed. Report any bugs on
GitHub
/🆑
* Code compression for reagent holder. Lowers plumbing reaction chamber tick usage
* Modular update
* Update alcohol_reagents.dm
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* [NO GBP] Fixes catwalks over open space not making a sound when walked over. (#79738)
## About The Pull Request
See the title.
## Why It's Good For The Game
Actually fixing #78646.
## Changelog
🆑
fix: Fixed catwalks over open space not making a sound when walked over.
/🆑
* [NO GBP] Fixes catwalks over open space not making a sound when walked over.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Fixes Relay Attackers Misfire (#79731)
## About The Pull Request
Fixes#76079
Basically we were both not getting all of the args that we recieve from
`COMSIG_ITEM_AFTERATTACK` which included the very important
`proximity_flag` which tells us if the person was in range to actually
hurt us or not. This means that clicking a mob with this element with a
stack of metal from across the room would cause them to aggro, which
makes no sense whatsoever. Let's actually use that proximity check.
We listen for projectiles hitting us separately, don't worry.
## Why It's Good For The Game
It just makes no damn sense, fixes some weird ass behavior.
## Changelog
🆑
fix: Bar Bots (and several other mobs) will no longer aggro on you if
you click on them with a "forceful" item from halfway across the room.
/🆑
* Fixes Relay Attackers Misfire
---------
Co-authored-by: san7890 <the@san7890.com>
* loopable looms (#79680)
## About The Pull Request
makes the looms `loom_me` proc loop for stackable items (such as
cotton).
## Why It's Good For The Game
its a looping do_after, which is satisfying (and you don't need to click
as much).
## Changelog
🆑
qol: looms will now attempt to loop through stackable items (cotton as
an example)
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* loopable looms
---------
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* 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>
* Basic Guardians/Holoparasites (#79473)
## About The Pull Request
Fixes#79485Fixes#77552
Converts Guardians (aka Holoparasites) into Basic Mobs.
Changes a bunch of their behaviours into actions or components which we
can reuse.
Replaces some verbs it would give to you and hide in the status panel
with action buttons that you may be able to find more quickly.
They _**should**_ work basically like they did before but a bit
smoother. It is not unlikely that I made some changes by accident or
just by changing framework though.
My one creative touch was adding random name suggestions.
The Wizard federation have a convention of naming their arcane spirit
guardians by combining a colour and a major arcana of the tarot. The
Syndicate of course won't truck with any of that mystical claptrap and
for their codenames use the much more sensible construction of a colour
and a gamepiece.
This lets you be randomly assigned such creative names as "Sparkling
Hermit", "Bloody Queen", "Blue World", or "Purple Diamond".
You can of course still ignore this entirely and type "The Brapmaster"
into the box if so desired.
I made _one_ other intentional change, which is to swap to Mothblocks'
nice leash component instead of instantly teleporting guardians back to
you when they are pulled out of the edge of their range. They should now
be "dragged" along behind you until they can't path, at which point they
will teleport. This should make the experience a bit less disorienting,
you have the recall button if you _want_ to instantly catch up.
This is unfortunately a bumper-sized PR because it did not seem
plausible to not do all of it at once, but I can make a project branch
for atomisation if people think this is too much of a pain in the ass to
review.
Other changes:
- Some refactoring to how the charge action works so I could
individually override "what you can hit" and "what happens when you hit"
instead of those being the same proc
- Lightning Guardian damage chain is now a component
- Explosive Guardian explosive trap is now a component
- Added even more arguments to the Healing Touch component to allow it
to heal tox/oxy damage and require a specific click modifier
- Life Link component which implements the Guardian behaviour of using
another mob as your health bar
- Moved some stuff about deciding what guardians look and are described
like into a theming datum
- Added a generic proc which can return whether your mob is meant to
apply some kind of damage multiplier to a certain damage type. It's not
perfect because I couldn't figure out how ot cram limb modifiers in
there, which is where most of it is on carbons. Oh well.
- Riders of vehicles now inherit all movement traits of those vehicles,
so riding a charging holoparasite will let you cross chasms. Also works
if you piggyback someone with wings, probably.
## Changelog
🆑
refactor: Guardians/Powerminers/Holoparasites now use the basic mob
framework. Please report any unexpected changes or behaviour.
qol: The verbs used to communicate with, recall, or banish your Guardian
are now action buttons.
balance: If (as a Guardian) your host moves slightly out of range you
will now be dragged back into range if possible, rather than being
instantly teleported to them.
balance: Protectors now have a shorter leash range rather than a longer
one, in order to more easily take advantage of their ability to drag
their charge out of danger.
balance: Ranged Guardians can now hold down the mouse button to fire
automatically.
balance: People riding vehicles or other mobs now inherit all of their
movement traits, so riding a flying mob (or vehicle, if we have any of
those) will allow you to cross chasms and lava safely.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Basic Guardians/Holoparasites
* Modular
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* 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>
* Fix light eater affecting lava, space, openspace, and transparent turfs (#79393)
## About The Pull Request
Fixes#79388
Light eater element can no longer affect lava, space (starlight),
openspace, or any turf with transparency.
## Why It's Good For The Game
Better consistency.
## Changelog
🆑
fix: Fix light eater affecting lava, space, openspace, and transparent
turfs
/🆑
* Fix light eater affecting lava, space, openspace, and transparent turfs
---------
Co-authored-by: Tim <timothymtorres@gmail.com>
* Wall smashing > Wall tearing (#79432)
## About The Pull Request
This PR replaces a bunch of instances of mobs being able to smash walls
by clicking them once to being able to tear walls by standing next to
them for a few seconds while an animation occurs. Wall tearing is a
three-part animation and can be cancelled and resumed at any point from
the most recently completed step so it isn't _exactly_ a single two
second interaction, and is resultingly harder to interrupt.

Some mobs still destroy walls in a single click, such as Flesh Worms and
Star Gazers. Really whether I replaced this or not was largely down to
vibes.
It also deletes the `tear_walls` element because it was the same as
`wall_tearer` but without the fun visuals.
## Why It's Good For The Game
Deleting walls instantly with a single click is pretty obnoxious. This
method slows it down a _little_ bit but also looks visually cooler and
gives people on the _other_ side of the wall a warning that something is
about to bust through kool-aid man style.
## Changelog
🆑
balance: Gorillas, Seedlings, Gold Grubs, Mooks, Constructs, Ascended
Knock Heretics, Fugu and mobs subject to a Fugu Gland now rip up walls
in a slightly slower but more cinematic way.
/🆑
* Wall smashing > Wall tearing
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Gorilla and dexterity holoparasite can now take things out of the backpack while holding it in his hand. (#79430)
## About The Pull Request
Fixes a bug that the gorilla and dexterity holoparasite cannot get
things out of the backpack while holding it in his hand.
## Why It's Good For The Game
Fixes#79090
## Changelog
🆑
fix: Gorilla and dexterity holoparasite can now take things out of the
backpack while holding it in his hand.
/🆑
---------
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* Gorilla and dexterity holoparasite can now take things out of the backpack while holding it in his hand.
---------
Co-authored-by: Xackii <120736708+Xackii@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* 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.

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.

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.

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.


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>
* Light-Eaten objects can no longer emit light after being turned off and then back on (#79240)
## About The Pull Request
#67676 described a bug where PDAs can apparently emit a small amount of
light after being affected by the light eater. As it turns out, the bug
is even worse than that. It doesn't work for just PDAs, it works for
basically any light source that can be turned off and on. Even
flashlights. In the following pictures, a flashlight has been
light-eaten and then turned off and on again:

Observe how the nightmare jaunt is available, as it should be. However,
one step closer to the flashlight:

The nightmare jaunt can no longer be used, because the flashlight is
still emitting light.
This PR just fixes that behavior. Light-eaten objects will now be
totally dark again, even after being power cycled. Closes#67676.
## Why It's Good For The Game
Bugs bad.
## Changelog
🆑
fix: Light-Eaten objects can no longer emit light after being turned off
and then back on.
code: Flashlights now use light_on instead of defining their own
variable. Please report buggy behavior.
/🆑
* Light-Eaten objects can no longer emit light after being turned off and then back on
* updatepaths
---------
Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Basic skeletons (#79206)
## About The Pull Request
Turns skeletons (the simple animal version) into basic mobs. This was
another incredibly simple conversion, since skeletons don't really do
anything but walk at you and beat you to death.
Because I thought it was funny, though, skeletons will now seek out
cartons of milk and drink them. Real milk will heal them for a
significant amount, but soymilk, being false milk, will deal them
grievous injury instead! Skeletons beware... I didn't add any other
sorts of milk due to limited ability with existing AI behaviors to
identify milk containers (they actually only look for the carton items).
Other than that, I've done some flavor adjustment for skeletons' attacks
- their effects and sounds will now suit the weapon they're actually
holding - for example, skeleton templars now actually use their swords
instead of slashing you with their horrible fingers. Along with this I
gave the basic skeletons a normal slashing sound, instead of the weird,
impactless hallucination sound they used to use for some reason. I never
liked that sound.
Finally, I've reflavored the spear-wielding skeleton mobs to "undead
settlers", following the naming of the corpses dropped by snow legions
as of #76898, rather than being named after an offensive term for Inuit
people. These skeletons do, after all, appear in settlements on alien
worlds.
To enable the flavor of milk drinking, I expanded the `basic_eating`
component to allow drinking rather than eating flavor, with a different
sound and its own set of verbs. This deletes whatever they drink from,
but c'est la vie.
## Why It's Good For The Game
Ticks 6 more entries off the simple animal freeze. While skeletons are
still extremely simple, being largely-identical mobs that only exist to
beat you to death, being basic mobs should make them slightly better at
this job. Also, again, I think it's really funny that you can distract
skeleton mobs with milk, or even hurt them.
## Changelog
🆑
refactor: Hostile skeleton NPCs now use the basic mob framework. They're
a little smarter, and they also have a slightly improved set of attack
effects and sounds. They love to drink milk, but will be harmed greatly
if any heartless spaceman tricks them into drinking soymilk instead.
Please report any bugs.
/🆑
* Basic skeletons
* updatepaths
---------
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* [no gbp] fixes not being able to walk over mook corpses and turns it all to a element (#79054)
## About The Pull Request
fixes not being able to move over or pull mook corpses and now mobs
changing their forces on death is a element
## Why It's Good For The Game
fixes not being able to move over or pull mook corpses
## Changelog
🆑
fix: fixes not being able to walk over or pull mook corpses
/🆑
* [no gbp] fixes not being able to walk over mook corpses and turns it all to a element
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
* Fixes some items produced by using plants not inheriting reagent purity (#79123)
## About The Pull Request
In #78322 I removed the reagent purity initialize argument from grown
items, thinking it was only used by butter. It was actually used in two
other places which I missed, in which I have implemented the same
functionality.
Rather than passing the desired purity on creation we instead just set
the purity of contents reagents after initialising the atom. This
broadly replicates what the edible component was doing, as these items
only get reagents from being edible.
## Changelog
🆑
fix: Meatwheat Clumps, Bungo Pits, and Eggplant Eggs should once again
inherit reagent purity from the grown item which produces them.
/🆑
* Fixes some items produced by using plants not inheriting reagent purity
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Invisibility refactor (#78908)
This adds a tracker for sources of invisibility and a priority system. I
needed this for another thing so I'm doing this first since it touches a
lot of code. As for the bugs fixed in the changelog, it's only what I
noticed while going through everything and there's likely a few more
things fixed with this. This should be testmerged for a while, I'll
bring this out of draft when it feels safe.
🆑
admin: Invisimin can now be used on mobs that are already invisible,
whether through temporary or permanent effects.
fix: Monkeyize/Humanize mob transformations no longer permanently reveal
invisible mobs if they had effects making them invisible otherwise.
fix: Objects with the undertile element that have been made invisible
through other means are no longer revealed by being uncovered.
/🆑
* Invisibility refactor
---------
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* 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>
* 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>
* Basic Constructs: parent type + Harvester (#78807)
## About The Pull Request
I kind of hate cult as a whole, but I like these little guys. Let's
basic-ize them.
This PR begins the process with the harbinger of the Red Harvest, the
Harvester! Their actual capabilities have been changed very little,
except that most of their unique properties have been moved to
components and elements. The basic parent type of constructs has also
been set up to make the next bunch of conversions easier.
- Constructs capable of repair now receive the healing hands component.
Healing hands has been extended, to allow the healing particles to come
in custom colors, and to allow it to print the target's health if the
target is not a carbon.
- Repairing constructs also receive a new element: Structure repair is a
lighter-weight variant on healing hands that allows repairing clicked-on
atoms of specified types.
- Constructs capable of damaging walls, meanwhile, receive the wall
smasher element.
Harvesters in specific have two special elements:
- The existing "amputating limbs" element, making them instantly rip a
limb off of any carbon they attack. As before, if they attempt this on a
carbon with no arms or legs, the harvester will hear Nar'Sie's call to
bring the victim to her.
- A new "wall walker" element, allowing them to walk through walls of
specified type (cult walls for harvesters) and allowing them to drag any
atom through as well.
Other than laying the groundwork, there's not much else here. I started
with Harvesters specifically because they are only ever
player-controlled, which makes things easy.
I'm not completely happy with the use of healing hands here - it gets
the job done, but currently loses a bit of the previous flavor (a
healing beam as a visual; printing the target's health in cult span). I
may extend it further to allow this behavior.
I've included an UpdatePaths script, even if these things shouldn't be
mapped, just in case something fucky is going on on a downstream. You
never know.
## Why It's Good For The Game
Constructs, currently, occupy _19_ spots on the simple animal list. This
is something close to 10% of all the remaining ones. Also, like
everything to do with cult, construct code is janky, old, and
desperately in need of updating. This is the first step.
## Changelog
🆑
refactor: Harvester constructs have been updated to the basic mob
framework. This should have very little impact on their behavior, but
please report any issues.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Basic Constructs: parent type + Harvester
---------
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>