Commit Graph

3836 Commits

Author SHA1 Message Date
SmArtKar
b6c84135c3 Refactors embedding to use datums instead of storing data in bespoke elements (#84599)
## About The Pull Request

This refactors embedding elements to make them use singleton datums
(similarly to armor) instead being bespoke and creating a new element
every time armor values are supposed to be adjusted.
Default values have been removed from defines due to now being declared
in base class itself.
Additionally fixes vending machines and tackling gloves setting
generated shards (which they instantly embed into their victim) embed
properties to null after running the embedding code, despite said shards
having non-null embedding values by default, making them not be able to
embed into anyone else, also potentially breaking the pain/jostling code
if they somehow get updated.

## Why It's Good For The Game

Current embedding system is an unnecessarily complicated mess as bespoke
elements are hard to work with, and creating a new element every time
you change values is hacky at best. This change should make it easier to
read and work with.

## Changelog
🆑
fix: Fixed glass shards generated from falling vending machines or
tackling windows not being able to embed into anyone.
refactor: Refactored embedding code to use datums instead of bespoke
elements and ugly associated lists.
/🆑
2024-07-07 23:20:07 +02:00
Toastgoats
3c4444b1c4 Adds additional equipment for Silverscales. (#84257)
## About The Pull Request

This PR adds a few notable changes to the Silverscale pirates:

- Replaces the old nanotrasen branded hardsuit with the designer EVA
suit, an armored hardsuit equivalent in protection to that of the
standard pirates.

![silverscale](https://github.com/tgstation/tgstation/assets/63932673/85ba8b9c-307d-4800-a876-c0470e9ef0ab)

- Silverscales all start with satchels

- The airlocks on the shuttle can now be locked from the inside

- The shuttle now has a robot butler (medibot) named Mortimer, along
with a burn kit.

- Increased the amount of C4 on the shuttle to 3, and added a 1.30
damage modifier paywalled laser gun to justify having the recharger, the
silverscales will need to supply the card themselves

- Adds explosive implants to the Silverscales' outfit. They're greedy
lizards, did you think they'd let their gear fall into the hands of the
poors so easily?

- The mosins now get phasic rounds to offset the disadvantages of low
DPS compared to lasers.

## Why It's Good For The Game

As it stands, it can be argued that the Silverscales are the weakest
pirate faction, On paper, they sound as though they would be
well-equipped elites, but are left with clunky, unarmored space suits, a
bright dead-giveaway glow, and single shot guns that leave them
extremely vulnerable to being rushed and stunned. As such, they've
become somewhat of a joke amongst players for the past few years.

This pr doesn't necessarily aim to negate their weakness, but I'd like
to give them more of a safety net that puts them on equal to slightly
better footing with standard pirates in terms of their access to armor,
healing, and options.

The addition of the explosive implant also serves to reinforce their
theming of being rich, evil lizards, but is mostly meant to make them
more entertaining.
## Changelog
🆑
add: Added the designer EVA suit, a unique pirate hardsuit for
Silverscales.
balance: Increased the equipment available to Silverscales
image: Sprites for the designer EVA suit
/🆑

---------

Co-authored-by: Afevis <ShizCalev@users.noreply.github.com>
2024-07-07 15:13:26 -04:00
necromanceranne
e4adc1a939 Bow Update: Fletching instruction manual, bows using projectile damage multipliers, unhardcoded bow sprites, hot pink death (#84435)
## About The Pull Request

Adds a new crate to the Service section of cargo. The Fletching and
Bow-Making Starter Kit. Comes with some materials and a fletching
instruction manual.

The manual teaches you how to make shortbows (18 force from normal
arrows utilizing projectile multipliers), arrows, holy arrows (but you
need a divine bow to make them), quivers (but they only hold 10 arrows),
plastic arrows and violins. For reasons.


![image](https://github.com/tgstation/tgstation/assets/40847847/576732f2-03b4-47b7-9bad-d85ff06480f0)


### Fixes

Bows now no longer utilize hardcoded sprites for their loaded sprite.
Now they use overlays.

Bows properly become undrawn once fired. No longer can your bow
magically launch arrows by sheer force of will.

## Why It's Good For The Game

Initially I just wanted to provide a way for bow wielding chaplains to
produce additional arrows for their bow. Running out of those always
felt pretty lame. But then I got to thinking; actually, I kind of want
to LARP sometimes as an archer. I think that'd be kind of goofy and fun.
So I bundled that together into a solution for both.

The shortbow is really, really not meant to be a meaningful weapon. It's
just kind of silly, and meant to let people pretend to be Robin Hood and
occasionally hurt someone in a workplace accident. I'm particularly
thinking of clowns being the perfect users for this with their clumsy
trait. I will make this weaker if I have too.

(I am not, at this moment, redoing flaming arrows okay? I saw the code
comment. I know. Not right now. @tralezab, if you have any flaming arrow
sprites lying around, please let me know.)

## Changelog
🆑
add: Fletching starter kit! Make your own bow, shoot your friends in an
unfortunate workplace accident. Replace all those holy arrows you lost.
fix: Bows now properly undraw once they have fired an arrow.
code: Bows now utilize overlays in order to display loaded arrows.
Unique overlays per arrow.
/🆑
2024-07-07 17:57:32 +02:00
SkyratBot
0b0ca5ac1b [MIRROR] Converts slapcrafting into a bespoke element (#28655)
* Converts slapcrafting into a bespoke element (#84226)

## About The Pull Request

Converts slapcrafting into a bespoke element, used to be ac omponent

## Why It's Good For The Game

Noticed this was a big C and realized there was no real reason for that.
It's the same recipe shared across different items.

## Changelog
N/A

---------

Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Converts slapcrafting into a bespoke element

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
2024-07-06 09:41:55 +05:30
Waterpig
8efb4d25dd Event horizon rebalance (#28653) 2024-07-06 09:38:59 +05:30
carlarctg
bd14e92d04 Converts slapcrafting into a bespoke element (#84226)
## About The Pull Request

Converts slapcrafting into a bespoke element, used to be ac omponent

## Why It's Good For The Game

Noticed this was a big C and realized there was no real reason for that.
It's the same recipe shared across different items.

## Changelog
N/A

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-07-05 22:20:30 +00:00
SkyratBot
c87b65cb06 [MIRROR] Adds a new anomaly core item to Illumination technology, the photon cannon. (#28625)
* Adds a new anomaly core item to Illumination technology, the photon cannon. (#84368)

## About The Pull Request
This PR adds a new gunkit to the **Illumination Applications** tech node
acquired via BEPIS techs. For years, this funny little tech node has
been one of the lamer results from the BEPIS tech pool, only offering
constructable unique hardhats and access to a micro RLD. Well, lets just
say, badda bing

https://github.com/tgstation/tgstation/assets/41715314/bd869d7f-449a-4563-871a-b90f550e0bda

The photon cannon is craftable via a lathed gunkit obtained from the
security lathe, which fires 4 shots per recharge. Each shot, on direct
contact with a mob, acts like a severity 3 flash. The shot also
distinctly slows down after traveling, so you can more effectively gauge
where it's going to stop moving, as when it reaches it's travel
distance, it will perform a weaker AOE severity 1 flash. Direct hits
will effect silicons, while the AOE flash will not. Direct hits only
deal 5 ***STAMINA* damage.

The Gunkit requires a flux anomaly core to be crafted, completing with
the tesla gun in this respect.

## Why It's Good For The Game

There's been some discussion about how we've hoping to offer higher
power features and options to the game at large using anomaly cores, and
flux anomalies are currently only used for guns, which is rather
unfortunate. The bigger issue, I'd suppose, is that every gun that flux
anomalies can produce are considered lethal, with the event horizon gun
and tesla gun. And honestly, by comparison, the tesla is not lethal
enough to use to any real effect, or practical enough to bother science
enough for the core.

The photon cannon, however, works as a rather effective crowd control
weapon for breaching and incapacitating crewmates, making it ideal for
wardens dealing with large tides of crewmates, officers breaking into
bases, or ~~the captain trying to burn down your library dnd game,
DOUGLAS~~

Overall, it's still a fairly low power weapon, and sits in a niche place
somewhere between a dragNET, flashbang-loaded grenade launcher, the
flash, and the ion-cannon, with it's versatility coming from core rarity
and requiring a BEPIS tech.
**I have since updated this PR so that this gun deals stamina damage
instead of energy damage, and contact with the energy ball deals a short
period of confusion.**

## Changelog

🆑
add: The Illumination Applications technode now includes a gunkit for a
new gun, the Photon Cannon.
/🆑

* Adds a new anomaly core item to Illumination technology, the photon cannon.

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2024-07-05 00:25:43 +05:30
SkyratBot
7c9d0926ce [MIRROR] Gun Refactor Part 1: Bayonet Componentization (#28576)
* Gun Refactor Part 1: Bayonet Componentization

* fixes

* fix

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-07-05 00:24:34 +05:30
SkyratBot
4a60f108ab [MIRROR] Cult Vs. Heretic: 7 Months Later Edition (#28477)
* Cult Vs. Heretic: 7 Months Later Edition

* conflict fix

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-07-04 21:22:23 +05:30
ArcaneMusic
3512821314 Adds a new anomaly core item to Illumination technology, the photon cannon. (#84368)
## About The Pull Request
This PR adds a new gunkit to the **Illumination Applications** tech node
acquired via BEPIS techs. For years, this funny little tech node has
been one of the lamer results from the BEPIS tech pool, only offering
constructable unique hardhats and access to a micro RLD. Well, lets just
say, badda bing


https://github.com/tgstation/tgstation/assets/41715314/bd869d7f-449a-4563-871a-b90f550e0bda

The photon cannon is craftable via a lathed gunkit obtained from the
security lathe, which fires 4 shots per recharge. Each shot, on direct
contact with a mob, acts like a severity 3 flash. The shot also
distinctly slows down after traveling, so you can more effectively gauge
where it's going to stop moving, as when it reaches it's travel
distance, it will perform a weaker AOE severity 1 flash. Direct hits
will effect silicons, while the AOE flash will not. Direct hits only
deal 5 ***STAMINA* damage.

The Gunkit requires a flux anomaly core to be crafted, completing with
the tesla gun in this respect.

## Why It's Good For The Game

There's been some discussion about how we've hoping to offer higher
power features and options to the game at large using anomaly cores, and
flux anomalies are currently only used for guns, which is rather
unfortunate. The bigger issue, I'd suppose, is that every gun that flux
anomalies can produce are considered lethal, with the event horizon gun
and tesla gun. And honestly, by comparison, the tesla is not lethal
enough to use to any real effect, or practical enough to bother science
enough for the core.

The photon cannon, however, works as a rather effective crowd control
weapon for breaching and incapacitating crewmates, making it ideal for
wardens dealing with large tides of crewmates, officers breaking into
bases, or ~~the captain trying to burn down your library dnd game,
DOUGLAS~~

Overall, it's still a fairly low power weapon, and sits in a niche place
somewhere between a dragNET, flashbang-loaded grenade launcher, the
flash, and the ion-cannon, with it's versatility coming from core rarity
and requiring a BEPIS tech.
**I have since updated this PR so that this gun deals stamina damage
instead of energy damage, and contact with the energy ball deals a short
period of confusion.**

## Changelog

🆑
add: The Illumination Applications technode now includes a gunkit for a
new gun, the Photon Cannon.
/🆑
2024-07-04 15:12:15 +02:00
SkyratBot
fc4fa121c9 [MIRROR] exorcises hardstun weapons + death/poly wands from lootboxes (#28603)
* exorcises hardstun weapons + death/poly wands from lootboxes (#84414)

## About The Pull Request

exorcises hardstun weapons + death/poly wands from lootboxes
pulse weapons are of the taserless variant
also all nukeop guns are unrestricted let people have fun bro

also removes the enchanted modsuit from said loot

## Why It's Good For The Game

getting instantly paralyzed with a ranged gun is not fun, never will be
so we just remove those
also being able to use the guns you get from an admin
shitspawn/deathmatch prop is pretty much a fix???
polymorph wands and death wands are stupid and are just taser++ except
they kill you outright (polymorph could make you a rat that would count
as dead personally)
enchanted modsuit entirely shuts down basically 90% of other players
spells which basically invalidates the entire ragin mages map (which
sucks anyway)

## Changelog
🆑
balance: removed tasers, the unfirable turret gun, death wand, polymorph
wands and the enchanted modsuit from lootbox loot tables
fix: lootbox guns should now mostly not have syndicate firing pins so
you can actually use them
/🆑

* exorcises hardstun weapons + death/poly wands from lootboxes

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
2024-07-04 10:52:03 +05:30
jimmyl
bac55e33fd exorcises hardstun weapons + death/poly wands from lootboxes (#84414)
## About The Pull Request

exorcises hardstun weapons + death/poly wands from lootboxes
pulse weapons are of the taserless variant
also all nukeop guns are unrestricted let people have fun bro

also removes the enchanted modsuit from said loot

## Why It's Good For The Game

getting instantly paralyzed with a ranged gun is not fun, never will be
so we just remove those
also being able to use the guns you get from an admin
shitspawn/deathmatch prop is pretty much a fix???
polymorph wands and death wands are stupid and are just taser++ except
they kill you outright (polymorph could make you a rat that would count
as dead personally)
enchanted modsuit entirely shuts down basically 90% of other players
spells which basically invalidates the entire ragin mages map (which
sucks anyway)

## Changelog
🆑
balance: removed tasers, the unfirable turret gun, death wand, polymorph
wands and the enchanted modsuit from lootbox loot tables
fix: lootbox guns should now mostly not have syndicate firing pins so
you can actually use them
/🆑
2024-07-03 23:23:07 +02:00
SmArtKar
b359988016 Gun Refactor Part 1: Bayonet Componentization (#84246)
## About The Pull Request
The gun code is an absolute mess that seems to have been untouched for
the better part of the decade and finally gave way due to the attack
chain refactor. This PR is the first in my attempts to refactor this
mess by making bayonet attachment a component instead of /obj/item/gun
variables. Followup PRs may or may not be atomic changes or a monolith
due to how horribly the original code is structured.

## Why It's Good For The Game
Gun code is ancient, unmaintained, barely readable and started actively
breaking in the past weeks.

## Changelog
🆑
refactor: Bayonet attachment is now a component.
/🆑
2024-07-03 12:54:26 +00:00
Waterpig
00aa495320 Merge branch 'master' of https://github.com/Skyrat-SS13/Skyrat-tg into upstream-24-07a 2024-07-02 23:57:38 +02:00
SkyratBot
53d3099582 [MIRROR] Moves tool use back higher in the chain, but makes it so tool acts are only called on non-combat-mode (#28457)
Moves tool use back higher in the chain, but makes it so tool acts are only called on non-combat-mode

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-07-02 15:31:16 +05:30
SkyratBot
65f0e6bd76 [MIRROR] Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#28376)
* Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore]

* Multi chargers

* all this other shit

* maps

* more fixes

* even more

* mapping

* map fixes

* MCR

* map2

* map3

* map4

* map5

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
Co-authored-by: Fluffles <piecopresident@gmail.com>
2024-07-01 23:44:49 +05:30
SkyratBot
e39d05b259 [MIRROR] Pyrokinesis bolts no longer have infinite range and hotspots (#28518)
* Pyrokinesis bolts no longer have infinite range and hotspots (#84484)

## About The Pull Request

Closes #84483
Original author forgot to call the parent proc which was supposed to
send a comsig and delete the projectile.

## Changelog
🆑
fix: Pyrokinesis bolts no longer have infinite range and create trails
of fiery doom.
/🆑

* Pyrokinesis bolts no longer have infinite range and hotspots

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2024-07-01 19:35:25 +05:30
SmArtKar
c733ba8c13 Fixes Hand of Midas not working in melee range (#84491)
## About The Pull Request

Closes #84351
Hand of Midas has been exclusively using
``ranged_interact_with_atom_secondary`` which, as you can tell, only
works at range. I changed some code so it now also utilizes normal
``interact_with_atom_secondary``

## Changelog
🆑
fix: Hand of Midas now works point-blank.
/🆑
2024-07-01 00:27:58 -04:00
SmArtKar
aeb86cbe77 Fixes Hand of Midas not working in melee range (#84491)
## About The Pull Request

Closes #84351
Hand of Midas has been exclusively using
``ranged_interact_with_atom_secondary`` which, as you can tell, only
works at range. I changed some code so it now also utilizes normal
``interact_with_atom_secondary``

## Changelog
🆑
fix: Hand of Midas now works point-blank.
/🆑
2024-06-30 22:22:31 -06:00
SmArtKar
a093deee76 Pyrokinesis bolts no longer have infinite range and hotspots (#84484)
## About The Pull Request

Closes #84483
Original author forgot to call the parent proc which was supposed to
send a comsig and delete the projectile.

## Changelog
🆑
fix: Pyrokinesis bolts no longer have infinite range and create trails
of fiery doom.
/🆑
2024-07-01 00:43:27 +02:00
SkyratBot
d13ba21201 [MIRROR] First Genetics Content in 5 Years (Adds new positive mutations!) (#28449)
* First Genetics Content in 5 Years (Adds new positive mutations!)

* Update reach.dm

* delete

* Update adaptation.dm

* Update reach.dm

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-06-30 16:30:13 +05:30
SkyratBot
cf56ca8fb8 [MIRROR] Fixes magazine overflow and russian roulette starting with 6(7) bullets (#28475)
* Fixes magazine overflow and russian roulette starting with 6(7) bullets (#84247)

## About The Pull Request
Box magazine code started from ``.len`` instead of ``.len + 1`` when
refilling mags which would be fine if BYOND's ``to`` didn't include the
last number. Unfortunately, it does, and if the mag has bullets when its
refilled it will have one over the limit.

Russian revolver code had a type typo where ammo was added in
nonexistent ``/obj/item/ammo_box/magazine/internal/rus357``'s
``Initialize`` instead of
``/obj/item/ammo_box/magazine/internal/cylinder/rus357``. It was pretty
clearly was meant to start with a single bullet instead of 6, but
neither removing existing ammo nor adding new was implemented properly.
I stuff it with 5 blanks instead of making it empty because this will at
least allow it to click with current guncode instead of bashing yourself
over the head without any feedback, until I rework it.

Related to #84057 but doesn't close it.

## Why It's Good For The Game

Overflow could happen on chaplain's revolver when pray-reloading, giving
them one more shot than intended.
Russian revolver is still broken, just slightly less as it now can at
least tell you that you failed at killing yourself.

## Changelog
🆑
fix: Guns no longer can be overfilled by 1 bullet
fix: Russian revolvers now spawn with only 1 live round as originally
intended, and click when firing a blank.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Fixes magazine overflow and russian roulette starting with 6(7) bullets

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
2024-06-29 23:29:54 +05:30
carlarctg
4eaa299c0b Cult Vs. Heretic: 7 Months Later Edition (#82877)
## About The Pull Request

This PR was originally meant as a replacement for the Bloody Bastard
blade, but then I stopped existing for 7 months. Now that I'm here
again, I'm finishing the job once and for all.

### **HERETICS VERSUS CULTISTS**

### Heretics

Heretics can now sacrifice cultists, which will give them one of three
gifts: The Cursed Blade, the Crimson Focus, and the Rusted Harvester.
The gifts given are weighted to be spread out equally with each type.
They will also gain one knowledge point.

- The Cursed Blade is a free heretic blade that is more powerful than
the normal heretic blade, including a small block chance. It can also be
used to draw heretic runes off combat mode.
- The Crimson Focus is a necklace that grants focusing and a minor
regeneration effect which also affects nearby heretics, at the cost of
gaining the BLOODY_MESS trait while wearing it. Additionally, it can be
squeezed to heal 50 points of brute/burn damage, injecting yourself with
three to six (separately) units of Eldritch ~~Water~~ Essence and Unholy
Water. Yes, this isn't good.
- The Rusted Harvester is a heretic 'monster' summon. It's a normal
Harvester, but instead of Area Conversion and Forcewall, it has
Aggressive Spread and Rust Construction (Raise Wall). It can delimb, but
only cultists, with a delay. It has an aura of decay, corroding the
environment and withering enemies near it, but it's VERY fragile.

Rusting cultist item dispensers will now cause them to turn into a
Heretic object. Altars turn into small heretic runes, Archives turn into
Codex Cicatrixi, Forges turn into Mawed Crucibles.

Ideally, Heretics would be able to gain an amount of these new powers
and use them to turn the tide against the cultists, amassing their power
and almost forming a sect of their own in turn which sweeps over and
converts the cult.

### Cultists

When a Cultist sacrifices a heretic, two things will happen:

- A new item will be available for creation at one of the dispensers.
- The Heretic will be trapped inside a powerful Haunted Blade.

`/obj/item/melee/cultblade/haunted`
`	name = "haunted longsword"`
` desc = "An eerie sword with a blade that is less 'black' than it is
'absolute nothingness'. It glows with furious, restrained green
energy."`

This blade will be stronger across-the-board than a normal cult sword,
and will even allow those who wield it to cast one heretic spell from
their previous path. The only downside? The heretic can also cast one
spell. It's up to the trapped spirit if it wants to help you, or be a
nuisance.

The unlocked items are:
- The Cursed Blade, again. For cultists, it can be used to draw runes
twice as fast as usual, and they can even right-click it to teleport to
safety, just like a heretic!
- The Crimson Focus, again. Cultists are twice as fast at carving spells
into their body, and they gain a 5th spellslot as long as they wear the
amulet. It still causes hemophilia and grants weak regeneration.
- The Proteon Orb. This orb will create a gateway to Nar'sie's own
realm, spawning one Proteon every 15 seconds, which ghosts can possess.
The gateways cannot be placed close to one another.

Originally, they were going to be able to create a Harvester Shell, but
there were some concerns of it being too OP.

The true Bastard sword has been fully deleted. The null rod conversion
has been changed to a Bloody Halberd instead.

I'm considering re-enabling Stun Hand on Heretics, with Mansus Grasp
stats.

### Other

All the items above can be used by both Heretics and Cultists, no matter
how they were first created. Hell, even normal crew can use them! This
is probably not the best idea a lot of the time, though.

There are a lot of other changes in this PR. A loooooot. I will likely
miss some in the changelog, but I'll try to be as thorough as possible.
There's probably also some leftover garbo that I didn't find and clear
out yet.

## Why It's Good For The Game

Cult and Heretics, despite being mortally opposed, have very few
interactions with eachother, especially now that the Blade's gone. The
only thing of note is just the Heretic's unfair complete resistance to
stun hand, which is only marginally better than the alternative. This PR
will reintroduce their animosity, and give both sides a very, very good
reason to fight eachother.

The Cult will gain a sick sword that keeps the heretic in the game, and
unlike with the original implementation, will recieve a cult-wide bonus
in the form of a powerful, well deserved, and fun new item to summon.

The Heretic will gain powerful trinkets and knowledge from the
sacrifices, incentivizing them to become a terrifying cult-hunter. And
if they do succeed in wiping out the cult, they will have quite the
rewards to help with their ascension.

The crew, while mostly unaffected, will have a damn good reason to not
just Side with the heretic, out of fear of what they may become after
the cult is stomped down. They can also use a few of the items here in
an attempt to get one up on either side, as long as they manage to stay
clear of the side-effects.

Let the heretics eradicate the apostates.

Let the cultists root out the heathens.

![image](https://github.com/tgstation/tgstation/assets/53100513/b43d5d94-d06d-43b8-9b10-57f5a4a32bdb)
The haunted longsword creates an aura of darkness (disabled for the
cultist for the image)
Sprites... are not great. Hopefully someone comes by and improves them.

code: Added get_inactive_hand() as an easy shortcut for carbons
code: Wall walker element can now accept a trait for wall-checking
fix: Fixed soulsword component being unable to invoke the post summon
callback
refactor: Turned Heretic rust turf healing into an element, given to
Rust Walkers and Rusted Harvesters
refactor: Converted Limb Amputation from an element to a component

Blade and Sword sprites by meyhaza!!! I did the inhands though. Cuz im
cool
2024-06-29 12:40:33 -05:00
SmArtKar
c20228b67e Fixes magazine overflow and russian roulette starting with 6(7) bullets (#84247)
## About The Pull Request
Box magazine code started from ``.len`` instead of ``.len + 1`` when
refilling mags which would be fine if BYOND's ``to`` didn't include the
last number. Unfortunately, it does, and if the mag has bullets when its
refilled it will have one over the limit.

Russian revolver code had a type typo where ammo was added in
nonexistent ``/obj/item/ammo_box/magazine/internal/rus357``'s
``Initialize`` instead of
``/obj/item/ammo_box/magazine/internal/cylinder/rus357``. It was pretty
clearly was meant to start with a single bullet instead of 6, but
neither removing existing ammo nor adding new was implemented properly.
I stuff it with 5 blanks instead of making it empty because this will at
least allow it to click with current guncode instead of bashing yourself
over the head without any feedback, until I rework it.

Related to #84057 but doesn't close it.

## Why It's Good For The Game

Overflow could happen on chaplain's revolver when pray-reloading, giving
them one more shot than intended.
Russian revolver is still broken, just slightly less as it now can at
least tell you that you failed at killing yourself.

## Changelog
🆑
fix: Guns no longer can be overfilled by 1 bullet
fix: Russian revolvers now spawn with only 1 live round as originally
intended, and click when firing a blank.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-06-29 19:25:05 +02:00
MrMelbert
4aa7bae77a Moves tool use back higher in the chain, but makes it so tool acts are only called on non-combat-mode (#84083)
## About The Pull Request

### Dilemma 

So we've been running into a dilemma recently as we move more and more
items over (#84070, #83910)

Some things like modsuits, tables, washing machines, storage items want
to do their tool acts before their item interactions

In the past this was perfectly fine, because it was `tool_act` ->
`attack`, but now it's a problem, because it's `item_interaction` ->
`tool_act` -> `attack`.

Rather than resort to snowflaking, my idea is that we can move tools
back up the chain so deconstruction and other similar effects are
handled first, before anything else like putting the tool onto the
table.

### So why does it require non-combat-mode?

A large amount of tool acts early return if the user's on combat mode to
allow the user to smack the thing instead of using the tool on it. So
I've decided to walk back on what I said like a week ago and make this
standardized behavior.

### Misc

Reintroducing `tool_act` as a proc that exist means that atoms can
easily hook certain interactions that must happen very high in the click
chain, such as doing something that block storage insertion. Moves some
of the behaviors I put on the (admittedly rather hacky) new proc to
that.

(Also cleaned up a bit of lockbox and medbot code)

## Changelog

🆑 Melbert
fix: Fixed modsuit interactions slightly. No longer requires combat mode
to use tools on it, plasma core works as intended as well. (Using combat
mode, however, will make you insert the item)
refactor: Refactored lockboxes
refactor: Refactored medbot skin application
/🆑
2024-06-28 16:18:50 -06:00
carlarctg
ff836e10be First Genetics Content in 5 Years (Adds new positive mutations!) (#83652)
## About The Pull Request

Sister PR to #83439, that needs to be merged before this.

Adds a plethora of new positive mutations to the game!

Mutations now have a variable that directly adds and removes traits
instead of manually doing so for idk

Tripled cryobeam range.

Made the mushroom hallucinogen's code more readable.

- Adrenaline Rush
Trigger your body's adrenaline response, granting you 10 * P units of
pump-up, synaptizine, and determination. After 25 seconds, you crash,
recieving 7 * S units of tiring and dizzying solution. Can be Energized,
Powered, and Synchronized.
- Mending Touch
Transfer injuries from the target to yourself! Heal 35 * P damage,
recieving up to 35 * S damage in turn. Transfers moderate wounds, fire
stacks, and attempts to parallel limb-to-limb damage. Has bonuses for
pacifist players. Can be Energized, Powered, and Synchronized.
- Elastic Arms
Your arms become floppy and you can interact with things as if you were
adjacent to them from one tile further! Does not work through walls or
dense objects, and you become unable to lift huge items, pull large
corpses, and you get chunky fingers.

Split temperature adaptation into three:
- Cold Adaptation
Gain cold immunity, gain ice slip immunity!
- Heat Adaptation
Gain heat and ash storm immunity 
- Thermal Adaptation
Resist both cold and heat, but no extra fancies. The sprite is green
now!
Pressure Adapt has a purple sprite.

You can mix the cold mutations with Fiery Sweat to make these new ones:

- Cindikinesis
Instead of summoning snow, you can now summon... ash. Wow. Very cool.
- Pyrokinesis
You can fire fire now! Fires beams of heat that, unlike the temperature
gun, actually ignite on hit. Higher instability cost than its sister
mutation.

The changes have been themed primarily around classic superhero
gimmicks. Genetics feels like a natural spawning point for superheroes,
and its mutations show this via the good ol' 'radiation made me fire eye
lasers' hero backstory. Adding more ways to be a superhero is fun.

Also, added two new speech mutations:
- Trichromatic Larynx
Every word you say is now either red, green, or blue!
- Heckacious Larynx (Trichromatic Larynx x Wacky)
You sound, well. Absolutely ridiculous. Spectacularly silly. Profoundly
wacky. Don't give it to the clown.
Unlocked the Elvis mutation as well.

## Why It's Good For The Game

> Adds a plethora of new positive mutations to the game!

Genetics is in desperate need of new content, all it's had for years is
a slow gutting and removal of the few things it does have. Hulk is,
being real, stupid, dumb, stagnated, and overpowered, but it's been
begrudgingly accepted because genetics is quite literally just, nothing
without it. I'm here to add the somethings to genetics and add some more
variety (and no i'm not touching hulk)

> Mutations now have a variable that directly adds and removes traits
instead of manually doing so for every mutation.

Less stupid

> Tripled cryobeam range.

Shit joke mutation is now long-range shit joke mutation!

> Made the mushroom hallucinogen's code more readable.

Slightly OOS because I was going to add color blind mutations but
decided not to creep. This piece o shit code has been hurting my head
for years and now that I've finally understood it I want to make sure
others don't go through that pani.

> - Adrenaline Rush
A quick burst of some mild chemicals at the cost of eventual nausea,
sounds like a fair trade to me! If you're already on the ground, this
isn't going to do anything.
> - Mending Touch
Healing is something that's lacking from the mutations, and this puts a
fun spin on it, making the caster a damage pincushion as they heal and
absorb damage.
> - Elastic Arms
Classic superhero power, very funny, lots of silly and sandbox
potential. Has innate drawbacks because 1. thematic and 2. it's pretty
strong

> Split temperature adaptation into three:
They combine into the same thing it used to be, so don't freak out. This
just adds some separation between the immune types, for things like
themed superheroes.

> - Cold Adaptation
Perhaps mildly concerning, but I think this might be a fun spin on it?
TODO: make hiking boots effect?
> - Heat Adaptation
Nothing to say. It's cool.
> - Thermal Adaptation
Nothing wrong with this mutation so it stays in

> You can mix the cold mutations with Fiery Sweat to make these new
ones:
How can we have frozone and not, uh human torch or something. why are
there no heavy hitter fire superheroes in marvel or dc???
> - Cindikinesis
Can't really summon an equivalent to snow that's actually useful, so
here's this instead. Clown might like it, or maybe the chemist.
> - Pyrokinesis
The ignition effect is fairly weak and mostly a deterrent. I think this
is the most dangerous ranged mutation in the game, which is kinda sad.

> - Trichromatic Larynx
Colors are fun! We have speech mutations that change words but none that
change their color. Though, to be fair, this was mostly added for the
mutation below's combination.
> - Heckacious Larynx (Trichromatic Larynx x Wacky)
I felt that Wacky wasn't nearly wacky enough. It just made your speech
comic sans. That's great and all, but. It's not much? This will be a
truly clownly mutation, the Genetics equivalent of a HONK mech. I made
it a combination mutation specifically to restrain its power level.
> Unlocked the Elvis mutation as well.
Was there a reason to lock this?

## Changelog

🆑
add: Added tons of new mutations to Genetics, alongside some recipes!
add: Thermal Adaptation has been made a combination mutation from the
stronger but narrower Cold and Heat adaptations.
balance: Cryobeams have 9 tile range, and fiery sweat doesn't cause
spread on contact.
image: Added some neat new sprites for the new mutations, and added a
greyscale version of the magic hand sprites.
code: Infinitesmally improved mutation code.
/🆑
2024-06-28 17:52:09 -04:00
SkyratBot
1e03a555d7 [MIRROR] Fixes runtime with out of bounds hitscan projectiles (#28415)
* Fixes runtime with out of bounds hitscan projectiles (#84192)

## About The Pull Request
When projectiles cross into an invalid turf (like crossing out of the
bounds of the map), they are automatically qdel'd. If the projectile is
hitscanning, the `Destroy()` will call
`finalize_hitscan_and_generate_tracers()`. The projectile's
`trajectory`, which points to the invalid turf that caused the deletion
in the first place, is passed as the `ending_atom` of `get_line()`,
which returns a list of turfs between the shooter and the point (turf)
of termination.

Since the ending turf is by necessity null at this point, a runtime
occurs. Instead, we decrement the trajectory back a step
(`-trajectory_multiplier`) so that it's pointing at a valid turf on
`Destroy()`.

## Why It's Good For The Game
We experienced this runtime on Paradise a lot and the log spam got kind
of annoying. Since it's the same system, I figured I would PR it
upstream as well.

* Fixes runtime with out of bounds hitscan projectiles

---------

Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com>
2024-06-27 14:07:45 +05:30
chuga-git
4df88c1d55 Fixes runtime with out of bounds hitscan projectiles (#84192)
## About The Pull Request
When projectiles cross into an invalid turf (like crossing out of the
bounds of the map), they are automatically qdel'd. If the projectile is
hitscanning, the `Destroy()` will call
`finalize_hitscan_and_generate_tracers()`. The projectile's
`trajectory`, which points to the invalid turf that caused the deletion
in the first place, is passed as the `ending_atom` of `get_line()`,
which returns a list of turfs between the shooter and the point (turf)
of termination.

Since the ending turf is by necessity null at this point, a runtime
occurs. Instead, we decrement the trajectory back a step
(`-trajectory_multiplier`) so that it's pointing at a valid turf on
`Destroy()`.


## Why It's Good For The Game
We experienced this runtime on Paradise a lot and the log spam got kind
of annoying. Since it's the same system, I figured I would PR it
upstream as well.
2024-06-27 01:14:13 -04:00
SkyratBot
b775ad8ffb [MIRROR] Makes toy/riot C20R45's show the correct dart types in their magazines (#28370)
* Makes toy/riot C20R45's show the correct dart types in their magazines (#84095)

![image](https://github.com/tgstation/tgstation/assets/6209658/d8325450-1ca3-40d4-99d8-1dac74b7b1f1)

🆑 ShizCalev
image: Foam darts in the magazine of a toy/riot C20R45 will now show the
correct color corresponding to the type of said dart loaded in it
instead of a generic bullet sprite.
/🆑

* Makes toy/riot C20R45's show the correct dart types in their magazines

---------

Co-authored-by: Afevis <ShizCalev@users.noreply.github.com>
2024-06-25 16:22:20 +05:30
Watermelon914
0db2a23faf Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#84079)
## About The Pull Request
As the title says. A standard power cell now only stores 10 KJ and
drains power similar to how it did before the refactor to all power
appliances.

The new standard megacell stock part stores 1 MJ (what cells store right
now). APCs and SMESs have had their power cells replaced with these
megacell stock parts instead. Megacells can only be used in APCs and
SMESs. It shouldn't be possible to use megacells in any typical
appliance.

This shouldn't change anything about how much 'use' you can get out of a
power cell in regular practice. Most should operate the same and you
should still get the same amount of shots out of a laser gun, and we can
look at expanding what can be switched over to megacells, e.g. if we
want mechs to require significantly more power than a typical appliance.

Thanks to Meyhazah for the megacell icon sprites.

## Why It's Good For The Game
Power cell consumption is way too high ever since the power appliance
refactor that converted most things to be in joules. It's a bit
ridiculous for most of our machinery to drain the station's power supply
this early on.

The reason it's like this is because regular appliances (laser guns,
borgs, lights) all have a cell type that is identical to the APC/SMES
cell type. And it means that if we want to provide an easy way to charge
these appliances without making it easy to charge APCs/SMESs through a
power bug exploit, we need to introduce a new cell type to differentiate
between what supplies power and regular appliances that use power. This
is primarily what the megacell stock part does.

This moves us back to what it was originally like before the power
refactor, where recharging power cells wouldn't drain an exorbitant
amount of energy. However, it maintains the goal of the original
refactor which was to prevent people from cheesing power generation to
produce an infinite amount of power, as the power that APCs and SMESs
operate at is drastically different from the power that a regular
appliance uses.

## Changelog
🆑 Watermelon, Mayhazah
balance: Drastically reduces the power consumption and max charge of
power cells
balance: Added a new stock part called the battery, used primarily in
the construction of APCs and SMESs.
add: Suiciding with a cell/battery will shock you and potentially dust
you/shock the people around you if the charge is great enough.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
2024-06-25 00:32:19 +00:00
Afevis
25c6602196 Makes toy/riot C20R45's show the correct dart types in their magazines (#84095)
![image](https://github.com/tgstation/tgstation/assets/6209658/d8325450-1ca3-40d4-99d8-1dac74b7b1f1)

🆑 ShizCalev
image: Foam darts in the magazine of a toy/riot C20R45 will now show the
correct color corresponding to the type of said dart loaded in it
instead of a generic bullet sprite.
/🆑
2024-06-24 16:43:00 -05:00
SkyratBot
4430254615 [MIRROR] DRAGnet snares now use a dedicated beacon instead of the station teleporter (#28290)
* DRAGnet snares now use a dedicated beacon instead of the station teleporter

* Updates modular maps

---------

Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-06-21 14:25:48 +05:30
SkyratBot
a69e8ddc13 [MIRROR] Event Horizon Anti-Existential Beam Rifle. The ultimate conclusion to the arms race and the sniper's art. (#28285)
* Event Horizon Anti-Existential Beam Rifle. The ultimate conclusion to the arms race and the sniper's art. (#83934)

## About The Pull Request

Replaces the Particle Acceleration Rifle, or the Beam Marksman Rifle,
with the Event Horizon Anti-Existential Beam Rifle.

In short, it shoots black holes.

It takes five cores to make.

It pretty much kills everything you point it at and their immediate
bystanders as well.

You can do this from the relative safety of a whole four screens away
thanks to it having a scope.

There can only ever be one vortex anomaly made in the round. The recipe,
however, always requires the maximum number of cores that can be made in
a round. If the number goes up for some reason (maybe someone wants to
add more vortex items), so does the total number of cores needed to make
an AEBR.

## Why It's Good For The Game

Firstly; the beam rifle? Awful. Jank code. Bad performance. Ancient
balancing considerations. Just too strong to bring out regularly against
specifically blobs, but completely fucking useless against anyone else.

So I'm hitting all these problems at once. I reduced a 600 line file to
less than 60. I've removed all that bad code. I've also made it
specifically unable to combat blobs at all because singularities send
blobs off to safety.

Secondly; this is maybe the first example of 'more cores = bigger
power'. The rifle was already utterly trash to have around, and I just
didn't think the way it worked currently could really excite anyone
enough to go on a big ol' quest to get it. Solution?

You will cause a shuttle call if you get this weapon.

## Changelog
🆑
add: Replaces the Particle Acceleration Rifle with the Event Horizon
anti-existential beam rifle. It shoots black holes. You can make this
in-game. That's right, YOU!
balance: Only one vortex anomaly can be made in a round.
/🆑

---------

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

* Event Horizon Anti-Existential Beam Rifle. The ultimate conclusion to the arms race and the sniper's art.

* Fix linter

---------

Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-06-21 13:14:49 +05:30
Rhials
7b1a0daad2 DRAGnet snares now use a dedicated beacon instead of the station teleporter (#84118)
## About The Pull Request

This sets up an alternative to the DRAGnet snares using the teleporter
to determine the destination of their snare teleport -- The DRAGnet
beacon.

![drag
net](https://github.com/tgstation/tgstation/assets/28870487/0084d4d9-378f-4896-bc88-0685d6407999)

Rather than using a convoluted system that routes via the teleporter,
DRAGnets can now by synced with a DRAGnet beacon. When snare rounds are
fired and successfully teleport a target, they will instead be sent to
the synced beacon. Syncing can be done by either pressing the gun to the
beacon or vice-versa.

These beacons can be wrenched into place, then swiped with a security ID
to block them from being unwrenched. An emag will unlock and unwrench
the beacon, and fry its access control.

To facilitate this change, roundstart DRAGnet armory spawns are now done
through spawners (like the other weapons), which includes a single
beacon to be used by the two guns. You can print more with basic sec
tech, and one is included in the DRAGnet crate from cargo.

The teleport is also slightly more accurate, to make it more consistent.
As usual, if not synced to a beacon, DRAGnets will just teleport your
target willy-nilly.
## Why It's Good For The Game

The current system is both clunky and prone to mishaps, dissuading
players from engaging with it. The "active" teleporter concept has
always been a bit of a mystery to players, and when a system for
properly using the DRAGnet teleport is set up, it's incredibly easy to
break even on accident. Every time you teleport a prisoner you have to
pray that no bumbling space explorer decided to reroute the teleporter
to the abandoned satellite.

This system is much more clear and reliable. It's also more versatile,
allowing for multiple teleport networks to be set up simultaneously.
Security is starved for creativity at times. They deserve to be able to
do some wacky dynamic stuff with their tools.
## Changelog
🆑 Rhials
balance: DRAGnets now come with a beacon they can be synced to, which
will set the destination for the snare round's teleport ability.
/🆑
2024-06-20 10:19:30 -07:00
necromanceranne
4739cedebc Event Horizon Anti-Existential Beam Rifle. The ultimate conclusion to the arms race and the sniper's art. (#83934)
## About The Pull Request

Replaces the Particle Acceleration Rifle, or the Beam Marksman Rifle,
with the Event Horizon Anti-Existential Beam Rifle.

In short, it shoots black holes.

It takes five cores to make.

It pretty much kills everything you point it at and their immediate
bystanders as well.

You can do this from the relative safety of a whole four screens away
thanks to it having a scope.

There can only ever be one vortex anomaly made in the round. The recipe,
however, always requires the maximum number of cores that can be made in
a round. If the number goes up for some reason (maybe someone wants to
add more vortex items), so does the total number of cores needed to make
an AEBR.

## Why It's Good For The Game

Firstly; the beam rifle? Awful. Jank code. Bad performance. Ancient
balancing considerations. Just too strong to bring out regularly against
specifically blobs, but completely fucking useless against anyone else.

So I'm hitting all these problems at once. I reduced a 600 line file to
less than 60. I've removed all that bad code. I've also made it
specifically unable to combat blobs at all because singularities send
blobs off to safety.

Secondly; this is maybe the first example of 'more cores = bigger
power'. The rifle was already utterly trash to have around, and I just
didn't think the way it worked currently could really excite anyone
enough to go on a big ol' quest to get it. Solution?

You will cause a shuttle call if you get this weapon.

## Changelog
🆑
add: Replaces the Particle Acceleration Rifle with the Event Horizon
anti-existential beam rifle. It shoots black holes. You can make this
in-game. That's right, YOU!
balance: Only one vortex anomaly can be made in a round.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2024-06-20 13:58:21 +01:00
SkyratBot
8b31484612 [MIRROR] Mining borgs can now get multiple copies of a single modkit again (#28230)
* Mining borgs can now get multiple copies of a single modkit again (#84052)

## About The Pull Request

A previous pull request cleaned borg upgrade code up a lot, and included
a check to prevent duplicate upgrades from being installed. Usually this
is a good thing, but there are some upgrades that are intended to allow
duplicates. Namely, PKA modkits in mining borgs. This PR just fixes
that, so mining borgs can have multiple modkits again. This does NOT
allow borgs to go above the 90% complexity limit on their PKAs, as a
separate piece of code handles that.
## Why It's Good For The Game

Bugs are bad.
## Changelog
🆑
fix: Mining borgs can get multiple modkits of the same type installed
again.
/🆑

* Mining borgs can now get multiple copies of a single modkit again

---------

Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com>
2024-06-18 00:27:23 +01:00
GPeckman
c9fbce26b7 Mining borgs can now get multiple copies of a single modkit again (#84052)
## About The Pull Request

A previous pull request cleaned borg upgrade code up a lot, and included
a check to prevent duplicate upgrades from being installed. Usually this
is a good thing, but there are some upgrades that are intended to allow
duplicates. Namely, PKA modkits in mining borgs. This PR just fixes
that, so mining borgs can have multiple modkits again. This does NOT
allow borgs to go above the 90% complexity limit on their PKAs, as a
separate piece of code handles that.
## Why It's Good For The Game

Bugs are bad.
## Changelog
🆑
fix: Mining borgs can get multiple modkits of the same type installed
again.
/🆑
2024-06-17 16:25:27 -06:00
nevimer
e96f29d4a5 Merge remote-tracking branch 'Skyrat-SS13/master' into upstream-2024-06-16
# Conflicts:
#	_maps/_basemap.dm
#	_maps/map_files/IceBoxStation/IceBoxStation.dmm
#	_maps/skyrat/automapper/automapper_config.toml
#	code/__DEFINES/surgery.dm
#	code/datums/weather/weather_types/radiation_storm.dm
#	code/modules/antagonists/changeling/changeling.dm
#	code/modules/clothing/neck/_neck.dm
#	code/modules/events/_event.dm
#	code/modules/jobs/job_types/_job.dm
#	code/modules/mining/equipment/kinetic_crusher.dm
#	code/modules/mob/living/basic/vermin/frog.dm
#	modular_skyrat/modules/borgs/code/robot_upgrade.dm
2024-06-16 20:54:25 -04:00
SkyratBot
7672a71aaa [MIRROR] Fixes crossbow healium bolt sleeping silicons! Oops! (#28200)
* Fixes crossbow healium bolt sleeping silicons! Oops! (#83966)

## Why It's Good For The Game

I thought I had this in the pr itself, with the check_bodytype code in
the healium bolt, but I was wrong.
Turns out the check statement only effected the healing but the sleep
portion was left out of it by mistake. During testing I never thought to
spawn in a borg.

* Fixes crossbow healium bolt sleeping silicons! Oops!

---------

Co-authored-by: KingkumaArt <69398298+KingkumaArt@users.noreply.github.com>
2024-06-15 18:49:07 +01:00
SkyratBot
813591ad15 [MIRROR] Small playsound audit, particularly involving portal sounds (#28170)
* Small playsound audit, particularly involving portal sounds

* wew

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2024-06-15 18:42:58 +01:00
SkyratBot
df90e547cc [MIRROR] Mouse drag & drop refactored attack chain (#28156)
* Mouse drag & drop refactored attack chain

* fex

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2024-06-15 18:09:14 +01:00
KingkumaArt
8511a3aa5f Fixes crossbow healium bolt sleeping silicons! Oops! (#83966)
## Why It's Good For The Game

I thought I had this in the pr itself, with the check_bodytype code in
the healium bolt, but I was wrong.
Turns out the check statement only effected the healing but the sleep
portion was left out of it by mistake. During testing I never thought to
spawn in a borg.
2024-06-15 12:08:37 -05:00
SkyratBot
9efdb4f8bb [MIRROR] Wawastation (#27992)
* Wawastation

* Update _basemap.dm

* Update gateway.dm

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-06-15 17:23:24 +01:00
SkyratBot
19e80c32c7 [MIRROR] Tweaks some instances of get_safe_turf so things like the nuclear disk doesn't accidentally teleport to the Icebox Syndicate Base (#28184)
* Tweaks some instances of get_safe_turf so things like the nuclear disk doesn't accidentally teleport to the Icebox Syndicate Base (#83012)

Yes, I know preventing the nuke disk teleporting to the icebox syndicate
base (or possibly the wendigo arena) is removing soul. Please don't kill
me :(

## About The Pull Request

Adds some missing variables to instances of get_safe_turf() so they will
only teleport to the given z-level.
Replaces some instances of get_safe_turf() with
get_safe_random_station_turf().

## Why It's Good For The Game

First, the differences between get_safe_turf() and
get_safe_random_station_turf():

### get_safe_turf()
- gets a random safe turf on a z-level (usually any of the staiton
z-levels), not accounting for the /area/
- should be used if you don't care if it spawns on the station or not,
or if you need to specifically teleport to a z-level
- not very expensive performance wise

###  get_safe_random_station_turf()
- gets a random safe turf that will always be a station area, ignoring
z-level.
- should be used if you NEED the turf to be on a station's area
- slightly more expensive performance wise than get_safe_turf, but still
very cheap

Some code was using get_safe_turf() when it should've been using
get_safe_random_station_turf(), and some code that should be using
get_safe_turf() were incorrectly using the zlevels arg instead of zlevel
arg (Yes, there is a difference), or didn't include it at all.

All the changes were made to my best judgement. If you're curious about
a change, please ask and I will explain why I did it.

## Changelog

🆑 BurgerBB
fix: Tweaks some instances of get_safe_turf so things like the nuclear
disk doesn't accidentally teleport to the Icebox Syndicate Base
/🆑

---------

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

* Tweaks some instances of get_safe_turf so things like the nuclear disk doesn't accidentally teleport to the Icebox Syndicate Base

---------

Co-authored-by: BurgerLUA <8602857+BurgerLUA@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
2024-06-15 04:17:39 +01:00
SkyratBot
b540aaf8ab [MIRROR] Afterattack is dead, long live Afterattack (#28128)
* Afterattack is dead, long live Afterattack

* wew

* fixes

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2024-06-15 04:02:11 +02:00
BurgerLUA
e87045b377 Tweaks some instances of get_safe_turf so things like the nuclear disk doesn't accidentally teleport to the Icebox Syndicate Base (#83012)
Yes, I know preventing the nuke disk teleporting to the icebox syndicate
base (or possibly the wendigo arena) is removing soul. Please don't kill
me :(

## About The Pull Request

Adds some missing variables to instances of get_safe_turf() so they will
only teleport to the given z-level.
Replaces some instances of get_safe_turf() with
get_safe_random_station_turf().

## Why It's Good For The Game

First, the differences between get_safe_turf() and
get_safe_random_station_turf():

### get_safe_turf()
- gets a random safe turf on a z-level (usually any of the staiton
z-levels), not accounting for the /area/
- should be used if you don't care if it spawns on the station or not,
or if you need to specifically teleport to a z-level
- not very expensive performance wise

###  get_safe_random_station_turf()
- gets a random safe turf that will always be a station area, ignoring
z-level.
- should be used if you NEED the turf to be on a station's area
- slightly more expensive performance wise than get_safe_turf, but still
very cheap

Some code was using get_safe_turf() when it should've been using
get_safe_random_station_turf(), and some code that should be using
get_safe_turf() were incorrectly using the zlevels arg instead of zlevel
arg (Yes, there is a difference), or didn't include it at all.

All the changes were made to my best judgement. If you're curious about
a change, please ask and I will explain why I did it.

## Changelog

🆑 BurgerBB
fix: Tweaks some instances of get_safe_turf so things like the nuclear
disk doesn't accidentally teleport to the Icebox Syndicate Base
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2024-06-14 21:57:33 +01:00
SkyratBot
e5ad4d3568 [MIRROR] Make PKA and PKC fireproof (#28161)
* Make PKA and PKC fireproof (#83865)

## About The Pull Request
adds a `resistance_tag = FIRE_PROOF` to both the PKA and PKC

## Why It's Good For The Game
Miner equipment should be fireproof. The explorer suit does not burn so
their weapons should not either.
fix #83851

## Changelog
🆑 Goat
qol: Mining's PKAs and PKCs are now fireproof.
/🆑

* Make PKA and PKC fireproof

* Update kinetic_crusher.dm

---------

Co-authored-by: Goat <126099705+Goat-Real@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2024-06-14 20:23:22 +01:00
MrMelbert
6fea9d999d Small playsound audit, particularly involving portal sounds (#83893)
## About The Pull Request

I was looking at sounds (as you do) and I noticed this


![image](https://github.com/tgstation/tgstation/assets/51863163/25b298ca-31ac-48a0-9f86-c65a8becd532)

These sounds don't exist

We have `portal_open_1`, not `portal_open1`. 
This wasn't caught on compile because they used `""` and not `''`.

So I went through and audited a bunch of playsound uses that don't use
`''`. Only one error, fortunately

Likewise there was a ton of places running `get_sfx` pointlessly
(because `playsound` does it for you) so I clened that up.

However while auditing the portal stuff I noticed a few oddities, so I
cleaned it up a bit.

Also also I added the portal sounds to the wormholes event and gave it a
free ™️ optimization because it was an in-world loop

## Changelog

🆑 Melbert
sound: Portals made by portal guns now make sounds as expected
sound: Wormholes from the wormhole event now make sounds when formed
/🆑
2024-06-13 23:47:37 -06:00
Goat
06b2e0aae1 Make PKA and PKC fireproof (#83865)
## About The Pull Request
adds a `resistance_tag = FIRE_PROOF` to both the PKA and PKC

## Why It's Good For The Game
Miner equipment should be fireproof. The explorer suit does not burn so
their weapons should not either.
fix #83851 

## Changelog
🆑 Goat
qol: Mining's PKAs and PKCs are now fireproof.
/🆑
2024-06-13 20:58:17 +00:00
SyncIt21
b6369a47b4 Mouse drag & drop refactored attack chain (#83690)
## About The Pull Request
Mouse drag & drop has been refactored into its own attack chain. The
flowchart below summarizes it

![Flowchart](https://github.com/tgstation/tgstation/assets/110812394/d92047ff-d94c-44a6-9e87-354c3d525021)

Brief summary of each proc is as follows

**1. `atom/MouseDrop()`**
- It is now non overridable. No subtype should ever touch this proc
because it performs 2 basic checks
  
a) Measures the time between mouse down & mouse release. If its less
than `LENIENCY_TIME`(0.1 seconds) then the operation is not considered a
drag but a simple click

b) Measures the distance squared between the drag start & end point. If
its less than `LENIENCY_DISTANCE`(16 pixels screen space) then the drag
is considered too small and is discarded

- These 2 sanity checks for drag & drop are applied across all
operations without fail
  
**2. `atom/base_mouse_drop_handler()`**
- This is where atoms handle mouse drag & drop inside the world. Ideally
it is non overridable in most cases because it also performs 2 checks
- Is the dragged object & the drop target adjacent to the player?.
Screen elements always return true for this case
  
- Additional checks can be enforced by `can_perform_action()` done only
on the dragged object. It uses the combined flags of
`interaction_flags_mouse_drop` for both the dragged object & drop target
to determine if the operation is feasible.
     
We do this only on the dragged object because if both the dragged object
& drop target are adjacent to the player then `can_perform_action()`
will return the same results when done on either object so it makes no
difference.

Checks can be bypassed via the `IGNORE_MOUSE_DROP_CHECKS` which is used
by huds & screen elements or in case you want to implement your own
unique checks

**3. `atom/mouse_drop_dragged()`**
- Called on the object that is being dragged, drop target passed here as
well, subtypes do their stuff here
- `COMSIG_MOUSEDROP_ONTO` is sent afterwards. It does not require
subtypes to call their parent proc

**4. `atom/mouse_drop_receive()`**
- Called on the drop target that is receiving the dragged object,
subtypes do their stuff here
- `COMSIG_MOUSEDROPPED_ONTO` is sent afterwards. It does not require
subtypes to call their parent proc

## Why It's Good For The Game
Implements basic sanity checks across all drag & drop operations. Allows
us to reduce code like this


8c8311e624/code/game/machinery/dna_scanner.dm (L144-L145)

Into this

```
if(!iscarbon(target))
	return
```

I'm tired of seeing this code pattern `!Adjacent(user) ||
!user.Adjacent(target)` copy pasted all over the place. Let's just write
that at the atom level & be done with it

## Changelog
🆑
refactor: Mouse drag & drop attack chain has been refactored. Report any
bugs on GitHub
fix: You cannot close the cryo tube on yourself with Alt click like
before
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2024-06-13 13:28:41 -07:00