Commit Graph

2357 Commits

Author SHA1 Message Date
Jacquerel
a1e46c5d31 Basic Guardians/Holoparasites (#79473)
## About The Pull Request

Fixes #79485
Fixes #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>
2023-11-10 21:04:52 -07:00
KingkumaArt
d47c5149d5 Emergency hotfix for engi crossbow [NO GBP] (#79606)
Hadnt added these commits when the PR got merged due to not expecting it
oops

## Why It's Good For The Game

See above, used to make my last pr actually function as intended.

## Changelog

🆑
fix: fixed engi crossbow being able to be used onehanded + ability to
craft with sci inducers
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-11-10 15:08:35 +01:00
SyncIt21
f56cadb04d [NO GBP] Final precision rounding for reagent volumes (#79571)
## About The Pull Request
- Fixes #79566

This applies mostly to plumbing reaction chambers but to implement that
fix some rounding operations had to be carried over to `holder.dm`(which
will benefit everything in general)

I'm pulling out all the stops here. Rather than checking "are we close
enough" plumbing reaction chambers will now check if we and i quote
"absolutely insanely precisely there". This means volumes like 49.9999
should become 50 period.

Note this is a high probability & not a definite fix. i.e. now
theoretically 100% of the time you should not get this problem but if it
still happens then as of now i have no solution and have to go back to
the drawing board on this one but i am very confident this should be the
end of all plumbing related problems i.e. at least problems with volumes
not getting rounded to whole numbers

## Changelog
🆑
fix: plumbing factories should not rarely/randomly brick at volumes like
0.9999(when in fact it should have been 1)
/🆑
2023-11-09 14:45:02 +00:00
LemonInTheDark
9696dd1a1d 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>
2023-11-09 14:44:24 +00:00
Jacquerel
6454b5ec9b Automatic fire for mobs (#79502)
This adds a component you can slap onto mobs with ranged attacks which
lets them fire repeatedly with the mouse held down.
I applied it to a couple of existing mobs, to be honest we don't
currently have any which _need_ this but I will add it to the Ranged
Holoparasite (which really does need it) depending on which PR gets
merged first.
2023-11-09 07:32:34 +00:00
KingkumaArt
ba076e94bc Adds engi improvised weapon - rebar crossbow + Engi Exclusive Tot Shop Variant (#78777)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

![image](https://github.com/KingkumaArt/KingkumaTGSS13/assets/69398298/e4d921a6-9bd6-4eb3-9085-2bfa5df67826)
Engi now has access to a Half Life 2 Inspired rebar crossbow! Made of
rods, wire, and an inducer, it shoots sharpened iron rods at a high
velocity. High damage and good embed chance, but requires you to reload
every shot which requires you to stand still for three seconds to pull
the string back. You can also Use a wrench on it to force it to store
more rods (read: more than one), but risks it exploding and shooting you
instead.

The syndicate variant, avaliable to traitor engis, can fire three rounds
before needing a reload, and features a scope and better armor piercing
ammpo, but costs 10TC. I see it as a sidegrade to the revolver - quieter
and has much more widespread ammuniton, but holds less ammo and doesnt
have the same burst stopping power. And, to those concerned about the
balance of a non-traitor with this item - the AP ammo can only be made
by the traitor who bought it, and anyone else has to use normal ammo.
 
GUN STAT JUNK
Normal one has 60% embed chance and does 40 damage (against unarmored
targetd), but requires you to wait at least 3 seconds not moving to pull
the string back. Good alpha strike but not sustainable in a long fight.
Its akin to a pipegun.

Lacks any AP qualities besides piercing a jumpsuit, because any wound
chance it has is due to a bare skin bonus. Generally not a great weapon
to fight sec with.

Syndie version is generally the above but better. Takes less to pull the
string back, slightly higher damage, better fire rate, etc. Doesnt fare
well against any armor thats equivalent to sec gear or better due to
most having low (relatively) AP and wound chance, but good bare wound
bonus.

STATS TLDR: Its good against unarmored chumps and greyshirts but anyone
in armor that protects against bullets will kick your teeth in.

Also, Ammo is crafted from an iron rod. I wanted to have it just fire
rods as is, but theyre stacked items which you cant define projectiles
or ammo from.

## Why It's Good For The Game

I've always felt engi, for as big of a department as it is, is lacking
in the "fun weapons" area. Sci has mechs and xenobio, med has chem nades
and syringe guns, and cargo has anything the QM will buy - but other
than the flamer and shocked doors, engi doesnt have much. Thats why I
made this pr. it was originally just a traitor item, as they lacked many
traitor items in their shop, but I felt like a worse, bootleg version
would suit them.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Enginenering rebar crossbows + tot kit
add: Added a bunch of ammos and crafting junk to make the ammo exist
image: added icond for all the above
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-11-08 21:31:59 +00:00
oranges
4c73778852 Improves slip component docs (#79540)
Also fixes some comment headers from melbert


rendered

https://www.oranges.net.nz/~oranges/dmdoc/datum/component/slippery.html

---------

Co-authored-by: san7890 <the@san7890.com>
2023-11-07 09:57:01 +13:00
MrMelbert
290c271b07 You can fish out of hydroponics trays (#79443)
## About The Pull Request

Adds a fishing spot to hydroponics trays. 

Chances 

- 33% nothing
- 33% grass
- 20% random seed (discludes rarer seeds, such as gatfruit and most
mutations)
- 10% grass seeds
- 1% strange seed
- 1% axolotl
- 1% frog

Lightly inspired by something (I think) is possible on Goon, but
obviously entirely new code.

## Why It's Good For The Game

Mostly just for laughs, they're basins of water so surely you can get
something out of it.

## Changelog

🆑 Melbert
add: Fishers can now try their luck at fishing out of hydroponics
basins.
/🆑
2023-11-05 22:32:06 -07:00
Ben10Omintrix
42c8e1adf9 new wizard ability and basic leaper refactor (#79237)
## About The Pull Request
refactors leapers into basic mobs and adds a new ability for wizards.
for 2 points wizards can buy their own leaper pet. they will get a
contract which lets them pick their pet's name and color

![thefrogs](https://github.com/tgstation/tgstation/assets/138636438/8df9b893-d07d-4e51-a9fa-644830cc7a81)

after they sign the contract they will get a frog statue which is used
to contain the leaper. players can use this statue to release or recall
the leaper into the statue. when its in the statue it will slowly regain
health or even revive from the dead, but if it gets gibbed then the
statue will be useless.

also adds a new ai behavior for leapers which lets them go swim in water
(and splash around) for a period of time. i gave this behavior to frogs
and crabs too

when riding the leaper, the players will get access to all its
abilities, it now has new abilities, it can create frog minions that
suicide bomb the enemies and it can also create a shower of poisonous
structures.


https://github.com/tgstation/tgstation/assets/138636438/931aa7b4-09f0-493f-bdb6-f3bdd0915b22

also when riding the leaper, players can point at walls near it so it
will destroy it. alternatively players can give commands to their
leapers to use abilities and to follow them if they are not riding it.
wizards cant be force dismounted from their frogs, and only wizards can
ride the frogs.

this also removes leapers from cytology as they now are much more
dangerous and have a new home


## Why It's Good For The Game
refactors leapers into basic mobs, and gives more gameplay opportunities
for wizards
## Changelog
🆑
refactor: leapers have been refactored into basic mobs please report any
bugs
add: wizards can now summon a leaper pet
removal: removes leapers from cytology
/🆑
2023-11-06 00:05:29 +00:00
Rhials
3c7005a37c Converts some notify_ghosts args to bitflags, multilines all notify_ghosts calls (#79320)
## About The Pull Request

This helps clean up my favorite helper proc in the whole codebase,
`notify_ghosts()`.

The notify_suiciders, ignore_mapload, and flashwindow args are GONE.
They have been replaced with the notify_flags bitflag argument. This was
intended to make deadchat announcements a bitflag argument too, but
those got reverted right before I originally wanted to submit this PR.

The on-screen popup now shows the notification body when you hover it
with your mouse again. The format is now `[notify_ghosts message] --
[click action (orbit/jump/play)]`

Every single `notify_ghosts()` call has been changed to multiline format
and has been given trailing commas. Pretty!
## Why It's Good For The Game

Cleans up a proc that is very popular and going through a lot of changes
at the time.

Allows for further flexibility when this proc inevitably gets tweaked or
improved. 12 -> 10 args is an improvement, and it doesn't impact the
helper's flexibility at all.
## Changelog
🆑 Rhials
code: The notify_ghosts proc has been cleaned up. Please report any
abnormal changes in deadchat notification behavior.
qol: The on-screen deadchat popups now contain the notification blurb
when hovered with your mouse again.
/🆑
2023-11-05 15:26:50 -08:00
SyncIt21
1a3f456416 Re-adds rounding tweaks for reagent volumes & plumbing reaction chamber tweaks (#79478)
## About The Pull Request
- Closes #79464

This takes the important fixes mentioned in the above PR and adds them
here. The above PR implemented the fixes by reverting a bunch of reagent
PR's but in the process of doing so it has brought back really
inefficient code & even some bugs that were previously fixed.

Rather than reviewing them & bringing back those changes which is time
consuming this PR extracts only those important rounding operations
required for the fix leaving all other optimizations intact

Mentioned @CliffracerX in the changelog so they can get their GBP

Also plumbing reaction chamber is more active in taking in reagents.
That is if a reagent is not available in the pipe net rather than
waiting for it to become available it will simply skip over it & look
for other listed reagents thus saving time

- Fixes #31206

## Changelog
SyncIt21, CliffracerX
🆑
fix: reagent volumes should be consistent & non breaking across plumbing
& chemistry as a whole
fix: plumbing reaction chambers are more proactive. Will attempt to take
in reagents more frequently
/🆑
2023-11-05 12:50:12 -08:00
lessthanthree
312cd8880d Station announcements cleanup (#79315)
## About The Pull Request

- As the size of the announcement proc has grown over the past few PRs,
did a pass over them for readability and consistency
- Include the arg names for coders unfamiliar with the new announcement
format
- Replaced leftover hardcoded Central Command text with the command name
proc, so all announcements reflect the command name if changed by an
admin
- Replaced hard coded emergency shuttle timer text with the actual
timeleft vars, so it's correct if the timers are changed for any reason
- Darkens the dark mode blue/red headers to be more red less pink, while
staying in accessibility standards
- Adds a lower profile grey colour for automated non-Central Command
announcements

## Changelog

🆑 LT3
code: Emergency shuttle announcements no longer use hardcoded values
code: Central Command announcements now correctly use its new name when
changed
spellcheck: Consistency pass on event announcements
/🆑
2023-11-04 18:38:52 -06:00
lizardqueenlexi
7b720a0081 Basic Shades (#79469)
## About The Pull Request

Makes shades into basic mobs. As they are solely player-controller and
have no AI, this was a very simple conversion.

Things of note:
- I've made shades use the same "theme" system as constructs, to
determine their drops and coloration - as opposed to these things being
manually set by the type of soulstone they're held in.
- I've reorganized files slightly, putting both constructs and shades in
a new "cult" basic mob folder.

That's more or less it. As I said, shades are simple.
## Why It's Good For The Game

Basic-izes another mob and cleans up the code a little. Removes the last
cult-related simplemob, too.
## Changelog
🆑
refactor: Shades now use the basic mob framework. Please report any
bugs.
/🆑
2023-11-03 22:39:33 +00:00
Jeremiah
36b09f9be0 Allows possessed blades to be possessed again [NO GBP] (#79447)
## About The Pull Request
An oversight- unregister was blocking future attempts to garner spirits
Converts some of the messages to balloon alerts
## Why It's Good For The Game
Fixes #79444
## Changelog
🆑
fix: Possessed blades can attempt to channel spirits again
/🆑
2023-11-02 13:28:45 +00:00
MrMelbert
04b6aad3a9 Dehardcodes microwave cleaning, allows spray cleaner to work on dense objects such as windows (#79354)
## About The Pull Request

- Dehardcodes microwave cleaning
- Instead of hard istyping for a rag, soap, or space cleaner, we just
use `wash`.

- Gets rid of a redundant signal 
- `COMSIG_ATOM_WASHED`: not only was it misleading (only sent to items),
but it was pointless because `COMSIG_COMPONENT_CLEAN_ACT` is the same
signal.

- Improves microwave attackby code, splitting tool stuff into tool-procs

- Allows spray cleaner to work on dense objects such as windows
- Clicking on a dense object or mob adjacent to you with spray cleaner
will spawn the puff cloud on the target, rather than on your own
position.
- This will skip the moveloop and just clean everything on the target
turf alone.
- This means you can spray down a bloody window with a spray bottle, as
janitor gods intended.
- It also means you can fill the spray with other stuff to spray onto
dense objects directly, which might be worth noting. Especially for
stuff like Napalm.

Fixes #79261 

## Why It's Good For The Game

Opens up the sandbox to allow more objects to clean microwaves + better
code.

## Changelog

🆑 Melbert
qol: Clicking on an adjacent dense object (or mob) with Spray Cleaner
will now spritz it rather than doing nothing. This means you can use
Spray Cleaner to clean bloodied windows, as the janitor gods intended.
It also means you can fill a spray bottle with Napalm, I guess.
refactor: Any cleaning object can now clean a microwave. 
/🆑
2023-10-31 14:00:15 +00:00
SyncIt21
9e99b147c0 Plumbing IV Drip has full control over its transfer rate (#79373)
The problem is plumbing iv drip has the
`/datum/component/plumbing/iv_drip` component attached to it. We gave
this component full control over the mob we are trying to inject into
with this statement over here

c356f2f735/code/datums/components/plumbing/IV_drip.dm (L28)

Remember this component is inherited from `/datum/component/plumbing`
which has it's own **"process"** proc.

c356f2f735/code/datums/components/plumbing/_plumbing.dm (L74)
It was this proc that was injecting reagents into the mob at a rate of
`MACHINE_REAGENT_TRANSFER`(10 units) per second.

This process proc was conflicting with the base plumbing machinery
process proc

Why is why our transfer rate controls never worked. Now the plumbing
machinery only draws reagents from the plumbing network into it's own
internal container(not the mob) at an rate of
`MACHINE_REAGENT_TRANSFER`(10 units) per second leaving the injection &
draining rate alone and in full control of the player as intended.

Also since plumbing iv drip inherited from `/obj/machinery/iv_drip` and
not from the base type for all plumbing machinery
`/obj/machinery/plumbing` it did not override the `/obj/plunger_act()`
proc so the plunger did not work on it. That's fixed now too

Also took the opportunity to move plumbing vat to plumbing module folder
cause it belongs there
2023-10-31 13:15:09 +00:00
Zephyr
9ebf319e6a fixes signal circuit not working | refactors name of timer cooldown macros to be inherent, also docs them (#79367)
## About The Pull Request

Title
## Why It's Good For The Game

Less headache in the future for a macro thats not really obvious in what
it does
## Changelog
🆑
fix: signals in circuits now actually function
/🆑
2023-10-31 10:58:48 +00:00
Profakos
bc18450afe 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.
/🆑
2023-10-31 01:49:56 +00:00
Jeremiah
cf1a7c89fd Fixes invisibility exploit (#79337)
## About The Pull Request
Adds a short cooldown timer (1s) to the toggle seethrough ability to
give it time to stop animating
## Why It's Good For The Game
Fixes #79161 
## Changelog
🆑
fix: Fixed an invisibility exploit on large mobs. Probably better this
way
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-30 05:44:19 +00:00
lizardqueenlexi
0036e13af0 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.
/🆑
2023-10-30 02:28:32 +00:00
lizardqueenlexi
9e18c6575a Basic Pirate NPCs (#79284)
## About The Pull Request

Converts hostile pirate NPCs to basic mobs - specifically, a subtype of
trooper. As their behavior is not meaningfully distinct from other
troopers, this conversion mostly just sticks them on the existing AI
behavior while keeping the rest the same.

Pirates do have one new thing going for them, though, to differentiate
them from other troopers. They use the new **plundering attacks**
component, which means that every time they land a melee attack, they
steal money from the bank account of whoever they hit. This requires the
target to be wearing an ID with a linked bank account, so it's not the
hardest thing in the world to hide your money from them - but it's still
something to be wary of! If killed, any mob with this component will
drop everything they've stolen in a convenient holochip.
## Why It's Good For The Game

Takes down 5 more simplemobs, and (I think) converts the last remaining
trooper-type enemy to be a basic trooper. (It's possible there's more
I've forgotten that could use the same AI, though.)

The money-stealing behavior is mostly good because I think it's funny,
but it also makes the pirates something a little distinct from "yet
another mob that runs at you and punches you until you die". They still
do that, but now there's a little twist! This can be placed on other
mobs too, if we want to make any other sorts of thieves or brigands.
## Changelog
🆑
refactor: Pirate NPCs now use the basic mob framework. They'll be a
little smarter in combat, and if you're wearing your ID they'll siphon
your bank account with every melee attack! Beware! Please report any
bugs.
/🆑
2023-10-30 02:27:46 +00:00
GPeckman
5f923b097f 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:


![fine](https://github.com/tgstation/tgstation/assets/21979502/e880c3a8-4ae9-4b6c-8ee9-27dacdbb23ab)

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

![not
fine](https://github.com/tgstation/tgstation/assets/21979502/b35014d4-71e8-49cf-b0f6-479cdf2ba3fc)

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.
/🆑
2023-10-28 23:49:13 -04:00
Profakos
ef17e4b8a4 Ground sinking sanity checks and doc cleanup (#79214)
## About The Pull Request

The asynchronous sinking component of garden gnomes did not check if the
gnome still existed, when the sinking timer ran out, which caused null
exception runtimes. I have added sanity checks to this. In addition, the
sinking used do_after, but failing the do_after had no effect on
anything, and infact, made the mob sink even faster into the ground, so
I have added an early return, and a call for unsinking.

Also tweaked proc names and documentation.

Funny story: the only reason I have found out about this bug is because
sometimes garden gnomes spawn on a downstream map, and they cause a CI
failure when the nuke cinematic unit test explodes them. 😔

## Why It's Good For The Game
Runtimes bad. Also if an action has a do_after call, it should probably
fail if it the timer fails.

## Changelog

🆑
fix: Gnomes no longer runtime if they explode while sinking into the
ground
/🆑
2023-10-28 13:08:01 +02:00
GoldenAlpharex
eb9da97b7d Adds support to the wet_floor component to avoid displaying its overlay, makes ice turfs no longer receive said wet overlay (#79275)
## About The Pull Request
The title says it all, really.

I always thought ice looked a bit silly, and always wondered why. Today,
I found out it was because of the `wet_floor` component adding an
overlay that suddenly made a turf that should look continuous, tiled,
which in turn gave some very ugly visuals. Ice already looks slippery,
you can tell that it's ice, and the overlay that was added to it just
didn't really help telegraph that any better than the sprite itself
already does.

That's why I added support to make it so it would be possible to force
the overlay to just not be applied to the turf that's affected by the
component, to make it all look a bit better overall.

I added it to the ice turfs as a proof of concept, although I guess it
could also be used on other turfs that are always "wet", like the
bananium floors, but I didn't really care enough to touch that yet, and
I guess the bananium floors can use it a bit better than ice did.

I did notice in this PR that the smoothing of ice seemed to potentially
be broken, but that's something to look into at a later time.

## Why It's Good For The Game
Look at this ice and how much smoother it looks like now:

![image](https://github.com/tgstation/tgstation/assets/58045821/6fc85239-e8f1-404b-bc0e-6e1fca7f7753)

## Changelog

🆑 GoldenAlpharex
code: Added support to the wet_floor component to make it so the wet
overlay could not be applied to certain turfs if desired.
fix: Ice turfs no longer look tiled, and instead look smooth when placed
next to one-another.
/🆑
2023-10-27 23:39:13 -04:00
Paxilmaniac
f3d81edb00 Improves the deployable component (#79199)
## About The Pull Request

The deployable component had a few random things I noticed when I tried
actually using it that kinda sucked so I'm:

Making the examine message more generic, we did NOT need to make it that
complicated.
Letting anything with hands deploy stuff, because mobs other than humans
can hold things.
Giving the option to let something be deployed more than once.
Letting direction setting be optional.
Tweaking the check for if something can be placed somewhere to be a bit
better.
## Why It's Good For The Game

I want to use the deployable component for stuff but I made it awful.
## Changelog
🆑
code: the deployable component has been tweaked and improved with some
new options to it
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-28 00:25:51 +00:00
MrMelbert
5bf6d09903 Cuts the number of apply_damage copypaste procs from 3(.5) to 1, fixing a few bugs along the way (#79207)
## About The Pull Request

- `apply_damage` is now uniform, handled, in a single place. At the
living level.
- Fixes people being held at gunpoint from being unable to flinch from
taking damage.
- Fixes a few signals (explodable, glass jaw) of apply damage maybe
potentially not having effects if the passed hit zone was a bodypart and
not a def zone.
- Fixes regenerator component always halting regeneration no matter what
damage taken.
- Fixes pressure damage being unaffected by `brute_mod` despite what
documentation claims.
- Signalizes the `check_species_weakness` proc on species. 

## Why It's Good For The Game

The copy+paste of this proc made it awful, awful to maintain or add
features to. And also made it very bug prone.

This just takes a step forward in making sustaining damage a lot more
consistent, not only across all mobs, but across all methods of...
taking damage. Unarmed attacks, hulk, item attacks, etc.

## Changelog

🆑 Melbert
fix: People held at gunpoint can now flinch when being hit. 
fix: Regenerating mobs no longer stop regenerating no matter hit with
what.
fix: Pressure damage is now properly modified by a mob's brute damage
modifier.
fix: Fixes some occasions which some effects (glass jaw, explodable worn
items) won't respond to hits.
refactor: Refactored core code related to mobs sustaining damage. 
/🆑
2023-10-27 18:55:30 +00:00
Jacquerel
0d5f9907a2 Shapechange health transfer tweaks (#79009)
## About The Pull Request

Fixes #78721
This PR does a handful of things behind the scenes to increase the
consistency of shapechange health tracking.

First of all we adjust the order of operations taken when you restore
the original body. The implementation as-was would remove the status
effect midway through and null a bunch of variables we tried to continue
using. This would result in several runtimes and code failing to run,
with the upshot that untransforming upon death would leave the caster
completely alive, with the corpse of its transformed shape at its feet.
Oops.

Additionally while testing this I realised that transferring the damagew
as also kind of fucked.
We wouldn't bother to do it at _all_ if you died, which is a shame, so I
made it simply heal you instead of reviving you so we can always do it.
Then as noted in the linked issue, we were applying all transferred
damage to a single limb, which could exceed the health of the limb and
remove damage. Now we spread it around the body.

Finally, applying damage to a human using the "force" flag would often
actually apply less damage to their _health_ than expected. This is
because arms and legs contribute only 75% of their damage taken to a
mob's overall health.
Now instead of reading `health` we read `total damage` which ignores the
limb damage modifier.

The end result of this is that if you transform into a corgi, take 50%
of your health, and transform back then you will have 50% of your health
as a human.
Previously the result would be that you'd have ~63%, then transforming
into a corgi would leave you with ~63% of a corgi's health, then
transforming back into a human would leave you at about 71%... and so on
and so forth. Now it doesn't do that.

## Changelog

🆑
fix: Dying when using (most) shapeshift spells will now kill you rather
than having you pop out of the corpse of your previous form.
fix: Damage will now be accurately carried between forms rather than
being slightly reduced upon each transformation.
/🆑
2023-10-26 01:30:53 +00:00
carlarctg
071f6063e6 Adds charges to omens and omen smiting. Reduces omen bad luck if nobody's nearby. (#78899)
## About The Pull Request

refactor: Adds charges to omens and omen smiting rather than only being
permanent or one-use. Mirrors now grant seven bad luckers.

qol: Reduces omen bad luck if nobody's nearby to witness the funny.
(Ghosts are included in the check!)

fix: Fixed an issue where a monkey check in doorcrushing was never
actually able to pass. Also they screech now.

## Why It's Good For The Game

> refactor: Adds charges to omens and omen smiting rather than only
being permanent or one-use. Mirrors now grant seven bad luckers.

Allows for someone to get between 1-infinity omen accidents. Seriously
why wasnt this a thing before

> qol: Reduces omen bad luck if nobody's nearby.

I LOVE this quirk, but trying to do antything at all except 'Suffer
Miserably' is nigh impossible. To alleviate life a little, making it so
that you have a lesser chance of suffering misfortune if nobody's around
will be the perfect compromise. It makes life easier but doesn't
compromise funny moments.

Any client in viewrange will disable the reduction. This includes
ghosts.

## Changelog

🆑
refactor: Adds charges to omens and omen smiting rather than only being
permanent or one-use. Mirrors now grant seven bad luckers.
qol: Reduces omen bad luck if nobody's nearby to witness the funny.
(Ghosts are included in the check!)
fix: Fixed an issue where a monkey check in doorcrushing was never
actually able to pass. Also they screech now.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-10-25 12:39:54 +00:00
necromanceranne
9ff9e4b9a8 Scatter laser shells now use the scatter laser beam, and makes them significantly easier to make. Projectiles can now have damage falloff. (#78927)
## About The Pull Request

Allows for damage falloff to apply to more than just shotgun pellets.
Now any projectile can have a damage falloff defined.

Scatter Laser shells no longer use the minigun beams to determine their
damage. Instead they use the actually defined scatter laser beams. Those
beams do 7.5 damage per pellet, times by 6 pellets.

Scatter laser beams now have damage falloff, a separately defined
(positive) wounding power from normal beams, and wound falloff.

Scatter laser shells can be printed from security protolathes once you
have weapon tech.

Scatter laser shells _may_ be damaged by EMPs based on severity. The
result is that it fires a practically useless volley of laser fire. They
cause a honk sound when they hit, so you know when you've shot one of
these.

## Why It's Good For The Game

Well, we want shotguns universally to not be defined by their damage
output (especially extreme damage output) but by niche.

What does the scatter laser shell currently occupy as a niche?

The single highest damage output of any projectile weapon in direct
damage. The thing we don't want of shotguns, and it is reigning champion
of all guns.

Okay, that's a bit misleading, because obviously it is competing with
the likes of .50 BMG which does 70 damage outright and dismembers limbs,
potentially doing upwards of 90 damage if it does, and also hard stuns
people. Obviously _that_ is technically a stronger bullet.

But not for raw damage, because the scatter laser does 90 damage out the
gate, barring any potential wounding that might occur which increases
the damage multiplicatively. No gimmicks, no extra procs, nothing. It's
just 15 force lasers (with no damage dropoff) split between 6 beams.

And the reason for this is because this shell has been nerfed once prior
by making it not fire 6 normal laser shots into someone. That was 120
damage at the time, 120 to 90 was...I guess a nerf during the taser era.
Depends on how you viewed it. Buckshot was doing like 80 at the time,
believe me it was a wild period. But anyway, when we did the whole
damage rearrangement over the course of the laser few years, every other
shell got touched except this one for some reason. Even pulse slugs lost
10 damage while this was still sitting on 90 force point blank.

So what is the new niche? Well, it's laser buckshot. That's not a niche
but crew don't get buckshot, so this is their buckshot. It wounds real
good. Real goddamn good. And its is a laser. It fits the aesthetic,
obviously.

Okay, thanks.

## Changelog
🆑
balance: Scatter laser shells actually utilize the _real_ scatter laser
beam. This comes with damage changes. And wounding power.
feature: EMPs can potentially damage scatter laser shells.
refactor: All projectiles can now have damage falloff defined. Yay.
balance: Scatter laser shells can be printed when weapons technology is
researched.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-25 13:39:34 +01:00
MrMelbert
9420370cd1 Zombies use the regenerator component (#79208)
## About The Pull Request

https://github.com/tgstation/tgstation/pull/79207#discussion_r1368165636

Simple enough, just moves zombie regeneration to the regenerator
component.

Adapts the component slightly to support it. Minor code cleanup, etc
etc.

## Why It's Good For The Game

Besides more consistent behavior, it gives a lot more user feedback on
how zombie regeneration works.

Makes 'em glow green and gives a visible message when it starts, rather
than just needing to guess (as it is currently).

## Changelog

🆑 Melbert
refactor: Refactored zombies to use the regenerator component. Now
they'll have a slight glow/animation when the regeneration actually
kicks in.
/🆑
2023-10-23 23:50:58 -06:00
MrMelbert
9155407fc0 Reverts crafting hologram check (#79185)
## About The Pull Request

Reverts crafting check from #79028 

I'm investigating this runtime


![image](https://github.com/tgstation/tgstation/assets/51863163/2920270a-ec2b-483b-93f2-a954a32f7d8a)

and - while the runtime points to a larger issue - this check is not
even necessary, as hologram items are already excluded from the list of
items.


67f263d0c1/code/datums/components/crafting/crafting.dm (L110-L113)
2023-10-22 15:36:04 -06:00
SyncIt21
1dccbdc191 Fixes crafting menu not detecting ingredients properly (#79141)
## About The Pull Request
1. Fixes #79089
This fix applies for the above issue and all crafting recipes that
require some sort of reagent container containing reagents. It now adds
the container & the reagents inside of it to the list of available
ingredients & not just the reagents which was previously the case.

2. Fixes #79159
Other crafting ingredients in general were not being detected if it was
not a stack type. That's fixed now too


## Changelog
🆑
fix: items that require reagent containers & the reagents inside it for
crafting(e.g. molotov) now crafts properly.
fix: most crafting recipes should work now
/🆑
2023-10-22 17:18:04 +02:00
lizardqueenlexi
1b8bcd0365 Basic drones (#79109)
## About The Pull Request

Fixes #68825
Fixes #72249
Fixes #70184

Converts maintenance drones to use the basic mob framework. As drones
don't use AI, this was mostly a perfunctory conversion, but I took the
opportunity to clean up drone code a bit and fixed a few bugs.

Noteworthy changes:
- Drones now have a `can_unhack` field. This is set to FALSE on
syndrones, because unhacking them doesn't make them stop being evil but
does cause some weirdness. Syndrones are unused right now, but you never
know.
- Drones use the Dextrous component for hand-having.
- Drones no longer have an internal ID card, instead being given
all-access with the `simple_access` component.
- Picking up drones now works the same as for other mobs, instead of
pointlessly copying the code into `attack_hand`. As a consequence, it is
now possible to punch drones if you want to for some reason.
- Drones can now reboot/cannibalize dead drones without being in combat
mode.
- Cannibalizing a drone that contains a client no longer runtimes - the
client is ghosted ahead of time.
- Drones now have TRAIT_ADVANCEDTOOLUSER, allowing them to properly
interact with machines.
- Trying to screwdriver a dead drone now gives a balloon alert about why
you can't do that.

In addition to these changes, I cleaned up the code quite a bit,
organizing things better and placing more useful comments throughout.
And removing a hell of a lot of single-letter variable names.

I will note that this PR does _not_ address #72129. The issue there is
that sprites for drones-as-hats are entirely nonexistent, and I'm not a
spriter. It shouldn't be too hard to fix if someone makes dronehat
sprites, though!

## Why It's Good For The Game
Kills 8 more simple animals.

In addition to that, drones were clearly a bit neglected, so this fixes
them up a bit and makes the code a little bit clearer. Maybe not that
much clearer, but it's something. It certainly leaves them in a better
place for further work if anyone wants to do that. Plus, a bunch of bugs
and other jankiness are fixed now, which is nice.

## Changelog
🆑
refactor: Maintenance Drones now use the basic mob framework. This
shouldn't come with any noticeable gameplay changes, but please report
any bugs.
fix: Drones can now interact normally with electrified doors.
fix: Drones' built-in tools can no longer be placed in storage objects
and/or thrown on the floor.
fix: Drones can now perform right-click interactions correctly, such as
deconstructing reinforced windows.
fix: Drones can now reboot or cannibalize other drones without being in
combat mode.
/🆑
2023-10-21 23:36:48 +00:00
Jeremiah
be5e7ccb02 Adds a subtle ghost poll (#79105)
## About The Pull Request
This makes a new ghost poll system which doesn't give TGUI popups -
instead, users are prompted to follow the POI and one of the orbiters is
chosen. The old system remains in place, so you can still prompt if you
want to.

This gives two things:
1. A deadchat notification:

![image](https://github.com/tgstation/tgstation/assets/42397676/073fcfff-b1ed-47c3-bae0-4abf9c599144)
2. A screen alert:

![image](https://github.com/tgstation/tgstation/assets/42397676/92a4e566-614a-43ca-8680-3cb4ff86ced9)

## Why It's Good For The Game
As stated in #76507, popups are pretty annoying. This is halfway between
a screen alert with no time limit and an event with more important
pings. This is better because:
1. Less popup fatigue
2. You can SEE how many you're competing with
4. DRY
## Changelog
🆑
add: Adds a subtle ghost poll. This pings in dead chat and gives a
screen alert, but no TGUI popup. Orbit the point of interest to be
selected for the role.
refactor: A number of ghost spawns now feature this alert. Write an
issue report if anything breaks.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-10-21 20:21:36 +00:00
Tim
491ac3ca8f Fix holodeck items from being eaten, crafted, recycled, juiced, or grinded (#79028)
## About The Pull Request
- Fixes #74612

The holodeck edibles could be eaten by the crew giving them nutrition
and medicine reagents. This could be done an infinite amount of times
since holodeck programs can be reloaded instantly.

Holodeck items no longer can be:
- Eaten
- Crafted as an ingredient
- Juiced into reagents
- Grinded into reagents
- Recycled into material

## Why It's Good For The Game
No more free infinite heals from holodeck or other silly exploits.

## Changelog
🆑
fix: Fix holodeck items from being eaten, crafted, recycled, juiced, or
grinded.
/🆑
2023-10-21 13:39:01 -04:00
MrMelbert
04936d9a5a Adds Food Allergies as a counterpart to Medicine Allergies (#79118)
## About The Pull Request

Adds food allergies as a counterpart to medicinal allergies. 

This is about as you would expect. Eating food you are allergic to
causes Anaphylaxis, which can be cured with epinephrine. If you are not
cured rapidly, you will shortly fall into a coma and die.

There is a preference for choosing your character's allergy. 
Not all food types are viable allergen types: Only `"Alcohol", "Bugs",
"Dairy", "Fruit", "Grain", "Meat", "Nuts", "Seafood", "Sugar",
"Vegetables"`.

You also get a dogtag like med allergies. 

Minor implementation detail: I added a "dangerous" level of food quality
/ scale, so I gave it to the Death Sandwich.

## Why It's Good For The Game

This was a request, and I saw it fairly harmless, so I said why not. 

Similar to Medicine Allergy, it adds a small mechanic to concern
yourself with when you visit the kitchen, encouraging you to get a bit
more familiar with food types before diving into food at the kitchen.

As it is not as impactful as Medicine Allergy, it is only a -2 quirk. 

## Changelog

🆑 Melbert
add: Adds Food Allergies as a -2 quirk. You can select which food you're
allergic to or rock a random option.
/🆑
2023-10-21 13:37:23 -04:00
SyncIt21
4db10f0aa3 [NO GBP] Apply multiplier correctly when transferring reagents. (#79084)
## About The Pull Request
- Fixes #79083 

The multiplier should be applied per reagent volume & not on the
requested amount as a whole.

## Changelog
🆑
fix: cryo and stuff that transfers reagents with a multiplier should
transfer correct volumes as expected.
/🆑
2023-10-21 18:22:59 +02:00
Ghom
9ed4bd202d Aquariums now have an internal feed storage. Fish catalogs as 25cr goodies. (#78958)
## About The Pull Request
Added a reagent holder to aquarium tanks and some code to enable the
fish to be automatically fed at selectable intervals of 1 minute to 7
(default 3). The holder can be accessed and filled by opening the
control panel, and emptied with a plunger if necessary. Simple plumbing
compatibility has been added as well, in case you think the 6 units of
capacity of the reagent holder (enough to feed a fish 60 times) are not
enough. The preset fishing tank starts with enough feed to keep its
contents alive for 30 minutes.

Beside that, I've fixed a small oversight with the fish analyzer goodie
pack. It should cost 150, not 500.
The fish catalog is now a goodie pack you can get as a goodie for dirt
cheap (25 creds) and a subtype of `book/manual`, so there's a slim
chance you may find it at the library or somewhere else.
Fixed a small oversight inside the fish catalog.
Mapped in a single aquarium kit for each station map, in the service
hallway/storage room where the techfab and cargo consoles are also
found.
Aquarium kits are now compatible with slapcrafting.

## Why It's Good For The Game
Aquariums require too much maintainance for a gimmick, and it's quite
awful to see the fish inside preset aquariums die 5 minutes into the
round. Also, you cannot get fish catalogs anywhere but from the aquarium
kit crate, which costs 1k credits, though its pertinence with fishing
goes beyond aquarium stuff.
Lastiy, I think it's good to give the crew a free aquarium kit. The
price of the supply pack is a bit out of reach for many, service could
use a bit of fisciculture too (I may make it a service pack later, so
that it can be ordered through the service console).

## Changelog

🆑
add: Aquariums now have a small internal reagent holder, accessible when
the panel is open and used to automatically feed the fishes at
selectable intervals, also compatible with plumbing.
add: Fish catalogs can now be bought as a goodie pack, for 25 cr, or
rarely found at the library or maints.
fix: Fixed the prices of fish analyzers. It's supposed to be 150 cr, not
500.
map: Added an aquarium kit to each station, found in the room where the
service techfab and order console also are.
qol: Aquarium kits are now compatible with slapcrafting (crafted by
hitting them with the required material without opening the menu).
balance: Moved the aquarium kit and fish supply packs from the "General"
section to "Service" and "Livestock" respectively, meaning they can be
ordered for free from the service orders console.
/🆑
2023-10-21 16:23:06 +01:00
SyncIt21
df508a51b2 More Plumbing Fixes & Pill Press UI Changes (#79059)
## About The Pull Request
1. Fixes #79051
It's a consequence of floating-point math. We round it to 2 decimal
places to display results like 50 but in fact its actual value is
something like 49.999... something. So, we also shift up our
expectations and call it a day.
2. Made a lot of variables defines and lists static to save memory for
plumbing pill press and moved global lists to it's global list folder
3. Copied over chem master patch & pill designs over too plumbing press
and removed the old designs & resized the UI

## Changelog
🆑
fix: plumbing pill press & bottler won't stop when processing 50 unit
bottles
code: made a lot of variables defines and lists static to save memory
for plumbing pill press. Moved global lists to it's rightful
place
code: copied over chem master pill & patch designs over to plumbing pill
press and removed the old designs. resized UI
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-10-20 07:52:16 +02:00
lizardqueenlexi
0c17553a96 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!
/🆑
2023-10-19 23:03:27 -06:00
Emmett Gaines
db581b5720 Makes supermatter charged singularity damage the eyes of viewers (#79044)
## About The Pull Request

Mostly made this for the component for admin abuse but let's put it on
supermatter singulo as well. Screaming as your eyes fail you while your
station is being consumed seems like it would be !!fun!!

## Changelog

🆑 ninjanomnom
balance: It damages your eyes to look at the supermatter singularity
/🆑
2023-10-19 21:02:14 -06:00
Ben10Omintrix
370a38165e 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>
2023-10-19 21:01:31 -06:00
Rhials
dde1db66e7 Ghost orbit popup double feature: Blackout drunkeness and Nar'Sie runes (#78982)
## About The Pull Request

This adds two new notify_ghosts popups, for Blackout Drunkeness and
Nar'Sie Rune Inscription.
## Why It's Good For The Game

Nar'Sie rune inscription already has a big announcement, but no orbit
prompt. It's an important enough event to warrant having one.

The blackout drunkenness period is something that deserves to have an
audience.
## Changelog
🆑 Rhials
qol: Ghosts will now be prompted to orbit when someone loses control due
to being blackout drunk.
qol: Ghosts will now be prompted to orbit when a cultist begins
inscribing a Nar'Sie rune.
/🆑
2023-10-19 23:14:10 +02:00
carlarctg
cd030b0690 Adds 'Bloody Spreader' component that bloodies everything it touches (#78743)
## About The Pull Request

Adds 'Bloody Spreader' component that bloodies everything it touches!

For example inserting an item into it if it is a storage item. Or
entering it if it's a turf, or bumping onto it, or... you get the point,
hopefully.

Added this component to the MEAT backpack, meat slabs, bouncy castles,
meateor fluff, meateor heart, and the heretic sanguine blade.

Gave most of these the blood walk component as well, which spreads blood
if it's dragged around.

Meat slabs contain a limited amount of both components, eventually they
will 'dry out'.
## Why It's Good For The Game

Meat isn't meaty and squelchy enough, this will make it meatier. It also
makes the janitor suffer.
## Changelog
🆑
code: Adds 'Bloody Spreader' component that bloodies everything it
touches!
code: For example inserting an item into it if it is a storage item. Or
entering it if it's a turf, or bumping onto it, or... you get the point,
hopefully.
add: Added this component to the MEAT backpack, meat slabs, bouncy
castles, meateor fluff, meateor heart, and the heretic sanguine blade.
add: Gave most of these the blood walk component as well, which spreads
blood if it's dragged around.
add: Meat slabs contain a limited amount of both components, eventually
they will 'dry out'.
code: Added a signal for when an item is entered into storage.
/🆑
2023-10-19 21:03:09 +02:00
MrMelbert
93ec5a72f7 A comprehensive refactor / cleanup of bullet_hit and on_hit to cut out a single bad species / mob proc (#79024)
## About The Pull Request

- Refactored `bullet_act`. Adds `should_call_parent` and refactors
associated children to support that.
   - Fixes silicons sparking off when hit by disabler fire. 
- Desnowflakes firing range target integrity and cleans up its
bullet-hole code a bit.
- Cleans up changeling tentacle code a fair bit and fixes it not taking
off throw mode if you fail to catch something.
   - The Sleeping Carp deflection is now signalized 
- Nightmare projectile dodging is now signalized and sourced from the
Nightmare's brain rather than species
- Refactored how cardboard cutouts get knocked over to be less
snowflaked / use integrity
- Also adds projectile `on_hit` `should_call_parent` and cleans up a bit
of that, particularly their arguments.
- On hit arguments were passed wrong this entire time, it's a good thing
nothing relied on that.

## Why It's Good For The Game

This is cringe. 


1863eb2cd8/code/modules/mob/living/carbon/human/_species.dm (L1430-L1442)

Bullets should overall act more consistent across mob types and objects.

## Changelog

🆑 Melbert
fix: Silicons don't spark when shot by disablers
fix: Changelings who fail to catch something with a tencacle will have
throw mode disabled automatically
fix: Fixes occasions where you can reflect with Sleeping Carp when you
shouldn't be able to
fix: Fixes some projectiles causing like 20x less eye blur than they
should be
refactor: Refactored bullet-mob interactions
refactor: Nightmare "shadow dodge" projectile ability is now sourced
from their brain
/🆑
2023-10-18 23:08:13 -06:00
LemonInTheDark
2532911353 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
/🆑
2023-10-17 23:52:54 -06:00
carlarctg
3aef9bd905 Added more slapcraft recipes, improved its component, fixed base cowboy hat type (#78854)
## About The Pull Request

Added slapcraft recipes for: Pillow suits, pillow helmets, bone and
sinew tailoring/weaponry, pipeguns, ghetto jetpacks, and pneumatic
cannons.

The base type of cowboy hats no longer looks and is named like a bounty
hunter hat, clarifying the recipe for the heroic laser musket.

Fixed an issue where if a slapcraft recipe required more than one
instance of its 'primary' slapcrafting item, it wouldn't show the
additional instance when examining its recipes.

## Why It's Good For The Game

Idk lol 

## Changelog

🆑
qol: Added slapcraft recipes for: Pillow suits, pillow helmets, bone and
sinew tailoring/weaponry, pipeguns, ghetto jetpacks, and pneumatic
cannons.
code: The base type of cowboy hats no longer looks and is named like a
bounty hunter hat, clarifying the recipe for the heroic laser musket.
They need cowboy hats not bounty hats.
fix: Fixed an issue where if a slapcraft recipe required more than one
instance of its 'primary' slapcrafting item, it wouldn't show the
additional instance when examining its recipes.
/🆑
2023-10-18 13:55:39 +13:00
LemonInTheDark
b77fa8c2a2 Starlight Control (Aurora works now, space gas doesn't touch starlight, narsie ending effects) (#78877)
## About The Pull Request

[Implements a setter for starlight
variables](af34f06b41)

I want to start to modify starlight more, and that means I need a way to
hook into everything that uses it and update it, so we can modify it on
the fly.

This does that, alongside removing space overlays from nearspace (too
many false positives) and making the aurora modify all turfs projecting
starlight, rather then all turfs in an area.

Do still need to figure out handling for the starlight color usage in
turf underlays tho (I gave up, we just keep it static. I'll fix it
someday but the render_relay strategy just doesn't work with its masking
setup)

[Reworks how starlight overlays
work](9da4bc38e2)

Instead of setting color on the overlays directly, we instead store an
object with our current settings in every mob's screen, and
render_target it down onto our overlays.

This lets us update overlay colors VERY trivially. Just need to set
color on the overlay var. Makes modifying starlight a lot cheaper.

It doesn't work on area overlays, because suffering, and it MIGHT induce
extra cost on clients. if it does we can do something about that, we'll
play it by ear

[Removes parallax starlight
coloring.](5f701a1b13)

I'm sorta iffy on the color, the effect can be real oppressive in some
cases, and I'd like to use starlight color for more events in world, and
having it vary can make that looking nice hard.

[Adds some visual effects to narsie being
summoned](a423cfcb2b)

As the rune drawing progresses space (starlight and parallax) go from
normal to greyscale. Then, right about when narsie shows up, starlight
becomes vibrant red.

It's a nice effect. I wanna do more shit like this, I think it'll
improve vibes significantly.
## Why It's Good For The Game

Can't embed it because of github's upload limit, can show a
[link](https://cdn.discordapp.com/attachments/458452245256601615/1160821856358645860/2023-10-08_22-31-22.mp4?ex=65360e99&is=65239999&hm=680e33e4e0026b89e132afc50c04a648a24f869eb662f274a381a5de5c5a36f2&)
for the narsie stuff

Here's
[one](https://cdn.discordapp.com/attachments/326831214667235328/1160813747196141568/2023-10-08_22-34-10.mp4?ex=6536070c&is=6523920c&hm=f8d571d1013da89887f49f3fec99f632251eeeac83085aa7dde97009aee3922f&)
for the aurora too.

This gives us more pretty starlight shit, and the ABILITY to do more
pretty starlight shit. I'm pretty jazzed, and I hope people use this
proc more (keeping in mind that it's pretty hard on the lighting system,
and needs significant delay between changes)
## Changelog

🆑
add: Narsie summoning has had some effects added to space and starlight
del: Removes the link between spacegas color and starlight. It was a
slight bit too vibrant and I think impacted the vibe too wildly to be
incidental.
fix: The aurora event actually... works now. Space lights up and all
that
/🆑
2023-10-17 13:19:12 -06:00
Bloop
737b20199e Fixes a bug with the scope getting stuck on mobs that get dusted or ghost (#78941)
## About The Pull Request

If you ghost while mid-scope (or similarly, if you get dusted/your mob
gets deleted) the mob's cursor would get all messed up due to some
oversights. This just clears up some of these logic errors and ensures
everything gets cleaned up properly.

Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/24189
Fixes https://github.com/tgstation/tgstation/issues/78756

## Why It's Good For The Game

Fixes a bug. I don't think scopes are even in use here but they are
downstream.

<details>
<summary>Deleted and being dusted resets perspective and cursor
properly</summary>


![dreamseeker_SSU4YnEK4n](https://github.com/Skyrat-SS13/Skyrat-tg/assets/13398309/dcaa5238-0067-4923-a956-24c6ba4aa2b3)


![dreamseeker_GZEhuSJSGS](https://github.com/Skyrat-SS13/Skyrat-tg/assets/13398309/2b88db21-6560-486d-94d3-9773fa543c50)

</details>

<details>
<summary>So does ghosting</summary>


![dreamseeker_7n3uXZvDSI](https://github.com/tgstation/tgstation/assets/13398309/08f6272d-baba-4e8e-ae0b-db23331982f7)

</details>

## Changelog

🆑
fix: being killed or ghosting while being scoped will no longer cause
the cursor offset to persist in a bugged state
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-10-17 13:08:32 -06:00
lessthanthree
7626c3bd6c Tram v6/Transport Subsystem (#78230)
Co-authored-by: Unit0016 <50649185+unit0016@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2023-10-17 10:52:38 -07:00