Commit Graph

2972 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
MrMelbert
ff6b41aa07 Afterattack is dead, long live Afterattack (#83818)
## About The Pull Request

- Afterattack is a very simple proc now: All it does is this, and all
it's used for is for having a convenient place to put effects an item
does after a successful attack (IE, the attack was not blocked)


![image](https://github.com/tgstation/tgstation/assets/51863163/1e70f7be-0990-4827-a60a-0c9dd0e0ee49)

- An overwhelming majority of afterattack implementations have been
moved to `interact_with_atom` or the new `ranged_interact_with_atom`

I have manually tested many of the refactored procs but there was 200+
so it's kinda hard

## Why It's Good For The Game

Afterattack is one of the worst parts of the attack chain, as it
simultaneously serves as a way of doing random interactions NOT AT ALL
related to attacks (despite the name) while ALSO serving as the defacto
way to do a ranged interaction with an item

This means careless coders (most of them) may throw stuff in afterattack
without realizing how wide reaching it is, which causes bugs. By making
two well defined, separate procs for handing adjacent vs ranged
interactions, it becomes WAY WAY WAY more easy to develop for.

If you want to do something when you click on something else and you're
adjacent, use `interact_with_atom`
If you want to do something when you click on something else and you're
not adjacent, use 'ranged_interact_with_atom`

This does result in some instances of boilerplate as shown here:


![image](https://github.com/tgstation/tgstation/assets/51863163/a7e469dd-115e-4e5b-88e0-0c664619c878)

But I think it's acceptable, feel free to oppose if you don't I'm sure
we can think of another solution

~~Additionally it makes it easier to implement swing combat. That's a
bonus I guess~~

## Changelog

🆑 Melbert
refactor: Over 200 item interactions have been refactored to use a
newer, easier-to-use system. Report any oddities with using items on
other objects you may see (such as surgery, reagent containers like cups
and spray bottles, or construction devices), especially using something
at range (such as guns or chisels)
refactor: Item-On-Modsuit interactions have changed slightly. While on
combat mode, you will attempt to "use" the item on the suit instead of
inserting it into the suit's storage. This means being on combat mode
while the suit's panel is open will block you from inserting items
entirely via click (but other methods such as hotkey, clicking on the
storage boxes, and mousedrop will still work).
refactor: The detective's scanner will now be inserted into storage
items if clicked normally, and will scan the storage item if on combat
mode
/🆑
2024-06-11 21:58:09 -07:00
KingkumaArt
ed4ba0d227 Adds Atmos-themed Rebar Crossbow Ammo Types (and minor balance changes) (#83310)
## About The Pull Request

So this PR comes in two basic parts: the new ammo types and the minor
balance changes. I'll go over each separately.

**--- NEW AMMO TYPES ---** 


![image](https://github.com/tgstation/tgstation/assets/69398298/c031cf87-7bde-4a67-b5fc-109bedcece88)

-- Metallic Hydrogen Ammo: Made from Metallic Hydrogen, obviously. Has
middling damage and no dismemberment chance, but pierces through armor
and enemies like they weren't even there.

-- Zaukerite Slivers: Made from a zaukerite crystal. Does high toxic
damage, and has excellent wounding and embed chances, but lacking in
armor penetration. Also gives 1 second of blurry vision if it hits you!

-- Paper balls: Crafted from a sheet of paper. Mostly just a throwing
joke item, and 99% nonlethal like donksoft. Can be fired from a
crossbow, but also could be used if you wanted to have a snowball fight
on metastation.

-- Healium Crystal Bolts! Crafted (using menu) from the healium grenade
item. Heals 30 of brute/tox/burn, but puts who is hit by it to sleep for
three seconds, limiting its use in actual combat.

-- Supermatter Bolts: Dusts whoever you shoot it at! Absurdly
overpowered! Admin only!

-- A makeshift quiver, made from cutting a o2 tank in half, to store all
the ammo in.

**MINOR BALANCE CHANGES**

-- For some reason I thought the 357, which the traitor crossbow is a
direct competitor to, did 40 damage when making the first version of the
PR, instead of the reality of it doing 60. It's been buffed to 55
damage. (The basic engi one still does 35.)

-- I've been informed that generally, the stressed rebar crossbow isn't
ever used, as the misfire chance isnt worth the extra shot. As such, I
felt it was thematic to say that the stressing procedure involves
messing with the draw system in the fluff, and the stressed one now
takes half as long to rack.

**OTHER CRAP**

-- The rods now drop themselves if you shoot them at a wall. Hopefully.
-- Fixed the the non-bare wound chance on the traitor crossbow not being
increased from the base version.
-- Has a nice electronic discharge noise on firing.

## Why It's Good For The Game

I'm very happy with the reception of the rebar crossbow, and felt that
given it was an engi weapon at heart, giving it some engi-related
ammunition would fit it very well (and also have a good reason for
making zaukerite besides selling it.) The paper balls were more just so
the crew could able to shoot their buddies with it and not maim them.

As for the balance, I feel the tot crossbow being department restricted
is already a strong factor in it being infrequently seen, and if someone
is lucky enough to roll traitor in a job slot, it's a shame if their
job's items aren't worth it. The stressed variant is a similar case, and
I hope it's enough of a buff to encourage its use.

## Changelog
🆑 WebcomicArtist
add: Added zaukerite (high damage/embed, low AP) and metallic hydrogen
(High AP and piercing, but low embed) crossbow ammo for the rebar
crossbows
add: Added healium crystal ammo for the crossbow as well, which heals
whomever you shoot it at.
add: Added admin-only supermatter crossbow bolts that dust you, because
why the hell not.
add: Added non-harmful paper balls. Can be shot from a crossbow, or
thrown at co-workers.
add: Added a quiver made from cutting an o2 tank in half, to hold it
all.
image: added sprites for all the above.
balance: Traitor Engineer Crossbow ammo now does 55 damage instead of
45, to make it compete with revolver.
balance: Stressed Rebar Crossbow now has a shorter delay required to
rack it, but can shoot you in the face on misfire.
fix: fixed rebar crossbow shots not dropping items on hitting walls
fix: fixed traitor crossbow having worse wound chance than the base one
sound: added new crossbow firing sound effect

/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2024-06-09 02:06:26 +00:00
SyncIt21
d91650ea39 Alt right click refactor (#83736) 2024-06-07 10:20:33 -07:00
jimmyl
c57afc4689 Wawastation (#82298)
- [x] #82282
- [x] map in aux base how the hell did i forget it
- [x] fill out maints
- [x] properly test the goddamn thing
- [x] fix major cameranets
- [ ] fix any issues
- [x] write a proper pr body

## About The Pull Request

adds this map to the map rotation

bottom level (24.5.2024)
![StrongDMM-2024-05-24 06 59
36](https://github.com/tgstation/tgstation/assets/70376633/6ca7cbef-88cb-4225-9814-8e521447a7f2)


upper level (24.5.2024)

![image](https://github.com/tgstation/tgstation/assets/70376633/8de5e61d-73a8-453d-8b87-025e5ab0b26a)





## general map details and department stuff
- the station is more focused on the bottom level, so falling in doesnt
roundremove you
- this is an asteroid station, so assistants can larp as dorfs and mine
towards the sweet loot
- there is plenty multiz usage
- service is the center of the station

**Service** - Is the center of the station. Arrivals docks directly in
the middle of the station next to Upper Service, so bar might get more
traffic. Not much different than normal Service, but janitors closet is
also present here, he sleeps on the floor. We do not talk about the
janitor. Above Bar is Library and Hydroponics with an overlook to look
at bar. The Theater has a big curtain and a podium directly in the bar.

29.3.2024

![ezgif-1-4549df2db8](https://github.com/tgstation/tgstation/assets/70376633/eb0d7b41-3bd9-444d-b74a-ec99ac6be649)


**Civilian** - Also in the center of the station, next to bar. There
isnt much to talk about dorms, its pretty normal.

**Cargo** - Absence of chutes that go to departments, reminder that mail
sorting is a thing. Cargo bay is a big open area with a boutique/shop
facing primary hall that starts closed, and Cargo has its own crate
elevator. Theres upper Cargo where mining, bitrunning and a secure
warehouse is located (There may be a murder scene). The quartermasters
office spans two z-levels and is relatively compact. Not much else
different from regular cargo. ~~Oh also the QM starts with an empty
PML-9 and a mostly functional rocket~~

29.3.2024

![ezgif-1-4d6bfe6c07](https://github.com/tgstation/tgstation/assets/70376633/cdac216c-2587-41d8-8ffd-5064378347eb)


**Medical** - Large centralized medbay, also two z-levels. There is a
public waiting room with triage and a reception. There is also an inner
elevator for the crippled. There are two medbay-access patient rooms
that are unrestricted from the inside, and two operating rooms. Medbay
has its own rad shelter. The virologist does not get their own
satellite, but is still relatively secure.

29.3.2024
https://i.ibb.co/hs9kKbV/ezgif-1-f7b697b067.gif (large gif)

**Command** - AI Sat transit tube access is here. HoP has an open stall
facing primary hall, ~~and maybe a piano trapdoor~~ pretty classic
bridge, Captain does not get his own office but gets a really
comfortable quarters with his own emergency mass ejection for abandoning
ship. The council meeting room is present above bridge, with ERT Ferry
dock docking inside adjacent to the council room.

**Security** - Mostly bottom z level security. Very compact brig cells,
and a meeting room that everyone that is related to security may spawn
in if youre lucky. Warden has a weapon handout point facing the inner
security hall and the equipment room. Reeducation chamber has a shocked
grille treadmill. HoS and Warden Room and armory are on the upper
z-level, and warden has a VERY good overlook over permabrig. Armory is
seperated into nonlethal to mostly nonlethal and lethal.

29.3.2024

![ezgif-1-d833de73fc](https://github.com/tgstation/tgstation/assets/70376633/860d4d7e-c250-4ad2-a2d6-4ae126defab5)


**Science** - Also pretty centralized, breakroom with a smoking corner,
two z levels and a big overlook. RD office overlooks toxins and bomb
site. Genetics and RD Office is on the upper floor, with a science
exclusive monkey exhibit. Xenobio is thick due to proximity to bomb
site, otherwise normal.

29.3.2024

![ezgif-1-4f8814ece9-1](https://github.com/tgstation/tgstation/assets/70376633/73afd9da-f37b-402b-aead-84f81c13cf7b)


**AI Sat** - Okay at this point assume any department is multiz. The
antechamber is an elevator and the turrets are on said elevator. The
elevator may be sent to the top level by engineers, where the AI core
is. Telecomms is on the bottom level, and AI core is above it. Contains
a borg entertainment room, and also the upload. The elevator being
raised is necessary to properly enter AI Room.

**Engineering** - Contains a less stale but still average and less than
optimal SM setup. Prone to catastrophic disaster. The SM Room is two
levels and very open, and CE has a trapdoor directly into the shard.
Turbine is above atmospherics, so is the crystallizer. The HFR and main
atmos and distribution room are on the bottom level. Piped by **Kendra
Hunter**. Contains a built in electrolyzer corner so atmos mains stop
gutting the aesthetics to place down some dumb machine.

## Why It's Good For The Game

another interesting map into the roster, different from the other multiz
maps in the form that you dont get stuck in hell by falling down a hole

todo write better section

## Changelog
🆑
add: wawastation, the station map
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2024-06-04 07:11:13 -07:00
LemonInTheDark
9c3df9d82d Resolves beam rifle overtime issues (#83476)
## About The Pull Request

Ok so like, beam rifles send out tracer rounds right
We send out tracer rounds once every few seconds and if the mob or mouse
moves.
The problem is those tracer rounds are hitscan, and hitscan projectiles
don't like, wait to move.
So if I just drag my mouse a bunch I'm causin a bunch of hitscan
attempts.

This might be ok, but what happens if I do it in space (the place with
100s of turfs empty of things to hit).
Anyway let's do some tick checking in hitscan's while loop so it can't
eat seconds of cpu time uncontested

## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/58055496/527b9bd1-4031-4a01-b4db-9e044270aa9b)


https://github.com/tgstation/tgstation/assets/58055496/2ce870f5-b65d-46e5-8dc3-11646c789290
2024-05-28 14:08:27 -06:00
YesterdaysPromise
8eb3b51ad9 /icons/ folder cleansing crusade part 3 (#83420)
## About The Pull Request

In my effort to make the /icons/ folder cleaner and more intuitive
instead of having to rely on recalling names of stuff and looking them
up in code to find them for poor sods such as myself, plus in spurt of
complusion to organize stuff, here goes. I've tracked all changes in
commit descriptions. A lot still to be done, but I know these waves go
over dozens of files making things slow, so went lighter on it.
Destroyed useless impostor files taking up space and cleaned a stray
pixel on my way.

## Why It's Good For The Game

Cleaner /icons/ file means saner spriters, less time spent. Stray pixels
and impostor files (ones which are copies of actually used ones
elsewhere) are not good.

## Changelog

🆑
image: Cleaned a single stray pixel in a single frame of a bite
telegraphing accidentaly found while re-organizing the files.
/🆑
2024-05-25 21:08:08 -07:00
paganiy
8dd84a3fd5 [no gbp] fix shooting at objects on the floor (#83419)
## About The Pull Request
I made a mistake
## Why It's Good For The Game
You can shoot at items on the floor again
## Changelog
🆑
fix: You can shoot at items on the floor again
/🆑

Co-authored-by: paganiy <leunscrupuloustrolle@gmail.com>
2024-05-25 15:50:15 -07:00
Da Cool Boss
c31c364e3a Fully deletes improvised shotgun shells from the game. (#83436)
## About The Pull Request
For whatever reason, these were partially deleted but the projectile was
left in. Since the thing that spawns these projectiles is 100% gone from
the game and can't even be spawned by admins there's no reason to keep
this vestigial code.
## Why It's Good For The Game
Why waste lines of code and storage space on something that is now gone?
It's just clutter.
## Changelog
🆑
no player facing change
/🆑
2024-05-26 10:02:01 +12:00
paganiy
c3ff3e06c3 Auto-aim in combat mode at mobs on the floor is disabled after 10 tiles. (#83270)
## About The Pull Request
As stated in the title, auto-aiming at prone targets is disabled after
the projectile passed more than 10 tiles (the limit of vision of an
ordinary spaceman is 9 tiles). Within 10 tiles, shooting in combat mode
remains unchanged. This also does not apply to sniper rifles.
Here's a preview of how it works:


https://github.com/tgstation/tgstation/assets/126676387/d62fbb03-9f63-4a73-a32a-62b4d11e4515
## Why It's Good For The Game
The main problem of shooting in combat mode is shooting in busy
corridors. Often, you are unwilling to become a participant in the
security's pursuit of the antagonist, and receive unintended
projectiles. You will be lucky if the projectile turns out to be
non-lethal, but if it is a laser, you can get a second-degree burn or
even a catastrophic one from just one shot. (depending on which laser
was fired and where you were hit), which is not very pleasant. To stay
unharmed and simplify the work of security, it is logical to lie down on
the floor.
This will not revive the lie-down meta to dodge projectiles, because
within sight of the spaceman and even a little further, lying targets
will still be hit by projectiles. And if you decide to lie down during
the chase to dodge the projectiles, then the pursuers will quickly catch
up with you and shoot you in combat mode.
## Changelog
🆑
balance: Auto-aim in combat mode at mobs on the floor is disabled after
the projectile passes 10 tiles.
/🆑

---------

Co-authored-by: paganiy <leunscrupuloustrolle@gmail.com>
2024-05-22 13:31:42 +01:00
Hatterhat
14e27ec462 adds the Ansem/SC, the logical conclusion to the John Splintercell series (#83228)
## About The Pull Request
Replaces the Ansem, SC/FISHER, and suppressor in the Sam Fisher gimmick
bundle with the Ansem/SC, a variant of the Ansem that:
- has an integral suppressor (read: acts like it's always suppressed,
because it is)
- an underbarrel light disruptor (functionally identical to the
SC/FISHER, fired with RMB)
(note: firing the disruptor in combat mode causes the main gun to fire
as if it were being fired akimbo. which it shouldn't, but I'm not sure
how to make it not do that)
- is longer, visually, but not storage-wise, and also visibly has an
underbarrel light disruptor

![image](https://github.com/tgstation/tgstation/assets/31829017/0842d9b9-9b24-4833-aeae-631c3bf1a5d5)

Also added code support for integrally suppressed ballistic guns (with
no separate suppressor overlay), handled by the can_unsuppress variable.

Also fixes the SC/FISHER disrupting APCs for ten times longer than they
probably should have been disrupted.
## Why It's Good For The Game
In regards to the Ansem, SC/FISHER, suppressor:
The Sam Fisher gimmick bundle having the Ansem and SC/FISHER as separate
items always kinda bugged me, since it seemed too clunky for a
sneaky-beaky operator-type to have to juggle two guns (one which you had
to bump to normal-size, leaving it unable to fit in the belt) to break
lights and then shoot dudes in the back of the head. So now it's one
gun, like the M-90gl and its grenade launcher. I think the bundle's rare
enough that it's fine to give them this much.

In regards to the APC thing:
Shooting an APC with a gimmick gun and leaving it unpowered for two
minutes seemed unintentional.

In regards to the code support for integrally suppressed guns:
Maybe someone else will want to put in another integrally suppressed
gun? It was relevant for this use-case.
## Changelog

🆑
qol: The Ansem, suppressor, and SC/FISHER included in the Fisher gimmick
bundle now come together as one whole gun, the Ansem/SC. It's integrally
suppressed, and fires the disruptor on right-click.
fix: The SC/FISHER disrupts APCs for an appropriate amount of time, not
ten times the intended disruption length.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-05-17 09:17:05 +00:00
nikothedude
03db803001 Parse_zone audit + minor misc cleanup (#83154)
## About The Pull Request

Does a audit on all uses of parse_zone, replacing most instances of it
with a new living-level proc that refers to the bodypart in that zone if
it exists.

In other cases, removes parse_zone entirely because the bodypart is
already confirmed to exist, so we just use plaintext_zone.

Also cleans up some single letter vars.
## Why It's Good For The Game

In the doc of ```plaintext_zone```, its said it ```Should be used for
parsing non-instantiated bodyparts```. 99% of the code ignores the
possibility of a bodypart existing, and so uses parse_zone when
plaintext_zone could be accessed instead.
## Changelog
🆑
code: Most instances of parse_zone now refer to the limb's
plaintext_zone var
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-05-16 16:45:33 +00:00
Pickle-Coding
066815ab88 The armoury contraband locker guns have a chance to be rigged. (#83167)
## About The Pull Request
Gives a 10% chance for the handguns in the armoury to be rigged. The
makarov and desert eagle will have a clown pin, ultra clown pin or the
explosive ultra clown pin when rigged, randomly and uniformly weighted.
The pins can not be removed, even the normal ones, so there is only one
way to find out. The Unica 6 will be reversed, shooting you instead when
rigged.
## Why It's Good For The Game
People are too trustworthy of the gear they use in the contraband
locker. By giving them a chance to be rigged and backfire on them,
people will treat these guns like contraband and not toys. If someone
was treating them like a toy, they could receive a nice introduction of
the syndicate.
## Changelog
🆑
balance: There are reports of malfunctioning guns being confiscated.
/🆑
2024-05-15 07:25:03 +02:00
PKPenguin321
261548f09d Staff of Shrinking for the wizard (#83115)
<!-- 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

Adds a new staff for the wizard that shoots shrink rays. Also a
corresponding wand that comes with the wand belt. Shrinking is a
mechanic already implemented by abductors, but it's not often used
because it doesn't fit their kit super well. That's a huge shame because
shrinking stuff/people is really funny. And you know where funny stuff
fits well? The wizard kit.

OH YEAH and being shrunken now gives you the squash component so you can
be squashed as though you were a roach, though this only deals 10 damage
instead of gibbing you

tiny staff

![68747470733a2f2f696462322e616666656374656461726330372e636f2e756b2f696d616765732f32353836323339392f38333131352f31333237383435323531373936343834343132322e706e67](https://github.com/tgstation/tgstation/assets/8345184/af777602-036f-4171-ad43-5dafa7b29414)
tiny wand

![68747470733a2f2f696462322e616666656374656461726330372e636f2e756b2f696d616765732f32353836323339392f38333131352f393439333932353034373033303238393530372e706e67](https://github.com/tgstation/tgstation/assets/8345184/81241789-404f-4d8e-8473-2ec74b171f55)
exhausted wand turns back to a big wand sprite :)

![68747470733a2f2f696462322e616666656374656461726330372e636f2e756b2f696d616765732f32353836323339392f38333131352f323039323438333731323537303338313239362e706e67](https://github.com/tgstation/tgstation/assets/8345184/c2073952-c16b-4113-9ca9-527cfdbcfd16)


## Why It's Good For The Game

Shrinking stuff is funny, plus it gives the wizard something new to do
besides polymorphing everyone or turning everybody to stone or ei
nathing people.

## 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: New funny wizard staff/wand that shrinks stuff.
add: Being shrunken now leaves you vulnerable to being crushed to death.
/🆑

<!-- 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. -->
2024-05-15 03:10:13 +02:00
Afevis
a0a51c5964 Ensures kinetic accelerators always get their mods added to the modkits list (#83222)
Fixes #83213

🆑 ShizCalev
fix: Spam clicking a modkit with a kinetic accelerator can no longer
lead to ghosted versions of the modkits appearing in the modkit list,
breaking the gun.
/🆑
2024-05-15 02:42:59 +02:00
Hatterhat
3f73d00482 allows the SC/FISHER to shoot floor lights (#83182)
## About The Pull Request
Lowers the hit threshold layer of SC/FISHER bolts from
`PROJECTILE_HIT_THRESHHOLD_LAYER` (2.75) to `LOW_OBJ_LAYER` (2.5),
allowing you to shoot floor lights with it.

## Why It's Good For The Game
floor lights count as lightbulbs and therefore you should be able to
explode them with the gun that explodes lightbulbs

## Changelog

🆑
fix: The SC/FISHER can now shoot floor lights.
/🆑

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2024-05-15 02:37:21 +02:00
necromanceranne
db33f07921 [NO GBP] Fixes the knife offsets of pipeguns (#83155)
<!-- 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

Fixes the knife offsets of pipeguns.

## Why It's Good For The Game

I completely forgot to fix this when I updated the pipegun sprites.
Oops.

## 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. -->

🆑
fix: Fixes the knife offset for pipeguns
/🆑

<!-- 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. -->
2024-05-15 02:32:33 +02:00
Sadboysuss
8b8934c700 Portals now make sounds (#83166)
## About The Pull Request
### New sounds:

https://drive.google.com/drive/folders/1vLoyxY93Qfe_GtCnetkEHLrkGYZ8S7nD?usp=sharing

Demo:


https://github.com/tgstation/tgstation/assets/96586172/2c468ab8-deea-4151-8d66-167b63fdda39



Changes teleporter,gulag teleporter, hand tele, bluespace teleport gun,
cultist teleport, experimental syndicate teleporter teleport sounds.
## Why It's Good For The Game
I think sounds are an integral part of immersion and having no cool
sci-fi noises for portals really spoils it.
## Changelog
🆑 grungussuss and Virgilcore
sound: portals now have a unique sound to them
/🆑
2024-05-15 02:32:01 +02:00
Afevis
9affd58bec Fixes kinetic accelerator fire sound div 0 runtime (#83177)
```
 [17:34:10] Division by zero
Thrown by fire_sounds (/obj/item/gun/energy/fire_sounds) at code/modules/projectiles/guns/energy.dm, line 50

User: Xiryang Zhol (/mob/living/carbon/human)
User Location: the volcanic floor (/turf/open/misc/asteroid/basalt/lava_land_surface) (78, 184, 3)
Source: the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator)
Source Location: Xiryang Zhol (/mob/living/carbon/human)
Stacktrace:
1	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): fire sounds()
2	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): shoot live shot(Xiryang Zhol (/mob/living/carbon/human), 0, the legion (/mob/living/basic/legion_brood), 1)
3	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): shoot live shot(Xiryang Zhol (/mob/living/carbon/human), 0, the legion (/mob/living/basic/legion_brood), 1)
4	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): process fire(the legion (/mob/living/basic/legion_brood), Xiryang Zhol (/mob/living/carbon/human), 1, "icon-x=18;icon-y=17;left=1;but...", "", 0)
5	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): process fire(the legion (/mob/living/basic/legion_brood), Xiryang Zhol (/mob/living/carbon/human), 1, "icon-x=18;icon-y=17;left=1;but...", "", 0)
6	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): fire gun(the legion (/mob/living/basic/legion_brood), Xiryang Zhol (/mob/living/carbon/human), 1, "icon-x=18;icon-y=17;left=1;but...")
7	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): afterattack(the legion (/mob/living/basic/legion_brood), Xiryang Zhol (/mob/living/carbon/human), 1, "icon-x=18;icon-y=17;left=1;but...")
8	the proto-kinetic accelerator (/obj/item/gun/energy/recharge/kinetic_accelerator): melee attack chain(Xiryang Zhol (/mob/living/carbon/human), the legion (/mob/living/basic/legion_brood), "icon-x=18;icon-y=17;left=1;but...")
9	Xiryang Zhol (/mob/living/carbon/human): ClickOn(the legion (/mob/living/basic/legion_brood), "icon-x=18;icon-y=17;left=1;but...")
10	the legion (/mob/living/basic/legion_brood): Click(the volcanic floor (78,183,3) (/turf/open/misc/asteroid/basalt/lava_land_surface), "mapwindow.map", "icon-x=18;icon-y=17;left=1;but...")
```
2024-05-15 02:30:58 +02:00
paganiy
d70aa8b55f Fix the size of the projectile of the accelerator laser cannon (#83144)
## About The Pull Request
Closes
https://github.com/tgstation/tgstation/issues/82965#issue-2270347676

This is how it looks now:


https://github.com/tgstation/tgstation/assets/126676387/3934017c-b031-4bb0-8041-231739a6144c


## Why It's Good For The Game
It's not
## Changelog
🆑
fix: Accelerator laser gun no longer shoots sun size projectiles.
/🆑

---------

Co-authored-by: paganiy <leunscrupuloustrolle@gmail.com>
2024-05-13 02:36:17 -04:00
Jacquerel
98b73d50e3 Laser decharge sound uses pitch instead of frequency (#83102)
## About The Pull Request

Now that we require Byond 515 we can make use of the sound pitch var
instead of frequency.
The advantage of this is that we can make a sound lower or higher
pitched without also changing its duration.

Before:


https://github.com/tgstation/tgstation/assets/7483112/ff61c130-788b-432e-93e8-56c6b6df42d4

After:


https://github.com/tgstation/tgstation/assets/7483112/c1c3d1d5-97fd-468e-9724-61fb6f9f3026


In some extreme cases with frequency, the sound would become incredibly
long. This no longer occurs.

## Why It's Good For The Game

I think it sounds better.

## Changelog

🆑
sound: Lasers adjust their pitch as they run out of charge, rather than
frequency
/🆑
2024-05-08 19:25:54 -06:00
necromanceranne
6fd6ebd850 Pipegun updates and glowup (#83063)
## About The Pull Request

Updates pipeguns with a brand new set of sprites. Also comes with pipe
pistols; plinkier versions of the pipegun.

![ye
pipeguns](https://github.com/tgstation/tgstation/assets/40847847/dd8ea3db-aa5a-403e-9eca-c3aa2c38b694)


![image](https://github.com/tgstation/tgstation/assets/40847847/9015f1fe-8ed2-4724-844d-7d550d35b890)


![image](https://github.com/tgstation/tgstation/assets/40847847/0d99551a-ecc4-4f2b-a397-46c5f26437f7)

Alters pipeguns away from utilizing shotgun/rifle ammunition towards a
bespoke junk round ammo. These shells are crafted similarly to current
improvised shells. This also removes improvised shells as a shotgun ammo
type. (these new shells aren't shotgun shells to begin with, they're
more like rifle bullets)

Crafting junk rounds produces an entirely unknown projectile in the
shell. You won't know what you get until you fire the gun. Almost in
every instance, however, the shot is beneficial towards killing things.
And they all do about the same amount of damage, so there is hopefully
never a round you didn't want to fire in the gun. Fighting someone with
a pipegun is usually predictable for what amount of damage it will do,
but any additional effects it might have is going to be an unknown
factor. They also brutalize borgs, which is a quality that improvised
shells had previously.

Pipeguns operate as they did before, and do roughly 40 damage per shot
with the majority of their ammo types (less than what they do currently
with .310). They only have one shell in the gun at a time, so every time
they're fired, they must be reloaded.

Pipe pistols do roughly 15 damage per shot, but hold more ammo than the
bigger pipegun. However, they're more likely to veer off-course.

There are regal versions of each of these weapons, and each are more
potent respective of their general rarity. Having one is going to be a
lot more noteworthy.

### Minor changes

Some more clothing items can carry pipeguns in their suit storage.

The icemoon hermit spawns with a heroic laser musket rather than a regal
pipegun (partially because it is too difficult for the hermit to get
more ammo for their gun, and also because the regal pipegun is a more
powerful weapon than previously)

## Why It's Good For The Game

It has been a few years since I added the pipegun, and time was never
particularly kind to it. There are alternative weapons now with
interesting mechanics of their own. The ammunition it used has changed
considerably. And it simply didn't ever feel like a 'junk gun' in a way
that was fun. The original mechanics added to give it that feeling were
just not fun to experience and were removed. So the pipegun has been
left as 'a shitty version of X'. Even the regal pipegun was, at the end
of the day, a shittier version of either a shotgun or cargo rifle.

It didn't feel right not having some kind of unique quality to using
these weapons that help them express themselves as unpredictable trash
weapons built inside of maintenance. But I expressly didn't want to make
it 'unpredictable' in a way that felt unfair on the person getting shot
either. So just giving it more damage was right out. As a compromise, I
reduced the overall lethality of the weapons while introducing a gimmick
that will appeal to those wanting to play out the role of a homeless
lunatic with a shitty homemade gun stalking maintenance. A 'chaos gun'
so to speak. Maybe that will appeal to people.

## Changelog
🆑
balance: Reworks pipeguns to use an unpredictable 'junk round'. You
won't know what you're shooting until you fire it.
add: Introduces a pistol version of the pipegun; the pipe pistol. It is
inaccurate and does significantly less damage, but more portable and has
more ammunition in the gun.
image: Updates the visuals of the pipeguns.
balance: Also improves the Regal varieties of these weapons. By a lot.
balance: More articles of clothing can be used to carry pipeguns in suit
storage.
balance: The Icemoon Hermit comes with a Heroic Laser Musket instead of
a Regal Pipegun.
remove: Improvised shells (the shotgun shell) has been replaced with
improvised junk shells (which don't work with shotguns but do work with
pipeguns).
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2024-05-08 22:40:28 +01:00
The Sharkening
0746039df6 Makes the medibeam process only on active use (#83062)
## About The Pull Request

Per title

## Why It's Good For The Game

We can have things process only when they need to process

## Changelog
2024-05-07 05:18:46 +02:00
Mothblocks
bc4e7d3b4e Remove data systems in favor of global datums (#82943) 2024-04-29 22:47:36 -07:00
MrMelbert
39fc255051 Turf weakref persists in changeturf / Fix plasma cutters (#82906)
## About The Pull Request

Turf references don't change so logically, turf weakrefs wouldn't change
if the turf changes.

By not doing this this can cause bugs: See #82886 . (This Fixes #82886) 

(Projectiles hold a list of weakrefs to atoms hit to determine what they
have already hit.

Because turf weakrefs reset, we could "hit" the same turf twice if it
destroyed the turf.

Old behavior - this was fine but now that they're weakrefs, we get two
weakref datums in the list that point to the same ref.)

Less hacky alternative to #82901 . (Closes #82901) 

## Changelog

🆑 Melbert
fix: Plasma cutters work again
/🆑
2024-04-27 18:40:47 -06:00
KingkumaArt
3f9caf5deb Fix: Makes the rebar crossbow's bowstring loosen after firing (#82830)
## About The Pull Request

As it stands, after the rebar crossbow fires, it must be used inhand
twice, once to loosen the bowstring, and a second time with a do_after
to pull it back. Not only does this make no sense as the bowstring is
what launches the projectile, but I actually had no idea it was even
happening, until I got it pointed out on discord.

## Why It's Good For The Game

The main reason is that the crossbow shooting a rod without moving the
bowstring just looks weird, but also given the first inhand use doesn't
have a delay, it also doesn't really serve any purpose.

## Changelog
🆑
fix: The rebar crossbows now properly loosen their bowstring upon
firing.
/🆑
2024-04-25 12:30:50 +01:00
LemonInTheDark
59a20eb8e7 Fixes some rando failures off the ignore list of projectiles (#82855) 2024-04-24 12:05:06 -06:00
Jeremiah
c1a775efe1 Implements data systems (#82816)
## About The Pull Request
Subsystems currently come in two different flavors:
1. Systems that process at intervals with the master controller
2. Global data containers that do not fire

And I think they should be split up...


This moves 4 non firing, non init subsytems -> datasystem

## Why It's Good For The Game
Clarity in code
2024-04-22 21:27:15 -06:00
MrMelbert
a21742ff60 Adds ALLOW_RESTING to a bunch of items (#82761)
## About The Pull Request

Allows you to alt-click a bunch of items while resting. 

Fixes #82788

## Why It's Good For The Game

Some of these, such as storage, are bugfixes. You shouldn't need to be
standing up to configure a spray can, or change the direction of your
bedsheet

Others are just sensible changes. 

## Changelog

🆑 Melbert
fix: You can open bags with alt click while resting again
qol: Many items which previously required you to stand to alt-click now
don't, such as bedsheets and spray cans
/🆑
2024-04-20 21:30:10 -07:00
Jeremiah
31d5b272cc Makes viewers() defines (#82767) 2024-04-20 01:39:50 -06:00
SyncIt21
635b7fa66c Use cell defined constants for various stuff (#82594)
## About The Pull Request
This re writes most cell power usage cases with 2 defines
`STANDARD_CELL_CHARGE`(Joules) & `STANDARD_CELL_RATE`(Watts) so changing
cell capacity values in the future won't cause discrepancies.

## Changelog
🆑
code: most cell power usages are scaled with defined constants to help
adapt to future changes
/🆑
2024-04-18 14:29:21 -07:00
Jeremiah
8e3f635b98 Alt click refactor (#82656)
## About The Pull Request
Rewrites how alt click works. 
Based heavily on #82625. What a cool concept, it flows nicely with
#82533.

Fixes #81242 
(tm bugs fixed)
Fixes #82668

<details><summary>More info for devs</summary>

Handy regex used for alt click s&r:
`AltClick\((.*).*\)(\n\t.*\.\.\(\))?`
`click_alt($1)` (yes I am aware this only copies the first arg. there
are no other args!)

### Obj reskins
No reason for obj reskin to check on every single alt click for every
object. It applies to only a few items.
- Moved to obj/item
- Made into signal
- Added screentips

### Ventcrawling
Every single atmospherics machine checked for ventcrawling capability on
alt click despite only 3 objects needing that functionality. This has
been moved down to those individual items.
</details>

## Why It's Good For The Game
For players: 
- Alt clicking should work more logically, not causing double actions
like eject disk and open item window
- Added context menus for reskinnable items
- Removed adjacency restriction on loot panel

For devs:
- Makes alt click interactions easier to work with, no more click chain
nonsense and redundant guard clauses.
- OOP hell reduced
- Pascal Case reduced
- Glorious snake case

## Changelog
🆑
add: The lootpanel now works at range.
add: Screentips for reskinnable items.
fix: Alt click interactions have been refactored, which may lead to
unintentional changes to gameplay. Report any issues, please.
/🆑
2024-04-16 17:48:03 -06:00