Commit Graph

585 Commits

Author SHA1 Message Date
starrm4nn
5d81ba7bb0 Makes Health Sensor assemblies a bit nicer to use (#83183)
## About The Pull Request
Gives health sensors a UI to change their settings

![sensor-off](https://github.com/tgstation/tgstation/assets/139372157/06eb1756-23ff-4d8a-b305-e847430f6982)

![sensor-on](https://github.com/tgstation/tgstation/assets/139372157/466f21d2-8369-4e04-9197-d606063aa715)

![checking-for-death](https://github.com/tgstation/tgstation/assets/139372157/25d7bc84-246b-4997-9684-e899a6700b5b)


## Why It's Good For The Game

Makes the assemblies less annoying to use

## Changelog
🆑

qol: Gives Health sensor assemblies a UI so its easier to use.

/🆑
2024-05-13 11:09:05 -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
Jeremiah
9723b4b317 Replaces even more deciseconds with SECONDS (#82438)
## About The Pull Request
Using these search regexes:

Ending in 0:
`addtimer\((.*),\s?(\d{1,3})0\b\)`
replacement:
`addtimer($1, $2 SECONDS)`

Two digit ending in odd:
`addtimer\((.*), (\d)([1-9])\)$`
replacement:
`addtimer($1, $2.$3 SECONDS)`

Single digit ending odd:
`addtimer\((.*), ([1-9])\)$`
replacement:
`addtimer($1, 0.$2 SECONDS)`

## Why It's Good For The Game
Code readability

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-06 15:18:49 -06:00
MrMelbert
6331603da3 Infrared Emitters use beam datums (As God intended) (#82094)
## About The Pull Request

Fixes #64459 
Fixes #82052  , probably
Fixes #79747 , probably
Fixes #81443 

Infrared emitters now use beam datums instead of making their own
effects and trying to `Move` it out until it hits something

This means 

1. Infrared emitters are (probably) more responsive
2. Infrared emitters (probably) react to less things they shouldn't
react to (such as projectiles)

This also means

- Infrared emitters (when visible) are emissive (and glow in the dark
slightly). Kinda neat? If you don't want it you can obviously just make
it invisible
- You can limbo under beams? Maybe you can do that already? IDK

Other notes

- Beams no longer set their beam component's `x`, `y` directly, now
using `forceMove`


![image](https://github.com/tgstation/tgstation/assets/51863163/1d516703-1f95-4c8e-a83b-89acaf20e5af)


![image](https://github.com/tgstation/tgstation/assets/51863163/ddb8eb51-f787-4def-82bd-8c2b878327f6)


https://github.com/tgstation/tgstation/assets/51863163/29b76b58-ef36-4c4a-a3b2-017b625389dd

## Changelog

🆑 Melbert
refactor: Infrared emitters now function better (or at least more how
you would expect them) (hopefully). Report any oddities
/🆑
2024-03-19 19:43:29 -06:00
MrMelbert
47dc38fee2 Let's you talk through action figures, plushies, and toy mechs with .l and .r. Also a big clean up of say because its support for non-mobs was lackluster. (#81848) 2024-03-07 09:21:12 -07:00
Higgin
c071a61781 Changes flash Paralyze to Knockdown (#81676)
## About The Pull Request
picking up the dropped rifles of #78515 and #81618 and making only one
small, measurable change that should test the general principles while
making life better if they're proven true:

does what it says on the tin: makes flashes Knockdown rather than
Paralyze

this will be successful if people report more close fights where flashes
were involved and feel better about playing on both sides of
flashing/getting flashed

## Why It's Good For The Game

hardstun rocket-tag combat bad. opportunities for counterplay and combos
good.

Paralyzes
- basically prevent you from doing anything. anything.

Knockdowns
- let you try to deploy your flash protection before the follow-up if
the opponent's just trying to use the flash
- let you try to crawl, juke, and make your opponent's life a little
less simple
- give you an actual choice: do I try to scream HELP immediately after
the flash before I get taken out, or try to use an item, swing back, or
wriggle out?
- still disarm you if you're standing which is pretty cool I think
- still let you stamcrit some goofball crawling at you even if they keep
crawling


doesn't change how mounted flashes or portable flashers work. still 10
and 8s Paralyzes respectively.

not a moth buff because they still can't wear sunglasses to no-sell the
flash entirely ha ha goofy bug

## Changelog

🆑
balance: personal flashes now Knockdown rather than Paralyze direct
targets.
/🆑
2024-03-06 02:58:48 -06:00
jimmyl
d629b5f3f1 pipebomb (#81529)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/70376633/2c2a8ddf-d210-468b-9403-f7de4fa1fd9b)

removes IEDs, these are its replacement


![image](https://github.com/tgstation/tgstation/assets/70376633/95cc67d7-ed41-481b-9b9d-f31897fdb46d)

this recipe produces a finished pipebomb

you can craft pipes (of the atmos kind) with some metal
then you can make it into a pair of halved pipes with a welder
then you stuff in items for extra effect (optional, only works if it
does something)
then you put in welding fuel OR gunpowder (no other options as of now,
gunpowder is a better explosive)
cable finishes that part
after that, you can attach an unsecured assembly to finish the bomb

also this is the math for the explosion, power is decided by fuel

![image](https://github.com/tgstation/tgstation/assets/70376633/95ac3101-a2af-4bdc-9730-6c9c20195b59)

using it in-hand activates the assembly, using it off-hand allows you to
configure the assembly

## Why It's Good For The Game

IEDs suck and stuff and this would be a better upgrade/replacement
because with assemblies you could make a circuit sentient pipebomb or
gift a pipebomb via cargo or something and gimmicks i guess
## Changelog
🆑
add: Pipebombs
del: Improvised Firebombs
/🆑
2024-02-29 20:33:59 +01:00
John Willard
aace5f46f4 You can do more things while floored (#81641)
## About The Pull Request

While on the floor, you can:
- Use the UIs of Atmos machinery (except thermomachine and bluespace gas
vendor), Holopads, Crayons (spray cans too), radios, and Disposal bins
- Close extinguisher cabinets with Right-Click
- Click and drag yourself onto a photocopier to climb onto it.

I also changed all instances of ``ui_status`` to have all the args it's
being passed, I was messing with it a bit but it's gonna be for a later
PR.

## Why It's Good For The Game

It's an extra layer of harmless realism, also nice QoL for people who do
not have functional legs and do not have a wheelchair.

## Changelog

🆑
qol: You can use atmos machines, holopads, crayons, spray cans, and
disposal bins while floored.
fix: You can close extinguisher cabinets while floored.
fix: You can climb onto a photocopier from the floor.
/🆑
2024-02-26 18:34:20 +01:00
LemonInTheDark
70651816c2 Fixes complex lights not handling moving well, renames lighting defines (#81423)
## About The Pull Request

[Fixes static lights not
moving](ffef43c05a)

Worked fine when the owner moved, but if the owner was inside something
else, it would try and trigger an update on the PARENT's lights, which
are obviously not us.

[Renames MOVABLE_LIGHT and STATIC_LIGHT to better describe what they
do](de73a63bd4)

People keep trying to change the lighting system of lamps and it makes
me mad.
I choose OVERLAY_LIGHT and COMPLEX_LIGHT here, I couldn't figure out a
better name for turf matrix lighting. Suggestions welcome

## Why It's Good For The Game

Closes #80005
Hopefully improves understanding of lighting at a glance
## Changelog
🆑
fix: Fixes fancy lights not updating their source location when picked
up and moved
/🆑
2024-02-12 20:50:20 +01:00
John Willard
1389351ef9 You can now move and talk through statues and mannequins (#81188)
## About The Pull Request

I recently played a game where I rotated my skeleton model while
rotating my own character at the same time and it being in sync gave me
the realization on how cool it would be if the Coroner was able to
simply control the skeleton body.

I find skeleton displays very funny and I want to see more funny things
happen with them, so I thought this would be a good place to start, with
the benefits that it also works on mannequins and statues too so they
aren't left out.

Basically, while it is unanchored, if you have a statue/mannequin
grabbed, it will change its direction as you do, and speak the same
words you do. Your own messages can only be heard if the person is
directly next to you, revealing that it was you talking through it all
along.

I was originally gonna add this to the simple rotation component but
moved off when I decided to add talking through it, I left in the code
improvements I made to the component though since it is one of the
oldest components and hasn't been touched in a while.

Video demonstration (before I added the person also talking, just ignore
that missing)

https://github.com/tgstation/tgstation/assets/53777086/27242fc3-9649-418d-95cb-b31619319e97

While fixing the Toilet bong's rotation stuff I noticed a lot of it
wasn't up to proper code standards so I went over it and fixed issues I
had with it. It now doesn't give text saying you found something nasty
to species that still likes mice (like flypeople), and fixed its update
appearance to match the codebase standard set by the introduction of
``update_appearance`` many years ago.

## Why It's Good For The Game

It's a funny small idea I had and got inspired to add, it's a niche
mechanic that I think fits the aesthetic I am going for with Coroner and
also give a funny interaction with the human-like inanimate objects.

## Changelog

🆑
fix: Species that can eat mice don't get disgusted from seeing one in
the toilet bong.
add: Grabbing an unwrenched statue/mannequin/skeleton model will now
move its direction as you move yours, and you can talk through it.
/🆑
2024-02-08 14:19:31 +01:00
jimmyl
43dd32e4d0 health assembly altclick sanity (#81264)
## About The Pull Request

checks can_interact now

## Why It's Good For The Game
bug bad

## Changelog
🆑
fix: you may not toggle health assemblies from any range, even while
crit
/🆑
2024-02-05 12:13:50 -05:00
SapphicOverload
47edd4c3dd Kills off /obj/item/onetankbomb, assembly bombs now handled by the tank itself (#81218) 2024-02-03 03:24:39 -05:00
SyncIt21
926d000d76 Some Processing improvements (#80693)
## About The Pull Request
Got the idea from #80682. A lot of parent procs don't do anything, some
are just formatted in a bad way, and others early return and do no ops,
it's bad in general but this should give us a head start.

Some good overhead saved here
2024-01-01 20:58:34 +01:00
YesterdaysPromise
71a1fee2f1 Explodes device.dmi (#80025)
## About The Pull Request

I woke up today and thought 'what would be easy thing to do today so I
can say I've done something?'. Then I remembered I saw several gangtool
usages the time I split radio up, and I could remedy those. 7 hours
later, device.dmi is split in a folder of its own, and I've also given
unique sprites to door remotes and landing desginators.


## Why It's Good For The Game

The device.dmi was kind of a mess.

## Changelog

🆑
/🆑
2023-12-09 13:31:50 +01:00
san7890
c52d688352 Retools IS_SPINNING_1 into a trait (#80060)
## About The Pull Request

This did NOT need to be on the `/atom` level `flags_1`- when on earth is
an area going to spin? Anyways, this was really only ever used on the
`/mob` sublevel in `spin()` code, but I think this would work far better
as a trait for source-management than moving it to a mob flag or
something. So, let's do that.
## Why It's Good For The Game

Frees up a slot on `flags_1`, which is neat, as well as makes the
framework for managing "things that make you spin" potentially better
for future expansion. It also properly scopes something that only works
for mobs right now to mobs (kinda), so it's a bit better that way too.
## Changelog
Nothing that concerns players.
2023-12-02 21:42:16 -05:00
san7890
7f7688b60a Demotes the "electrical conductivity" flag from flags_1 to obj_flags (#80033)
## About The Pull Request

Code to handle this flag only ever existed on the `/obj` sublevel, so
there's no need for it to be on the `/atom` level `flags_1`. There was
probably a point in time in which mobs or turfs conducted electricity
but there's zero code for it anymore so we truly just live in a society
now.
## Why It's Good For The Game

Frees up a slot on `flags_1` (which is really nice actually), proper
scoping of certain bitflag stuff, etc.
## Changelog
Not relevant to players.

I may have screwed something up, will be doing a few passes on this
myself to ensure all the search and replaces went alright but we should
be good™️
2023-12-01 21:43:46 -05:00
MrMelbert
c1ed62915b Adds UPSIDE_DOWN movetype for negative gravity / makes Atrocinator affected by less things (#79785)
## About The Pull Request

Fixes #79764

I was going to tackle this issue by slamming `TRAIT_NO_SLIP_ALL` on
Atrocinator users and calling it a day, but like, that didn't feel
proper.

So I thought hey, we could just give them the flying movetype, even
though they technically aren't flying it means they're unaffected by
things that flying would make you unaffected by.

Nope, this means the mob technically "negates gravity", so no falling
and no feetsteps.

Let's try floating - this give us feetsteps but no falling upwards. 

So instead of going back to square one, with `TRAIT_NO_SLIP_ALL`, I
decided to go for the more complex route of just adding a movetype.

Hence, move type `UPSIDE_DOWN`. This covers situations where a mob would
be "floating" above the ground, but still walking. ...Negative gravity.

This means overall the Atrociator acts more as you'd expect - you don't
slip on ice, you don't trigger bear traps or mouse traps, you can walk
over railings, unaffected by conveyor belts, etc.

## Why It's Good For The Game

Makes the Atrocinator a lot more consistent with how you'd expect for it
to work.

Admittedly it is a bit niche use of movetypes, but it can possibly be
expanded to more things in the future, who knows? I applied it to mobs
on meat spikes (even though they don't move), just for proof of concept.

## Changelog

🆑 Melbert
fix: Atrocinating mobs will now behave more as you'd expect. Meaning
they don't slip on wet patches, can't trigger bear traps / landmines /
mouse traps, ignore conveyors, and can walk over tables and railings.
fix: Floating mobs are unaffected by conveyor belts, acid (on the
ground), glass tables
fix: Floating mobs won't squish stuff like roaches anymore 
fix: Fixes bear traps triggering on floating / flying mobs 
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-11-20 21:19:13 +00:00
John Willard
b52ce868bc Cuts down on unnecessary non-TGUI stuff (#79590)
## About The Pull Request

Removes INTERACT_MACHINE_SET_MACHINE on machines that don't use a
non-TGUI UI.
Removes set_machine from TGUI things that forgot to remove them
previously.
Decouples advanced camera consoles from UI procs since it doesn't
actually use one.

## Why It's Good For The Game

TGUI machines don't need to be using these procs and vars, and this
makes it more clear what does and doesn't use a TGUI menu from a glance.
I explain it a bit better
[here](https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA) if you're interested.

## Changelog

No player-facing changes.
2023-11-09 15:13:09 -08:00
Zephyr
9ebf319e6a fixes signal circuit not working | refactors name of timer cooldown macros to be inherent, also docs them (#79367)
## About The Pull Request

Title
## Why It's Good For The Game

Less headache in the future for a macro thats not really obvious in what
it does
## Changelog
🆑
fix: signals in circuits now actually function
/🆑
2023-10-31 10:58:48 +00:00
Zephyr
e9448ad37d Updates signaler investigate code | Adds some nice QOL changes for signalers | Enforces cooldown on signaler circuitry (#78974)
## About The Pull Request

See title.
If someone was abusing signalers previously to cause server lag, going
into list signalers would actually cause even worse lag as byond sat
there and processed thousands of items into a string over and over,
which would cause string format operations on longer and longer strings,
resulting in more and more overhead. This is bad.
So instead there is now a limit to the size of the list, currently I
have that set to 500 although I am open to increasing and even reducing
the number.

I have also made signalers slightly more intuitive by having the
cooldown actually displayed in the ui as a tooltip instead of just being
a secret feature you didnt know about unless you code dived. Also made
the cooldown actually respected by things such as circuitry where it
didnt even implement the cooldown and would happily send as many signals
as you had items connected to your proximity circuit.
## Why It's Good For The Game

Admins won't accidentally kill the server by trying to parse a lag
machines signal list. Players lagging the server? No, how about the
admins trying to fix it!

## Changelog

🆑
qol: signalers now tell you their cooldown and also use balloon alerts
/🆑
2023-10-21 20:18:59 +01:00
Emmett Gaines
96d7e9c690 Invisibility refactor (#78908)
This adds a tracker for sources of invisibility and a priority system. I
needed this for another thing so I'm doing this first since it touches a
lot of code. As for the bugs fixed in the changelog, it's only what I
noticed while going through everything and there's likely a few more
things fixed with this. This should be testmerged for a while, I'll
bring this out of draft when it feels safe.

🆑
admin: Invisimin can now be used on mobs that are already invisible,
whether through temporary or permanent effects.
fix: Monkeyize/Humanize mob transformations no longer permanently reveal
invisible mobs if they had effects making them invisible otherwise.
fix: Objects with the undertile element that have been made invisible
through other means are no longer revealed by being uncovered.
/🆑
2023-10-17 13:07:31 -06:00
lessthanthree
7626c3bd6c Tram v6/Transport Subsystem (#78230)
Co-authored-by: Unit0016 <50649185+unit0016@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2023-10-17 10:52:38 -07:00
Bloop
1bfee08d54 Fixes greyscale colors not updating when changing their colors via VV, and fixes some issues with accessories (#77806)
## About The Pull Request

Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/23214

This fixes a few bugs and cleans up code a bit:

1) Greyscale colors that were changed via the VV modify greyscale menu
will now update the mob's worn clothing accordingly. It wasn't doing
this before. Accessories in particular needed a bit of extra work to
update in this way because it wasn't coded with this case in mind.

2) Accessories will call `equipped()` and `dropped()` when they get
added/removed. This will fix issues like item flags being incorrectly
set, action bars not being added, etc.

3) Accessories will now be returned by `get_all_gear()`. This will
probably fix a few issues I'm not aware of.

## Why It's Good For The Game

<details><summary>Works</summary>


![dreamseeker_xijzQB0ALa](https://github.com/tgstation/tgstation/assets/13398309/eccb35d5-e1ea-4e2c-9906-f5b8c2187d24)

</details>

<details><summary>get_all_gear()</summary>


![dreamseeker_WsG0Uu2tIe](https://github.com/tgstation/tgstation/assets/13398309/d5c272d4-1990-454c-b48f-4da7b6a5f859)

</details>

<details><summary>get_equipped_items()</summary>


![dreamseeker_qe4hMngAO3](https://github.com/tgstation/tgstation/assets/13398309/06469b93-2a58-49db-be7f-c748576bf481)

</details>


<details><summary>item_flags get set now, hopefully preventing future
issues related to that</summary>


![image](https://github.com/tgstation/tgstation/assets/13398309/29a0e25a-a88f-4547-99f8-888da6b85e4d)

</details>

## Changelog

🆑
fix: greyscale colors will now update on the mob when modifying them via
the VV menu
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-26 20:47:59 +02:00
John Willard
ef352ca731 minor changes to living and mob vars (#77820)
## About The Pull Request

Renames m_intent to move_intent and moves it to the living level
renames tod to station_timestamp_timeofdeath
removes stun_absorption and see_override as one was unused and the other
was never actually implemented

## Why It's Good For The Game

Many vars on the mob and living level were intended to be on the living
and carbon level, but weren't for one reason or another. Generally it
was out of laziness to ensure the mobs being checked for these vars were
the intended mobs, and there's some todo comments on how they want it
changed in the future, though it never happened.
I'm hoping to get these all down in the future, I originally wanted to
move ``stat`` from mob to living but it had hundreds of errors so I
didn't want to do it all here.

## Changelog

Nothing player-facing.
2023-08-26 02:24:15 +01:00
lessthanthree
037dd1dad1 Immovable rod meets unstoppable tram (#77656)
## About The Pull Request

Adds interaction between immovable rod and the tram for the rare
occasions the rod hits it at the front or back while flying at a
parallel angle.

The rod will push/pull the tram in the direction it's flying until a
short distance past the tram's usual landmark, eventually winning and
carrying on.

- Only applies to random rods, if the rod has a target it will ignore
the tram as usual.
- Looping rod only pushes the tram once.
- As long as the tram has power, can be returned to the rails as usual
by calling it.

## Why It's Good For The Game

When the HoP is having a really unlucky day.


https://github.com/tgstation/tgstation/assets/83487515/2f0393cd-f796-4b00-8674-d97e57358543


https://github.com/tgstation/tgstation/assets/83487515/f74c8497-8d62-4fcf-80a0-da7259160b7f

## Changelog

🆑 LT3
add: Immovable rod will now battle the unstoppable tram should they
cross paths
fix: Birdshot's maint tram doors now work properly
fix: Tramstation's exterior light fixtures no longer get destroyed as
soon as the tram moves
code: Tram landmarks are now all subtyped instead of map varedits
/🆑
2023-08-24 22:20:30 +00:00
Tim
80e0fabf4e Change mousetraps to kill rats instantly (except regal rats) (#77487)
## About The Pull Request
Today I witnessed a minefield of mousetraps against a horde of mice. To
my surprise, they were able to tank multiple mousetraps without dying.
Mousetraps should insta kill any mice (or rats) caught in it otherwise
it defeats the purpose of setting the traps especially when there is a
horde of them. Cat's instakill any mice they touch. This should follow
the same formula. The only exception should be regal rats, which are
already excluded from mousetrap damage code.

## Why It's Good For The Game
When you arm a dozen mousetraps, there should be a dozen dead mice.

## Changelog
🆑
balance: Change mousetraps to kill mice instead of damaging them (except
regal rats)
/🆑
2023-08-11 17:42:52 -04:00
Kubisopplay
b3ac4e1c7d A small pile of borg combat changes (#75819)
## About The Pull Request
This PR rebalances borg combat. It is first part of broader set of
changes that I talked about with armhullen, which was then discussed in
discord player project channel. Ultimately arm decided to rewrite the
complete rebalance and grab combat, but to help with testing, and to
measure reaction to that changes, I wrote this much smaller change, that
should be usable as a TMd test.
Main points that changed:

- Flashing cyborgs for the first time blinds them, and scrambles their
movement. Flashing them while they are blinded immobilizes them as it
used to, but still allows them to talk, and use radio.
- Emping cyborgs still turns them completely off, but the code behind is
_slightly_ changed, because of how utterly incomprehensible cyborg code
is
- Borg stunarm deals 60 stamina damage, costs 200 energy (SUBJECT TO
CHANGE AS SOON AS I DECIDE ON HOW TO), and applies confusion,
stuttering, and jittering.
- Robot consoles used by humans can now lock down only one borg at a
time, they exhibit increased power draw while doing so. The borg is also
informed of the location of the console. If left alone, the borg will
unlock itself in 10 minutes, to avoid leaving it permanently locked down
in some faraway place. If the console gets destroyed (or depowered), the
borg will get unlocked
- laser pointer only blinds borgs, without the paralyze component. If
you flash a borg blinded this way it will paralyze it, so comboing it is
possible.
- Throwing things at borgs slows them down 


Not planned, but possible if testing shows its required:
- Changing borg health to malfunctions
- Whatever people convince me to add
- Portable lockdown solution for sec, or a way for them to do basic
check on borg.
- Usage of bucket/something else to restrict radio usage of cyborg

If you have ideas what would make this change better please use [discord
channel](https://discord.com/channels/326822144233439242/1113145741788065924),
or comments. Almost everything that I wrote here is subject to change,
as requested or suggested.

### DISCLAIMER
I had to change few functions in background of how borgs work. This WILL
have changes I couldn't predict, since some of them aren't linked in any
obvious way in code. I am aware of that, and will try fixing what needs
fixing when pointed out.
PS: Borg code is a nightmare

## Why It's Good For The Game
Borg combat sucks. It is absolutely binary, there is 0 capacity for
talking, because both sides fear losing in one click. Sec can't really
feasibly ask the borg to state laws while flashed, so their only
solution is to kill it and revive it.

- Turning most instastun solutions into less lethal versions should
lessen the pressure, since it reduces the chance that person that reacts
first survives.
- It causes minor reduction in traitor's capacity to emag borgs with
only a flash, but EMPs still hardstun, and they are plentiful both in
uplink, and in ghetto form, so that shouldn't be a problem.
- Since it allows borgs to scream for help while being flashed, it also
increases the potential of AI helping it, or at least noticing its
death.
- Lockdown console changes reduce its capability in completely turning
off malf ai, and leave it still highly capable of being an useful tool
in stopping emagged cyborgs.


## Changelog
🆑
balance: Flashing borgs requires two consecutive flashes to fully
immobilize
balance: Flashed borgs can speak
balance: Remote lockdown on cyborgs lasts 180 seconds
balance: Cyborg stun arm works like normal baton, and costs less energy
/🆑

---------

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-07-26 22:09:19 +01:00
Zephyr
f71ea26f72 Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types (#76822)
## About The Pull Request

Removes all of the duplicate global lists for specific machine types
where the only thing they do is store all machines of that type.
Adds machine tracking to SSmachines in the form of a list for all
machines, and then an associative list for machines by their type.
Previously we have machines in multiple global lists, such as airlocks
being in GLOB.doors, GLOB.airlocks, GLOB.machines.
This makes that not a thing, and also means that iterating through
GLOB.machines looking for a specific type is no longer as expensive.
2023-07-15 16:17:46 -04:00
YesterdaysPromise
fb10121022 Icons folder cleaning wave two (#76788)
## About The Pull Request

Further continous organizing and cleaning the Icons folder. There are
still some minior nitpicks left to do, but I reached my daily sanity
expenses limit again, and the faster these get in the less issues for
both me and others later. Also cleans some mess I caused by my blindness
last PR.

## Why It's Good For The Game

Saner spriters = better sprites
2023-07-14 18:36:41 +00:00
Couls
c0e46fabf7 Standardize Welder Fuel Usage (#76021)
Remove welder fuel usage from all actions except attacking and leaving
it on
most welder tasks require a minimum of 1u of fuel, some longer tasks
require a minimum of 2 or 3u welders now drain 1u every 5 seconds
they're active
## About The Pull Request
Prior to this PR welder fuel usage was random, a lot of tasks didn't use
any welder fuel and welders were basically near infinite so long as you
didn't use them for combat, it took 26 seconds of activity to drain 1u
of fuel, that means an emergency welder alone could run for 5 minutes
straight before needing a refuel

After this PR all welders will drain 1u every 5 seconds instead of every
26 seconds, but welding objects won't require extra fuel anymore, making
the fuel usage much more consistent.

resolves #55018
## Why It's Good For The Game
Actually makes fuel tanks useful and relevant without making it
obnoxious to do repetitive quick tasks like turn rods into plates,
there's actually a reason to upgrade off the emergency welder now since
it lasts 50 seconds rather than 5 minutes
## Changelog
🆑
qol: Welders now have a more consistent fuel usage
/🆑
2023-06-19 23:01:10 -07:00
Penelope Haze
f15a971193 Fixes cases where doors do not bolt correctly (#75882)
## About The Pull Request
Some things, like door control buttons, set locked directly instead of
calling lock() or unlock(). This fixes that, which should make sound
effects play. Also annotates some code where we *don't* want that to
happen with an explanation of why we just set locked directly.

## Why It's Good For The Game
Fixes Skyrat-SS13/Skyrat-tg/issues/21510, which also applies to
upstream.
2023-06-06 17:34:03 -06:00
SyncIt21
191459a86f Hot Stuff(Igniter's & Sparkers) are buildable. (#75722)
## About The Pull Request

**1. Igniter's**
Those things which you see in atmospheric's incineration chamber &
ordanance lab used to ignite gases, they can now be crafted

![Igniter](https://github.com/tgstation/tgstation/assets/110812394/e59bfffb-2717-4d12-891f-0231f7ba5e7f)

  - **Interactions**
     a) attack with hand to turn it on/off
b) use a multitool to change it's ID(how that's useful? keep reading)
     c) use welding tool to deconstruct it

**2. Sparker's**
No they aren't a new thing, you probably woudn't have noticed them but
it's this thing in xenobiology lab for example, and you use the button
to turn it on
![Screenshot
(235)](https://github.com/tgstation/tgstation/assets/110812394/66009c31-9655-45a5-b9c3-017673cda04c)
They function the same as igniter's(i.e. combust gases) except as the
name implies they emit spark's to get the job done

These can now also be made in the autolathe as a wall mount

![Sparker](https://github.com/tgstation/tgstation/assets/110812394/46392fde-0d27-455a-8a32-087f954a6385)
Yup just stick it on a wall and your done

 - **Interactions**
a) use a multitool to change it's ID(how that's useful? keep reading)
     b) use welding tool to deconstruct it

 To turn this on see the last section

**3. Ignition Switch Controller**
These function just like blast door controller's except they can control
only sparker's & igniter's

Also printable in autolathe

![Controller](https://github.com/tgstation/tgstation/assets/110812394/b378f7f1-3059-4865-8645-0c5a9b5c4011)

 - **How it work's(or a reminder if you already know)**
   a) First use multitool on sparker/igniter to set their ID's
b) Use multitool on this controller to set it's ID to be the same as
your sparker/igniter ID. If the igniter, sparker & this controller all
share the same ID you can use this controller to turn all device's
on/off at once
   c) stick it in a button frame & close
   d) use button

Hot Stuff


https://github.com/tgstation/tgstation/assets/110812394/8b59a71e-8992-428e-a629-5c371b5c0c3d

Ok so really what's the actual difference's between an igniter & sparker
1. Igniter's are built on the floor while sparker's are mounted on
wall's
2. Igniter's have `max_integrity = 300` while sparker's have it s normal
`max_integrity = 100` so yeah igniter's are more durable than sparker's
3. Igniter's keep the turf hot continuously as long as it's on so they
take up power continuously, so their operation cost is high whereas
sparker's emit spark's only once and use power only that one time so
they are cheaper to operate

**Why it's good for the game**
Make your own combustion chamber professionally and not in an improvised
way. Honestly I'm tired of seeing people chuck in lit welding tool's/
Zipo lighter's to ignite the gases and we loose those item's so yeah now
we have the tool's to do it the right way

## Changelog
🆑
add: Igniter's can be crafted
add: Spraker's can be printed in the autolathe
add: ignition controller can be printed in the autolathe
/🆑

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-06-07 11:07:02 +12:00
Watermelon914
569d8f5a72 Refactored the TTS subsystem to more properly handle message garbling. Added a volume preference for TTS. (#75559)
TTS subsystem refactor.
---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2023-05-22 13:29:20 +00:00
Jordan Dominion
45f44a4bb3 Fix SHOULD_NOT_SLEEP hit in infra assemblies (#75408)
See #75232 

refreshBeam() is a sleeping proc, dropped gets called on Destroy()
2023-05-14 15:38:55 -04:00
Jordan Dominion
612bc63e76 Fix SHOULD_NOT_SLEEP hit in mass driver activation (#75273)
See #75232
2023-05-09 14:01:39 -06:00
ArcaneMusic
f2fd69a49a Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.

This PR does not change mineral balance. What this does is moves over
every individual cost, both in crafting recipes attached to an object
over to a define based system. We have 3 defines:

`sheet_material_amount=2000` . Stock standard mineral sheet. This being
our central mineral unit, this is used for all costs 2000+.
`half_sheet_material_amount=1000` . Same as above, but using iron rods
as our inbetween for costs of 1000-1999.
`small_material_amount=100` . This hits 1-999. This covers... a
startlingly large amount of the codebase. It's feast or famine out here
in terms of mineral costs as a result, items are either sheets upon
sheets, or some fraction of small mats.

Shout out to riot darts for being the worst material cost in the game. I
will not elaborate.

Regardless, this has no functional change, but it sets the groundwork
for making future changes to material costs much, MUCH easier, and moves
over to a single, standardized set of units to help enforce coding
standards on new items, and will bring up lots of uncomfortable balance
questions down the line.

For now though, this serves as some rough boundaries on how items costs
are related, and will make adjusting these values easier going forward.

Except for foam darts.

I did round up foam darts.

Adjusting mineral balance on the macro scale will be as simple as
changing the aforementioned mineral defines, where the alternative is a
rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam
dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~

Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
2023-05-03 14:44:51 +00:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
MrMelbert
b74311bc60 AOE flash fix (#74556)
## About The Pull Request

Fixes head revolutionaries being able to convert with the AOE mode

Why did AOE flash even have a targeted arg? Dumb

## Changelog

🆑 Melbert
fix: Head revs can no longer convert with the AOE flash mode
/🆑
2023-04-07 12:44:04 -07:00
MrMelbert
00f8bcfe75 Moves revolution code of out of flash code, fixes April Fool conversion forcesay never working in any cirumstances (#74411)
## About The Pull Request

- Signallizes head revolutionary flash conversion code, moving it out of
core flash code.
- Removes "tacticool" flashing from head revs, but they can still
convert from any direction
 
- Fixes April Fools "You son of a bitch! I'm in" force say never
working.
   - Revs are muted on conversion so they couldn't talk.
       - Fixed by only muting revs on non-holidays
   - Cultists are unconscious on conversion so they couldn't talk
       - Fixed by only unconscious-ing cultists on non-holidays
- Brainwash victims are more often than not unconscious / asleep so they
couldn't talk
       - Just left this one. 

- Reduced the chance of them occurring and limits it to April Fools only
- A 1% chance of the force says ocurring means they will happen pretty
much once a week, given multiple rev / cult rounds happen every week and
on average like, 20 people are converted. A little absurd, it's good
that it never worked?

## Why It's Good For The Game

Antag code in core item code is bad

It's funny this meme has existed for like 2, 3 years now? No one's
tested it, it's never worked

## Changelog

🆑 Melbert
refactor: Removes Rev code from core flash code
fix: Getting converted on April Fools now triggers the meme force say as
always intended
del: The meme force say can no longer trigger on any day (it didn't work
before anyways)
/🆑
2023-04-06 08:28:35 +12:00
lessthanthree
4ac4a0a70f Tram signal process/destination improvements (#74072)
## About The Pull Request

- Tram crossing signals now call process() much less often
- Tram crossing signals don't turn amber/red needlessly
- Tram destination landmarks are more generic to accommodate future
maps, like Birdshot
- Renames to_where and from_where, because those vars didn't always
match tram position to/from

## Why It's Good For The Game

Tram works better, uses less processing

## Changelog

🆑 LT3
code: Tram crossing signal/platform logic improvements
/🆑
2023-03-20 01:49:17 +00:00
LemonInTheDark
33d9a0338f Reworks trashbags slightly (#73761)
## About The Pull Request

I'm a bit sad about the state of trashbags. 
They're very clunky to use, so they almost never get touched. S
depressing. Let's try and fix that.

Let's make em fit in the belt slot (again), but as a tradeoff we'll make
it harder to pull one thing from your bag.
We'll give it a say, 1.5 second delay, so you can't quickdraw from em.
If you try and dump them out into something else, we'll throw any
spillover on the ground below you

I'm also doing some general code cleanup here. Making procs more
readable, vars more direct, removing some old legacy stuff.
I've added a remove_single proc to hook into via subtype, which takes a
mob as input. this has required placing extra requirement on some helper
procs, but fortunately it's not something they're unable to meet.

My hope is this will make garbage bags usable without being stupid.

## Why It's Good For The Game

I don't see these get used at all, cause they're a pain to carry around.
They got gimped because people were using them as infinite storage for
shotgun shells and other small items.
I've made using them for this sort of thing hard and slow, so I think we
oughta be fine. If not I'll do some more touching, maybe give the
autodrop a delay.

## Changelog
🆑
balance: The janitor's trashbag now fits on his belt. In exchange,
taking something out of it sends a visible message, and has a delay.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-03-14 16:39:24 -06:00
Tim
a1ada2c9ef Refactor, improve, and rename canUseTopic to be can_perform_action (#73434)
This builds on what #69790 did and improved the code even further.
Notable things:
- `Topic()` is a deprecated proc in our codebase (replaced with
Javascript tgui) so it makes sense to rename `canUseTopic` to
`can_perform_action` which is more straightforward in what it does.
- Positional and named arguments have been converted into a easier to
use `action_bitflag`
- The bitflags adds some new checks you can use like: `NEED_GRAVITY |
NEED_LITERACY | NEED_LIGHT` when you want to perform an action.
- Redundant, duplicate, or dead code has been removed.
- Fixes several runtimes where `canUseTopic` was being called without a
proper target (IV drips, gibber, food processor)
- Better documentation for the proc and bitflags with examples
2023-02-16 20:22:14 -05:00
oranges
439a04ef97 Made prox sensor cooldown apply before pulse effect (#73447)
This prevents it pulsing multiple times before the next activation time
is reached

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-16 16:44:02 -07:00
oranges
3869634972 Made assembly bombs unable to multignite (#73446)
Added stack traces for multignition events

Also moves the tank procs into the tanks file from bomb because I can
and I hate the previous organisation
2023-02-16 16:43:35 -07:00
ArcaneMusic
93379441a4 Minor improvement to blast door construction. (#73038)
## About The Pull Request

This PR does some QOL tweaks to blast doors and their construction.
Namely, adding some balloon alerts to the whole construction process
(adding, removing electronics, adjusting their electronics IDs).

Additionally, adds some extra examine text to an open blast door by
explaining that you can multitool it to adjust the ID, and that it must
match that of the blast electronics to be added to a wall frame.

Adjusts a forcedrop to a `move_to_hands` because it's 2023 and we trust
that users can hold things during a attack_hand proc.

Also adds some description to button frames as well to guide them that
they can install and remove electronics and boards while open.

I'm gonna be real, this needs a LOT more work than this to be up to code
standards, but this was what I could pull off in the 30 minutes before I
need to sleep while away on business, but it's a start nonetheless.

## Why It's Good For The Game

Button frame code is practically ancient, yet it's still widely used to
this day. It needs some real polish more than this, but for now this
will at least make the construction process more intuitive and clear.

Also to that guy who I said I would do this about a month ago I'M SORRY
I'VE BEEN TRAPPED IN THE **_SUPERMAX WAGE CAGE_** I CAN PROVE IT

~~Wait what do you mean you need to make player made blast doors through
the CRAFTING UI WHAT THE FUUUUUUUU~~

## Changelog

🆑
qol: Improves feedback on buttons as well as the blast door electronics
so that installing your very own blast doors is less tedious.
/🆑
2023-02-06 10:49:38 +01:00
lessthanthree
4894878ff6 Tram Mk. IV (#73057)
## About The Pull Request
- After one too many tram malfunctions, Nanotrasen's insurance provider
finally sprung the cash for a new tram. Made with the latest in
lightweight materials, there's more capacity than ever before to shuttle
your crew around the station.


https://user-images.githubusercontent.com/83487515/215639768-3f7fcb84-cfd2-4efe-b578-998197651f13.mp4

- Consolidates all the tram turfs, objs, and structures into respective
.dm files because they were haphazardly spread everywhere.
- Fixes tram doors playing open/close animations when they're already in
the correct state, corrects timing for when they change density.
- Tram now correctly has an operating status and will stop functioning
when power is lost.
- Call buttons no longer dispatch a tram that doesn't have power.
- Fix for emergency exit when tram has no power.
- Running at closing tram doors is a gamble, you may be crushed
- Fixes https://github.com/tgstation/tgstation/issues/73125

## Why It's Good For The Game
Looks nice, more space, tram doors demand a pound of flesh.
## Changelog
🆑 LT3
imageadd: Nanotrasen's insurance provider finally sprung the cash for a
new tram. Made with the latest in lightweight and mostly* non-flammable
materials, travel in comfort and style!
code: All tram components are now organised based on type
code: Tram is now aware if it has power or not
del: Removed movement slowdown running on tram plates
fix: Tram call buttons will not work calling an unpowered tram
fix: Tram doors will no longer cycle open/closed when they're already in
the correct position
fix: Fixed an edge case where running onto the tram you bounce off the
open door as if it was closed
fix: Unpowered tram doors can only be forced into the open position
fix: Westbound travel shows the correct controls animation
add: Tram doors take a chunk of flesh if you run at them last minute
qol: Reduced duration of amber stage on tram crossing signals 
/🆑
2023-02-02 14:21:46 -08:00
Jeremiah
872e64fb05 Adds spaces around logical operators (#72603)
## About The Pull Request
Part of a prior PR that was closed (#72562). This version does not add
the check in CI.
## Why It's Good For The Game
The work is already done, so I figured why not.
## Changelog
N/A Nothing player facing

Co-authored-by: Jeremiah Snow <jlsnow301@pm.me>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-16 16:56:35 -08:00
MrMelbert
c3a1f21c1a Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind (#72267)
## About The Pull Request

- Nearsighted is now a grouped status effect.
- Blindness is now a grouped status effect.
   - Eye handling of blindness has improved. 
- When eyes are removed, they now cause you to become blind, rather than
handling it in `update_tint`.
- Being ahealed no longer blinds you for one tick, meaning that black
overlay on aheal is gone.
- Temporary Blindness is now a status effect.
- Both Nearsightedness and Blindness have been exorcised from mob vars
and life chains. This means that we've finally cut 2 procs from life,
`handle_status_effect` and `handle_traits`, and moved both to event
based processing. Wooo optimizations.
- Swapped pacifism status effect to use apply and set helpers. 
- Removed an unused admin toggle that disabled welding helmet tint but
also tint from every clothing item and also blindness from losing your
eyes.
- Clothes now generally all blind their mob more consistently.
- Oculine, eye surgery, and sensory restoration are now no longer the
only way to fix blindness from eye damage. If your eyes are healed
through any other means, it will also heal your blindness.
- Some things that made you blind, such as ling blind sting, no longer
just flat made you blind from eye damage forever. They now cause eye
damage directly, which in turn makes you blind from eye damage, as
expected.
- Pacifists can't eyestab anymore. Eyestabs now have a limit on the
amount of blur applied.
- Refactored some `is_x_covered` procs to accept flags rather than have
a lot of arguments for some silly reason.
- Unit tests for blindness. 

## Why It's Good For The Game

Blindness was exceptionally poorly handled prior, primarily due to the
fact that it was tied to the mob instead of separated out

On top of that the system put a LOT of faith in proper handling of
blindness on the coder's end which was misplaced evidently. Many places
didn't update or handle blindness correctly, or just let people
perma-blind.

Deferring it to a status effect improves this a lot

## Changelog

🆑 Melbert
refactor: Refactored blindness and nearsightedness. Important to note is
that all mobs are naturally blind until their eyes are actually created.
refactor: Refactored "is covered" procs
fix: Less sources of blindness now cause permanent blindness. Includes
the "Blind" Spell and "Blind Sting" from changelings.
admin: Ahealing someone no longer flashes the blind overlay for 1 tick.
admin: I removed an unused (sort of) inaccessible admin verb that
allowed you to toggle the tint from all welding helmets (and clothing)
(and lack of eyes) in existence, let me know if you want similar back
balance: Changeling "Blind Sting" now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Visionloss virus symptom now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Oculine has been reworked slightly. Prior, Oculine arbitrarily
healed blindness and nearsightedness from eye damage reagrdless of how
damaged the eyes were, and applied blur on success. Now, Oculine just
heals eye damage, and blindness / nearsightedness is restored in the
process. There is now a probability every tick that eye blur is applied
based on how pure the oculine is while healing very damaged eyes.
balance: Pacifists can no longer eyestab.
balance: Any clothing item that covers your eyes contributes to getting
the bonus while sleeping, and to removing temporary blindness faster
/🆑
2023-01-15 23:01:40 -08:00
Mothblocks
e9351f6ae0 Add lints for idiomatic balloon alert usage (#72280)
Adds lints for `balloon_alert(span_xxx(...))` (which is always wrong),
and balloon alert where the first letter is a capital (which is usually
wrong). Fixes everything that failed them. As a reminder, abbreviations
like "AI" and "GPS" shouldn't be capitalized in a balloon alert.

In cases where this is intentional for flavor (there was one case), you
can `UNLINT` like so:

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2022-12-29 19:01:45 +00:00
MrMelbert
0d4b56435b Converts drowsy and eye blur to status effects, striking yet another two carbon level status vars (#71950)
## About The Pull Request

You know the deal by now.

- Drowsiness is now tracked via status effect.
- Eye blue is now tracked via status effect.

In converting these over, cleaned up a bit of code relating to some
other effects. Attempts to unify behavior between some of them, namely
certain biotypes or mob types shouldn't be experiencing certain effects.

## Why It's Good For The Game

More stuff moved to status effects, slightly more cleaner and better to
work with code. Allows for all mobs that can sleep to be able to get
drowsy, too.

## Changelog

🆑 Melbert
refactor: Drowsiness and Blurred Eyes are now tracked via status effect.
/🆑
2022-12-26 19:58:21 +01:00