Commit Graph

2239 Commits

Author SHA1 Message Date
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
MrMelbert
11843651f5 Allows status effects with alerts to display their duration (on the alert), adds it to a select handful (#83211)
## About The Pull Request

Plainly: Expands the status effect API so their alerts can showcase
duration remaining.


https://github.com/tgstation/tgstation/assets/51863163/02eaad84-ebb7-4af9-9895-977c6e71acc4

## Why It's Good For The Game

I figure there are some status effects out there which really want the
player to know how long the duration is.

And right now, for 95% of them, you have to code dive to find out. This
is rather punishing for players who... don't code dive.

At the same time, there are effects which *do* tell you how long they
last, which leaves it up to the player to intuit when it'll run out.
This can get a bit silly during lag, and again, punishes new players.

That's not to say I think every status effect should report how much
duration is left: **For very common effects, like sleeping, it should be
left up to the player to guess.** Otherwise we lose a lot of paranoia
and feeling of helplessness. (Also keep in mind this only applies to
status effects with alerts associated.)

Hence why I only added it, largely, to the more "gamified" buffs and
debuffs - Things from (generally) one or two sources and with a static
duration, (or things which already informed the player how long they
last).

Notable ones include Fleshmend, Convulsing (from emag defib), Regen
core.

## Changelog

🆑 Melbert
qol: Some alerts, such as Fleshmend's, show their remaining duration on
their icon.
/🆑
2024-05-14 08:36:23 +02:00
Pickle-Coding
df05285390 The labour camp shuttle paroles the user when they complete their points. The station return message specifies which prisoner returned. (#83132)
## About The Pull Request
The labour camp shuttle paroles the user when they complete their
points. The station return message specifies which prisoner returned.
## Why It's Good For The Game
People shouldn't be looking like fugitives after completing their work.
## Changelog
🆑
qol: The labor camp shuttle properly sets people to parole after they
complete their work.
qol: The labor camp shuttle specifies which person returned to the
station.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-05-08 19:27:19 -06:00
Xander3359
e54ecf4b10 Fix crafting bypassing checks (#82833)
## About The Pull Request
Backport from
https://github.com/tgstation/TerraGov-Marine-Corps/pull/15701
Fixes crafting bypassing checks.
## Why It's Good For The Game
Closes https://github.com/tgstation/tgstation/issues/82826
## Changelog
🆑
fix: You can no longer bypass construction restrictions via the crafting
menu
/🆑
2024-05-03 09:35:51 +02:00
san7890
5f44545da8 Moves "sprite accessories" (e.g. Hair, Undergarments, Mutant Bits) from GLOB to a datasystem (#82847)
This is just a revitalization of #80275.

## About The Pull Request

On the tin, basically demotes everything related to setting up and
storing these bulky lists generated from reading
`/datum/sprite_accessory` subtypes from living in a global space that
will instead be in a compartmentalized subsystem for accesses. Also a
lot of code modernization and micro-improvements (unquantifiable)

## Why It's Good For The Game

Same exact expected results, just accessed in a different way.


![image](https://github.com/tgstation/tgstation/assets/34697715/14627773-c9fb-45bd-8ce0-dee33cdd1d27)

There's a few reasons why I want this to happen.
* The `GLOB` space is too clogged. There are at least a thousand
variables on `GLOB`, and it's extremely painful to access stuff on
production/local through view variables when you're debugging stuff like
this. It's also painful when there is stuff that _should_ live on `GLOB`
that you might want to see in VV/Debugger but are forced to either have
to scroll a mile to find what you want or wait a long while for it to
load. The less bulky lists we have of stored initialized datums, the
better.

* `make_datum_reference_lists()` is a consequence of wack stuff like
this where we're reliant on certain things being initialized in the
`GLOB` portion of world initialization _before_ subsystems/static
variables load - most of these datum lists in the aforementioned proc
doesn't _really_ need to be ready to go before `world.New()` for
example. We'll sadly have to abuse `PreInit()` for now, but it really is
something that has to be ready to go due the critical dependence that
stuff like Preferences has on it.

* We don't have to have the procs live in a global namespace either.
Instead of passing in `GLOB.XList` or `DSstorage.XList` every single
time, we can instead just move the proc setup on the subsystem and use
`XList` in a more native fashion.

* It's easier to find what you need. To me, it's a lot nicer to
ctrl+click the DS and go to the variables to find something I'm looking
for instead of having to scavenge around for any footprint/trace of the
global I want to look for. This is more trivial than the other two, but
that's something I like to think about when I go to bed.

I also had to refactor a bit of the code to accommodate the limitations
of the new DS system, but it should be a lot cleaner anyways.

## Changelog

Not relevant

---

Also nothing should have broken but it's a good thing we have screenshot
unit tests to prove me wrong.
2024-05-02 01:14:18 +02:00
Mothblocks
bc4e7d3b4e Remove data systems in favor of global datums (#82943) 2024-04-29 22:47:36 -07:00
Fikou
2e11db2344 [NO GBP] fixes issues with human rendering fixes (#82852)
## About The Pull Request
fixes #82838, forgot to add the attack_self there
fixes #82869
fixes the atmos hardhat not using flags_inv and transparent_protection
correctly (you could pull off someones glasses through it for example
makes modsuits use the new rendering stuff
fixes rendering stuff not working correctly with adjustable clothing
fixes quick equip dropping the item if you cant equip it

## Why It's Good For The Game
waow its awesome

## Changelog
🆑
fix: you can no longer take off someones glasses or mask through atmos
hardhat
fix: once you adjust a welding helmet or something it no longer makes
your cigarette or sunglasses invisible
fix: welding gas mask works once again
fix: quick equips dont drop the item if you cant equip it
/🆑
2024-04-24 12:59:58 -07: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
Jacquerel
98153ad983 Adds an achievement for pushing a boulder up a hill (#82813)
## About The Pull Request

Credit to Melbert for this idea.
Adds a new achievement awarded for carrying a boulder from Lavaland to
the Centcom Rescue Wing (via the Escape Shuttle).
If the boulder ever leaves your hands you will not gain the achievement.
If the boulder is not outside on Lavaland when you pick it up you will
not gain the achievement.
If you arrive at the Rescue Ship (via pod) you will not gain the
achievement.
If you drop the boulder 
If the shuttle is hijacked and you do not arrive at Centcom you will not
gain the achievement (perhaps try hitting the hijacker with the boulder
you are not allowed to drop?).
If you arrive at Centcom via the Escape Shuttle but fail to exit the
shuttle holding the boulder (for instance, because a max cap bomb is
detonated next to you one second after the shuttle arrives) you will not
gain the achievement.

As the achievement is rewarded after the round-end report is generated,
you also will not be represented on the round-end report. This is a
personal struggle.

Also carrying a boulder slows you down. Dragging it already did, so I'm
not sure why carrying one did not. It feels like an oversight, and just
makes sense.
People rarely have any particular need to manually carry them anywhere
so this should be fine, right? 🙂

## Why It's Good For The Game

Making players do pointless and weird bullshit is the reason to have an
achievement system.
It's a social experiment.
I think that it is funny.

## Changelog

🆑 Jacquerel and Melbert
add: A new achievement for moving a boulder from one place to another,
at great effort.
balance: Hauling a boulder around makes you move slower, as it does when
dragging it.
/🆑
2024-04-22 21:24:14 -06:00
Fikou
7847efd270 [READY] the unfuckening of clothing rendering (#79784)
## About The Pull Request
refactors clothing visors to use the same system, including masks being
toggled and stuff like riot helmets toggling using the same system and
welding helmets and such
adds a handler that updates all visuals in slots that an item has
obscured, each visual proc calls that so you no longer have weird shit
happening like having to hardcode a proc for heads where you need to
also update hair, mask, glasses everytime you put on an item

one thing here i could also do is make check_obscured_slots return the
HIDEX flags instead of item slots, because in 99% of cases its hardcoded
to be ran against specific slots (like eye code running it against the
glasses slot), but maintainers didnt seem to like that :/

## Why It's Good For The Game
fuck this 2003 bullshit

## Changelog
theres like several bugs here i fixed but i forgot them all and they are
small
2024-04-21 17:08:03 -07:00
Iajret
d3662137f8 Arcmining QoL: GPS component to scanned vents and vent(pin)pointer (#82724)
## About The Pull Request
Scanning ore vents will now tag them on GPS so you can find them easily
when you are prepared (and remove them when they are tapped). Also adds
special pinpointer to help with finding unscanned vents in a first
place. And adds missing uranium overlays for scanned vents. Because why
not.
<details>


![image](https://github.com/tgstation/tgstation/assets/8430839/d13df20f-79c0-46a7-a602-81c630309a2d)


![image](https://github.com/tgstation/tgstation/assets/8430839/72690bec-dffd-41a8-8a5e-1ceb7ae182d0)
</details>

## Why It's Good For The Game
While looking at mineral density to find vents is somewhat fun and
entertaining, having some sort of upgrade to make finding them easier
adds a bit of a progression. Also re-finding already scanned vents can
be a bit annoying. You need to fill your backpacks with GPSs and tag
them manually. It is also inconsistent with geysers that are added to
positioning after you scan them. And with tendrils, which are always
visible.
## Changelog
🆑
add: added ventpointer that points toward nearby ore vents and can be
bought with mining points
balance: scanned ore vents can now be found with GPS
fix: fixed ore vents missing overlay icon for uranium
/🆑
2024-04-21 12:49:54 -04:00
Jacquerel
6596d75edc Gulag Adjustments Two (#82561)
## About The Pull Request

I have received feedback that after the prior changes in #81971, the
gulag is still a little bit too subject to RNG.
The main culprit (as in my previous PR) is Iron being kind of cheap and
the fact that unlike the old Gulag you no longer have any way of
headhunting more valuable materials (everything appears as boulders on
your ore scanner).

My solution to this is wider than the last one of tweaking point values,
but also much simpler:
Just make every boulder you mine be worth the same amount of points
regardless of what is inside of it.

On the average test I made I could comfortably mine about 40-45 boulders
in ten minutes.
We'll make some adjustments to that rather than leaving 40 as the target
number;
Most players upon being teleported to the gulag are going to spend a few
minutes whining and bemoaning their fate instead of getting straight to
work. I had the benefit of being able to make sure my run started as
soon as a storm ended so I wouldn't need any kind of midpoint break. I
was also always the only person playing on my local instance, there
hadn't been any other pesky prisoners before me who had already mined
out all the nearest available deposits. And of course, let us not
forget, I am an MLG master league ss13 player who was surely performing
well above average.

So we'll round that down to: Each boulder is worth 33 points, meaning
you need to collect 31 boulders to complete a 1000 point (roughly ten
minute) sentence.

How do I ensure that every boulder is worth the same amount of points?
Well it's pretty easy.
One boulder = one material sheet. One material sheet = 33 points.
Simple.

"Now Jacquerel", I hear you not saying because you don't want me to know
about this thing you would prefer to do instead of hitting rocks
outside; "if I simply smash all of the tables and microwaves and botany
trays and bed in the gulag I can easily get like 65 sheets of Iron,
which is almost enough to buy the freedom for two entire people!"
Unfortunately I knew you were going to try and do that and the prisoner
point machine will only give you points for material sheets which have
been printed from the material smelter (well, any material smelter
actually but you should probably use the one in the gulag). You'll be
able to tell because if you examine a valid material sheet it will
mention a little maker's mark on it, which is absent in the beat-up iron
that you get from smashing furniture to bits.

Also glass is worth 0 points. Don't waste time digging up that shit. 

As glass has had all of its point value removed, I have added a "work
pit" to the gulag to compensate. You can pull boulders out of this
indefinitely via effort, however it also stamcrits you every time.
It's not very fun to do this, but that's because I would prefer you to
go find the rocks out in the field instead. This is a last resort.
You can do this if there's no boulders left to mine or if you really
really really hate mining and would rather very slowly click on one tile
repeatedly to get your boulders instead.
As a tiny bonus doing this gives workout experience.

This isn't a totally ideal solution but I think it'll do for now.

## Why It's Good For The Game

What we want out of the gulag is:
- Something where officers can vaguely approximate an expected sentence
duration.
- A task that requires players to actually be spending that time doing
something to get out of here.
- Produces at least some amount of useful materials.

In I think roughly that order.
I hope this change accomplishes all three of these in a way that is
somewhat predictable rather than throwing darts at a board.

## Changelog

🆑
balance: Gulag mining has been rebalanced so that every boulder is worth
the same amount of points to mine for a prisoner regardless of what it
contains, and should be more consistent.
add: A vent which boulders can be hauled out of by hand has been added
to the gulag which you can use if there's nothing left to mine. It is
very slow, but at least it gives you a workout...
/🆑
2024-04-18 17:05:06 +02:00
MrMelbert
d280c9ccce Makes it EVEN EASIER to work with atom item interactions ft. "Leaf and Branch" & "Death to Chains" (#82625) 2024-04-18 05:17:39 -07:00
Ben10Omintrix
79fda592f7 grappling gun (#82209)
## About The Pull Request
adds a new weapon to mining, the grapple gun. this weapon is a new fun
way to traverse lavaland, it lets u grapple onto things and ziplines u
towards them.


https://github.com/tgstation/tgstation/assets/138636438/5e935776-1482-4994-bcc7-e1ca7fcf33dc

while its less practical than things like the spinning mining modsuit
module, or xenobio wings, its still very fun to use.
u can also use this as a weapon against mobs! (like batman) 

the zipline will launch u towards the mob, doing some damage to them and
launching them back


https://github.com/tgstation/tgstation/assets/138636438/3bf77fe5-4ed1-4153-8673-a0786ecee98f

## Why It's Good For The Game
adds a new fun harmless way to travel through mining biomes 

## Changelog
🆑
add: miners can now purchase grapple guns
/🆑
2024-04-16 23:41:19 -06: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
Jacquerel
4019835b3e Living Limb fixes (feat: Basic mobs attack random body zones again) (#82556)
## About The Pull Request

Reworks Living Limb code to fix a bunch of runtimes and issues I saw
while testing Bioscrambler.
Specifically, the contained mobs are now initialised via element
following attachment so that signal registration can occur at the
correct time. This allows limbs to function correctly when added from
nullspace via admin panel or bioscrambler.

Secondarily (and more wide-ranging) at some point (probably #79563) we
inadvertently made basic mobs only attack the target's chest instead of
spreading damage.
This is problematic for Living Flesh which can only attach itself to
damaged limbs but was left unable to attack damaged limbs.

I've fixed this in a way which is maybe stupid: adding an element which
randomises attack zone pre-attack.
Living limbs also limit this to _only_ limbs (although it will fall back
to chest if you have no limbs at all).
This is _technically_ still different, the previous behaviour used
`adjustBruteLoss` and `adjustFireLoss` and would spread the damage
across your entire body, but there isn't a route to that via the new
interface and this seems close enough.

## Changelog

🆑
fix: Living Limbs created by Bioscrambler will be alive.
fix: Living Limbs can once more attach themselves to your body.
balance: Living Limbs will prioritise attacking your limbs.
fix: Basic Mobs will once again spread their damage across body zones
instead of only attacking your chest.
/🆑
2024-04-13 15:30:14 -06:00
SyncIt21
227cdd2c7c [NO GBP] Patches & renaming for NO_DECONSTRUCTION flag (#82547)
## About The Pull Request

1. Renames `NO_DECONSTRUCTION` -> `NO_DEBRIS_AFTER_DECONSTRUCTION`. As
the name suggests when the object is deconstructed it won't drop any
items/debris. After my last refactor for this flag it now serves a new
purpose so its name has been changed to match that

2. Fixes objects that are now using `NO_DECONSTRUCTION` incorrectly.
Some of these changes include
- Removing the flag in objects where there are no means to deconstruct
them (e.g. jukebox, hydroponics soil, flora etc)
- Replacing the flags old purpose by overriding its tool procs so that
it regains its old behaviour(e.g. You once again cannot deconstruct ctf
reinforced tables, survival pods, indestructible windows etc)

## Changelog
🆑
code: renamed `NO_DECONSTRUCTION` to `NO_DEBRIS_AFTER_DECONSTRUCTION` so
its name matches its intended purpose
fix: fixes some items that incorrectly used `NO_DECONSTRUCTION` prior to
its refactor, meaning makes some objects non deconstructable again
/🆑
2024-04-10 18:58:11 -07:00
san7890
c403a6eccc Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request

Fixes #82440

This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not
lost on me) to wrap around all calls of `lowertext()` and ensure that
whatever we input into that proc will be stringified using the `"[]"`
(or `tostring()` for the nerds) operator. very simple.

I also added a linter to enforce this (and prevent all forms of
regression) because I think that machines should do the menial work and
we shouldn't expect maintainers to remember this, let me know if you
disagree. if there is a time when it should be opted out for some
reason, the linter does respect it if you wrap your input with the
`UNLINT()` function.
2024-04-10 12:19:43 -07:00
John Willard
430896b5cf Blueprints tgui (#82565)
## About The Pull Request

Blueprints now use a TGUI panel instead of the old HTML one.
Also did general code improvement and maintaining to blueprints in
general and also destroyed the ``areaeditor`` level, repathing it to
just 'blueprints'.
Also adds a sound when you look at structural data cause why not

Video demonstration:

https://github.com/tgstation/tgstation/assets/53777086/861773fd-3d57-472d-bc94-d67b0d4f1dbd

The 4 blueprint types:

![image](https://github.com/tgstation/tgstation/assets/53777086/bfd68eb5-c430-4608-a3f7-d6ac86727882)

## Why It's Good For The Game

Another HTML menu dead underground.
This is more responsive and doesn't require constant updating to see
which area you're in, feels less OOC (instead of saying "the blueprints
say", just say it, you ARE the blueprints).

Like, come on

![image](https://github.com/tgstation/tgstation/assets/53777086/fcf1b8b6-37c3-4c94-969f-3b121c983dc0)

Look at all this wasted space

![image](https://github.com/tgstation/tgstation/assets/53777086/1d3e61cd-bc56-4280-a3bb-0c66604e75b3)

## Changelog

🆑
refactor: Blueprints now use TGUI.
qol: Blueprints can now be used while lying down.
/🆑
2024-04-10 11:55:29 -07:00
NeonNik2245
931d1f7286 Adds anosmia quirk (#82206)
## About The Pull Request

Adds anosmia quirk. Anosmia, also known as smell blindness, is the loss
of the ability to detect one or more smells.

I tried to find all smells action and (most likely) update all of them,
unfortunately I can't change descriptions for this quirk.

## Why It's Good For The Game

Some characters will be able to not feel smells
That affect:
* Gases feelings and alerts (CO2, Plasma, miasm) - you don't feel them
* Bakery and cooking
* Changeling ability to feel other changelings by smell
* Some unimportant spans
2024-04-09 03:21:51 -05:00
John Willard
fa31403353 LateInitialize is not allowed to call parent anymore (#82540)
## About The Pull Request

I've seen a few cases in the past where LateInitialize is done cause of
the init return value being set to do so for no real reason, I thought I
should try to avoid that by ensuring LateInitialize isn't ever called
without overriding.

This fixes a ton of machine's LateInitialize not calling parent
(mechpad, door buttons, message monitor, a lot of tram machines,
abductor console, holodeck computer & disposal bin), avoiding having to
set itself up to be connected to power. If they were intended to not
connect to power, they should be using ``NO_POWER_USE`` instead.

Also removes a ton of returns to LateInit when it's already getting it
from parent regardless (many cases of that in machine code).

## Why It's Good For The Game

I think this is better for coding standard reasons as well as just
making sure we're not calling this proc on things that does absolutely
nothing with them. A machine not using power can be seen evidently not
using power with ``NO_POWER_USE``, not so much if it's LateInitialize
not calling parent.

## Changelog

🆑
fix: Mech pads, door buttons, message monitors, tram machines, abductor
consoles & holodeck computers now use power.
/🆑
2024-04-08 22:15:07 -06:00
MrMelbert
0dc6b71a87 Change setting item weight class to a setter to patch some weight class related shenanigans (#82494)
## About The Pull Request

Fixes #81052 
Fixes #58008

Setting weight class of items is now done via `update_weight_class`.

I updated as many occurrences of manually setting `w_class` as I could
find but I may have missed some. Let me know if you know of any I
missed.

This is done to allow datums to react to an item having its weight class
changed.

Humans and atom storage are two such datums which now react to having an
item in its contents change weight class, to allow it to expel items
that grow to a weight class beyond what is normally allowed.

## Changelog

🆑 Melbert
fix: You can't fit items which are normally too large for a storage by
fitting it in the storage when it is small, then growing it to a larger
size.
/🆑
2024-04-08 19:01:30 -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
Jeremiah
1443ef79d3 Replaces a number of deciseconds into SECONDS (#82436)
## About The Pull Request
Using these search regexes:

Number ending in 0:
`do_after\((\w+), (\d+)0,`
Replace:
`do_after($1, $2 SECONDS,`

Single digit number:
`do_after\((\w+), [1-9],`
replace:
`do_after($1, 0.$2 SECONDS,`

Double:
`do_after\((\w+), (\d)([1-9]),`
Replace:
`do_after($1, $2.$3 SECONDS,`

## Why It's Good For The Game
Code readability
2024-04-04 18:56:08 -06:00
SyncIt21
6dc40ca522 Standardizes object deconstruction throughout the codebase. (#82280)
## About The Pull Request
When it comes to deconstructing an object we have `proc/deconstruct()` &
`NO_DECONSTRUCT`

Lets talk about the flag first. 

**Problems with `NO_DECONSTRUCTION`**
I know what the comment says on what it should do

b5593bc693/code/__DEFINES/obj_flags.dm (L18)

But everywhere people have decided to give their own meaning/definition
to this flag. Here are some examples on how this flag is used

**1. Make the object just disappear(not drop anything) when
deconstructed**
This is by far the largest use case everywhere. If an object is
deconstructed(either via tools or smashed apart) then if it has this
flag it should not drop any of its contents but just disappear. You have
seen this code pattern used everywhere

b5593bc693/code/game/machinery/constructable_frame.dm (L26-L31)

This behaviour is then leveraged by 2 important components.

When an object is frozen, if it is deconstructed it should just
disappear without leaving any traces behind

b5593bc693/code/datums/elements/frozen.dm (L66-L67)

By hologram objects. Obviously if you destroy an hologram nothing real
should drop out

b5593bc693/code/modules/holodeck/computer.dm (L301-L304)

And there are other use cases as well but we won't go into them as they
aren't as significant as these.

**2. To stop an object from being wrenched ??**
Yeah this one is weird. Like why? I understand in some instances (chair,
table, rack etc) a wrench can be used to deconstruct a object so using
the flag there to stop it from happening makes sense but why can't we
even anchor an object just because of this flag?

b5593bc693/code/game/objects/objs.dm (L368-L369)
This is one of those instances where somebody just decided this
behaviour for their own convenience just like the above example with no
explanation as to why

**3. To stop using tools to deconstruct the object** 
This was the original intent of the flag but it is enforced in few
places far & between. One example is when deconstructing the a machine
via crowbar.

b5593bc693/code/game/machinery/_machinery.dm (L811)

But machines are a special dual use case for this flag. Because if you
look at its deconstruct proc the flag also prevents the machine from
spawning a frame.

b5593bc693/code/game/machinery/_machinery.dm (L820-L822)

How can 1 flag serve 2 purposes within the same type?

**4. Simply forget to check for this flag altogether**
Yup if you find this flag not doing its job for some objects don't be
surprised. People & sometimes even maintainers just forget that it even
exists

b5593bc693/code/game/objects/items/piggy_bank.dm (L66-L67)

**Solution**
These are the main examples i found. As you can see the same flag can
perform 2 different functions within the same type and do something else
in a different object & in some instances don't even work cause people
just forget, etc.

In order to bring consistency to this flag we need to move it to the
atom level where it means the same thing everywhere. Where in the atom
you may ask? .Well, I'll just post what MrMelbert said in
https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862

> ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION
handling as it wants,

Yup that's the ideal case now. This flag is checked directly in
`deconstruct()`. Now like i said we want to give a universal definition
to this flag and as you have seen from my examples it is used in 3 cases
1) Make an object disappear(doesn't dropping anything) when
deconstructed
2) Stop it from being wrenched
3) Stop it from being deconstructed via tools

We can't enforce points 2 & 3 inside `deconstruct()` which leaves us
with only case 1) i.e. make the object disappear. And that's what i have
done. Therefore after more than a decade or since this flag got
introduced `NO_DECONSTRUCT` now has a new definition as of 2024

_"Make an object disappear(don't dropping anything) when deconstructed
either via tools or forcefully smashed apart"_

Now i very well understand this will open up bugs in places where cases
2 & 3 are required but its worth it. In fact they could even be qol
changes for all we know so who knows it might even benefit us but for
now we need to give a universal definition to this flag to bring some
consistency & that's what this PR does.

**Problem with deconstruct()**
This proc actually sends out a signal which is currently used by the
material container but could be used by other objects later on.

3e84c3e6da/code/game/objects/obj_defense.dm (L160)

So objects that override this proc should call its parent. Sadly that
isn't the case in many instances like such

3e84c3e6da/code/game/machinery/deployable.dm (L20-L23)

Instead of `return ..()` which would delete the object & send the signal
it deletes the object directly thus the signal never gets sent.

**Solution**
Make this proc non overridable. For objects to add their own custom
deconstruction behaviour a new proc has been introduced
`atom_deconstruct()` Subtypes should now override this proc to handle
object deconstruction.

If objects have certain important stuff inside them (like mobs in
machines for example) they want to drop by handling `NO_DECONSTRUCT`
flag in a more carefully customized way they can do this by overriding
`handle_deconstruct()` which by default delegates to
`atom_deconstruct()` if the `NO_DECONSTRUCT` flag is absent. This proc
will allow you to handle the flag in a more customized way if you ever
need to.

## Why It's Good For The Game
1) I'm goanna post the full comment from MrMelbert
https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862

> ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION
handling as it wants, but there's a shocking lack of consistency around
NO_DECONSTRUCTION, where some objects treat it as "allow deconstruction,
but make it drop no parts" and others simply "disallow deconstruction at
all"

This PR now makes `NO_DECONSTRUCTION` handled by `deconstruct()` & gives
this flag the consistency it deserves. Not to mention as shown in case 4
there are objects that simply forgot to check for this flag. Now it
applies for those missing instances as well.

2) No more copying pasting the most overused code pattern in this code
base history `if(obj_flags & NO_DECONSTRUCTION)`. Just makes code
cleaner everywhere

3) All objects now send the `COMSIG_OBJ_DECONSTRUCT` signal on object
deconstruction which is now available for use should you need it

## Changelog
🆑
refactor: refactors how objects are deconstructed in relation to the
`NO_DECONSTRUCTION` flag. Certain objects & machinery may display
different tool interactions & behaviours when destroyed/deconstructed.
Report these changes if you feel like they are bugs
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-04-04 18:55:51 -06:00
necromanceranne
191b5b3df1 Eye of God Update: Loads of QoL, and makes it somewhat more useful to have permanently grafted to your face. (#82053)
## About The Pull Request

The eye of god now protects from the madness inducing effects of
supermatter crystals and singularities. This trait is shared by the
meson night vision goggles (which this is a better version of)

The Scan ability has been refactored into a pointed spell.

The Scan ability has a lower cooldown of 35 seconds.

Scan now gives an advanced health scan readout of the target.

Scanning someone alerts the target as to who is responsible, rather than
being completely silent as to the culprit (much to the annoyance of
anyone who is victimized by someone using this on them)

The status effect that was called Stagger (not Staggered, which is
separate) is now called Rebuked.

Rebuked applies a x2 action delay cooldown, rather than x1.5.

## Why It's Good For The Game

The eye of god is generally viewed as not particularly useful. Sure, it
is a night vision meson without the flash vulnerability, which is nice.
But it wasn't seen as a terribly exciting tendril drop. The scan power
is so underwhelming, most people do not actually know what the effects
of it are. It largely is only useful for fighting megafauna, since the
stagger effect typically matters more for their cooldowns than other
monster cooldowns. And even then, not by much. The action cooldown
effect on anything else isn't often understood or felt by both victim or
user.

So, the vast majority of the time, miners use it to troll people by, and
I am quoting one player who was witness to me doing so to a particularly
annoying Head of Security, 'pissing on them' by making them glow yellow.
Someone else described it as a 'miner's jarate'. You get the idea.

I changed the highlight color to red to avoid this crude comparison. And
also, I've made it more obviously an attack when someone uses it on you
AND you now know who used it to begin with. And on top of all this, I've
given the eye of god both useful utility and a bit of a power boost to
encourage miners to actually stick the fucking thing into their skull. I
think miners will appreciate health scanning bosses in particular,
something you normally can't do in the middle of a fight with one.

## Changelog
🆑
qol: The eye of god now protects from the madness inducing effects of
supermatter crystals and singularities. This trait is shared by the
meson night vision goggles (which this is a better version of)
refactor: The Scan ability has been refactored into a pointed spell.
balance: The Scan ability has a lower cooldown of 35 seconds.
balance: The Scan ability now gives an advanced health scan readout of
the target.
balance: Scanning someone alerts the target as to who is responsible,
rather than being completely silent as to the culprit (much to the
annoyance of anyone who is victimized by someone using this on them)
code: The status effect that was called Stagger (not Staggered, which is
separate) is now called Rebuked.
balance: Rebuked applies a x2 action delay cooldown, rather than x1.5.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2024-03-31 13:18:06 +00:00
MrMelbert
98526ae100 Fixes stabilized red bypassing immutable slowdowns / Fixes being unable to construct fulltile objects on immutably slow things (#82250)
## About The Pull Request

- Fixes Stabilized Red extract's equipment slowdown immunity bypassing
item Immutable Slowdown

- Fixes(?) Settler equipment slowdown modifier applying to immutable
slows

- Fixes Immutable Slow being considered an object flag when it was an
item flag, causing objects to consider objects with it to be
`BLOCKS_CONSTRUCTION_DIR`

## Why It's Good For The Game

The description of Immutable Slows: 

`When players should not be able to change the slowdown of the item
(Speed potions, etc)`

Stabilized Red extracts were changing the slowdown of the item, which is
unintended.
Likewise Settler was doing the same, but that one I'm a bit more iffy
on.

Either way I suppose if things should immutably be slow, they should
immutably be slow.

## Changelog

🆑 Melbert
fix: Stabilized Red extracts no longer bypass Immutably Slow items
fix: Settler equipment speed modifier no longer applied to Immutably
Slow items
fix: Immutably Slow items no longer block construction of certain items 
/🆑
2024-03-27 16:09:21 -06:00
Pickle-Coding
c1f11f26ce Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579)
## About The Pull Request
Removes all arbitrary energy and power units in the codebase. Everything
is replaced with the joule and watt, with 1 = 1 joule, or 1 watt if you
are going to multiply by time. This is a visible change, where all
arbitrary energy units you see in the game will get proper prefixed
units of energy.

With power cells being converted to the joule, charging one joule of a
power cell will require one joule of energy.

The grid will now store energy, instead of power. When an energy usage
is described as using the watt, a power to energy conversion based on
the relevant subsystem's timing (usually multiplying by seconds_per_tick
or applying power_to_energy()) is needed before adding or removing from
the grid. Power usages that are described as the watt is really anything
you would scale by time before applying the load. If it's described as a
joule, no time conversion is needed. Players will still read the grid as
power, having no visible change.

Machines that dynamically use power with the use_power() proc will
directly drain from the grid (and apc cell if there isn't enough)
instead of just tallying it up on the dynamic power usages for the area.
This should be more robust at conserving energy as the surplus is
updated on the go, preventing charging cells from nothing.

APCs no longer consume power for the dynamic power usage channels. APCs
will consume power for static power usages. Because static power usages
are added up without checking surplus, static power consumption will be
applied before any machine processes. This will give a more truthful
surplus for dynamic power consumers.

APCs will display how much power it is using for charging the cell. APC
cell charging applies power in its own channel, which gets added up to
the total. This will prevent invisible power usage you see when looking
at the power monitoring console.

After testing in MetaStation, I found roundstart power consumption to be
around 406kW after all APCs get fully charged. During the roundstart APC
charge rush, the power consumption can get as high as over 2MW (up to
25kW per roundstart APC charging) as long as there's that much
available.

Because of the absurd potential power consumption of charging APCs near
roundstart, I have changed how APCs decide to charge. APCs will now
charge only after all other machines have processed in the machines
processing subsystem. This will make sure APC charging won't disrupt
machines taking from the grid, and should stop APCs getting their power
drained due to others demanding too much power while charging. I have
removed the delays for APC charging too, so they start charging
immediately whenever there's excess power. It also stops them turning
red when a small amount of cell gets drained (airlocks opening and shit
during APC charge rush), as they immediately become fully charged
(unless too much energy got drained somehow) before changing icon.

Engineering SMES now start at 100% charge instead of 75%. I noticed
cells were draining earlier than usual after these changes, so I am
making them start maxed to try and combat that.

These changes will fix all conservation of energy issues relating to
charging powercells.
## Why It's Good For The Game
Closes #73438
Closes #75789
Closes #80634
Closes #82031

Makes it much easier to interface with the power system in the codebase.
It's more intuitive. Removes a bunch of conservation of energy issues,
making energy and power much more meaningful. It will help the
simulation remain immersive as players won't encounter energy
duplication so easily. Arbitrary energy units getting replaced with the
joule will also tell people more meaningful information when reading it.
APC charging will feel more snappy.
## Changelog
🆑
fix: Fixes conservation of energy issues relating to charging
powercells.
qol: APCs will display how much power they are using to charge their
cell. This is accounted for in the power monitoring console.
qol: All arbitrary power cell energy units you see are replaced with
prefixed joules.
balance: As a consequence of the conservation of energy issues getting
fixed, the power consumption for charging cells is now very significant.
balance: APCs only use surplus power from the grid after every machine
processes when charging, preventing APCs from causing others to
discharge while charging.
balance: Engineering SMES start at max charge to combat the increased
energy loss due to conservation of energy fixes.
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-23 16:58:56 +01:00
Thunder12345
cc800323da Throws gangtools into a bottomless pit (#82145)
## About The Pull Request

Resprites everything that used to use the old gangtool sprites (door
remotes, augment choice beacon, landing zone designators, and nuke op
borg spawners.)


![image](https://github.com/tgstation/tgstation/assets/5479091/346d4a1b-59cc-47c3-b6ff-b66c75d7730b)

- Added a new non-gangtool generic choice beacon, and a specific
S.E.L.F. one.
- Door remotes are now fancy garage door openers.
- Landing designators have cannibalised the cell phone sprites from the
less old version of gang.
- Nuke op borg spawners use the same walkie talkie as other
reinforcements

Door remotes now have individual sprites for each mode, so you can see
the mode at a glance.

## Why It's Good For The Game

Having a range of very different items sharing the same old sprites is
pretty confusing, better to have them all be unique and up to date.

## Changelog
🆑
image: Everything that used the old gangtool sprites (door remotes,
landing field designators, some choice beacons, windicate borg
reinforcements) has been resprited.
image: Door remotes now visibly show their current mode.
/🆑
2024-03-22 13:27:45 -04:00
ArcaneMusic
dafacb8b4b Converts ore_mined talley into only recording typepaths. (#82098)
## About The Pull Request

This Pull request makes it so that the blackbox `ore_mined` talley will
now only record the mineral stack's typepath as opposed to a 50/50 mix
of names and typepaths.

## Why It's Good For The Game

Fixes #82042. Logging should be as descriptive as possible while also
avoiding the possibility for misunderstanding, so using the typepath for
logging on the blackbox is preferred.

## Changelog

🆑
code: Mineral logging now collects ore names more cleanly.
/🆑
2024-03-19 19:43:39 -06:00
John Willard
405d369694 Crushers and PKAs: Coop Upgrades (#81940)
## About The Pull Request

This PR makes 2 changes, one to the crusher and one to the PKA

Crushers: Their projectile no longer overrides eachother, so a mob can
have the blue bubble from several crushers. Triggering it will only
trigger the one that you own, so each player has to go hit the mob to
strike.

PKA: Fixed the minebot passthrough upgrade, and also adds a human
passthrough upgrade. They are incompatible with eachother, so you choose
between solo+minebot or coop, which is a compromise I thought as a
better alternative to taking mod space (the minebot passthrough
currently takes none). This upgrade is available solely at the mining
vendor, for 750 points.

## Why It's Good For The Game

The new mining has been great, and one thing I love is that it
encourages more coop play. Excavating boulders with other miners is much
more engaging and has good teamwork in it, and also is a good way to
encourage miners to stick together more and even fight megafauna in
pairs.
This hopes to make that easier to do, because currently having anyone
with a crusher is sort of a detriment to the whole team. Either the PKA
dude will accidentally shoot the crusher user while they're going in for
a melee kill, or 2 crusher users will be constantly erasing the mark of
the other. This will hopefully make that aspect better, and make mining
with friends a little better.

## Changelog

🆑
balance: Crusher marks no longer overwrite eachother, fauna can have one
from each crusher.
balance: Ash drake's crusher trophy no longer affects people the same
faction as you (like hiero trophy), so you won't friendly fire people
with it.
add: Added a new upgrade: Human Passthrough. You can shoot your PKA
without having to worry about friendly fire with this, for 750 mining
points at your mining vendor.
fix: Minebot passthrough upgrade now properly makes PKAs pass through
minebots.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-03-14 00:41:56 +00:00
Jacquerel
be2f292253 Gulag boulder mining adjustments (#81971)
## About The Pull Request

This PR does two fairly simple things.
Firstly, it triples the gulag point value of every material except
glass.
Secondly, it allows mining skill increases to effect the speed of
boulder breaking and reduce the stamina "exertion" you take.

I tried this out personally on Lavaland and Icebox and while this is
very much dependent on RNG (and storm timing) this got earning 1000
points purely from mining and smashing boulders down to _about_ ten
minutes of work, which I believe is the rough estimate of how much
effort it was before that. It may skew a bit higher than that if the ash
storm happens at a bad time or the game gives you predominantly iron,
but not a _lot_ higher.

The mining skill = faster smashing thing is... barely perceptible after
ten minutes of mining to be honest but it's saving _some_ time and I
think if it gives you the exp it might as well benefit from it too.

I didn't do anything for _glass_ because you can just pick that up off
the ground in Lavaland and I didn't want to make _that_ the ideal route
to getting your sentence finished.

## Why It's Good For The Game

Since ArcMining was merged, the gulag has changed to a system primarily
about digging up boulders and smashing them with a pickaxe for random
rewards. I think the chain gang thing is pretty flavourful, but the
inability to just target high-value materials (because you could see
them on the mining scanner) and the overall decrease in output has made
it take a lot longer to get a similar amount of points.

People are sending prisoners out to mine for 1000 points of materials
assuming this is about 10 minutes work, when in reality it was more like
30-35 minutes. Longer on Lavaland, where you need to take breaks for ash
storms.

This was not an intentional "nerf" to prisoner miners and should
hopefully bring it back down to somewhere closer to the previous level.

## Changelog

🆑
balance: All materials except glass are now worth more gulag points than
before.
balance: Mining skill decreases the time it takes to break boulders, and
makes it less tiring.
/🆑
2024-03-13 13:21:46 -04:00
LemonInTheDark
ef714c1c34 Overlay Lighting Color/Intensity Pass (#81425)
## About The Pull Request

I was looking at screenshots of the game and realized we had a lot of
light sources that were really... flat.

Medium intensity, not colored at all, cringe.

So I went over all the uses of overlay styled lighting (since I've done
matrix lighting already) and gave them more unique features. Colors that
match the sprite they're used with, intensity to produce vibes, that
sort of thing.

It's kinda impossible to go one by one cause there's a LOT.

I may have gone a bit overboard with a few, I'm messing around with some
things like giving bots colors based off their department, etc. We'll
see how this all turns out.

Oh also I tweaked how the cone of overlay lighting is drawn. It seemed a
bit too present to me so I dropped the alpha down from like 200 to 120
at max (so it's roughly half of the mask's alpha so it's less
overwhelming

## Why It's Good For The Game

Lighting should be impactful, subtle and colorful

<details>
<summary>
Old Lights
</summary>


![dreamseeker_QJ5bFZxd63](https://github.com/tgstation/tgstation/assets/58055496/8ae74a95-32cb-473f-830a-ab4e1073a581)

![dreamseeker_DPVgI8wOoN](https://github.com/tgstation/tgstation/assets/58055496/149095af-a08a-4038-bf18-9e3401327452)

![dreamseeker_pyEmTAb37x](https://github.com/tgstation/tgstation/assets/58055496/6dbb6cf8-2ed7-4bc0-9d19-c64849088a33)

![dreamseeker_aDfvnea6YD](https://github.com/tgstation/tgstation/assets/58055496/4ed983e1-6be3-4513-ba3b-cecde08ccd38)

![dreamseeker_RnkQSwmxmc](https://github.com/tgstation/tgstation/assets/58055496/63e0210e-e1b1-42f0-be64-53d67c43f689)

![dreamseeker_G8NSC3lzAk](https://github.com/tgstation/tgstation/assets/58055496/93001925-904d-4061-8874-1d17bb225a90)

![dreamseeker_yASfxtbHDR](https://github.com/tgstation/tgstation/assets/58055496/ce0ae9ad-9067-44e0-9491-3ef331bbbb84)

![dreamseeker_4ecBbG5urI](https://github.com/tgstation/tgstation/assets/58055496/ce82f471-15c7-40ce-bc08-be4f5dc8a3b7)

![dreamseeker_udYlv8uAce](https://github.com/tgstation/tgstation/assets/58055496/c516a278-852b-44b8-ba7c-1203cea3f845)

![dreamseeker_bc2120Fnmr](https://github.com/tgstation/tgstation/assets/58055496/87a1429a-2329-4dd5-8c7b-ff44f54a08bb)

</details>

<details>
<summary>
New Lights
</summary>


![dreamseeker_0H11TyhGgx](https://github.com/tgstation/tgstation/assets/58055496/75b68a25-055e-488c-af82-b062dbe7413e)

![dreamseeker_2B9AENHsfl](https://github.com/tgstation/tgstation/assets/58055496/b52d441c-6ed3-495b-9ebd-9b0c9f924f30)

![dreamseeker_3vOVRRMTSP](https://github.com/tgstation/tgstation/assets/58055496/b265578f-34cc-4a0a-80ea-3237fb83df33)

![dreamseeker_5bTLup65rx](https://github.com/tgstation/tgstation/assets/58055496/6fcd3dc0-5927-458a-9f77-5582ad57a954)

![dreamseeker_iZzxZv4nfW](https://github.com/tgstation/tgstation/assets/58055496/67c3af13-2305-4130-936b-19ded08ccc4e)

![dreamseeker_Lhe9TSA0Av](https://github.com/tgstation/tgstation/assets/58055496/a5310e58-0ff1-45ac-bb81-b4a0212eb0ce)

![dreamseeker_ngQJUv0tV4](https://github.com/tgstation/tgstation/assets/58055496/c3d7423a-ab32-4401-9ffa-c4c3b7811334)

![dreamseeker_PL0z6sU7by](https://github.com/tgstation/tgstation/assets/58055496/2947d828-3aee-48c2-903f-2bf0db9077d2)

![dreamseeker_xineFZDzPA](https://github.com/tgstation/tgstation/assets/58055496/095ff8b0-51cf-4f7c-a2ee-752d9d7e87bd)

![dreamseeker_zpXxbZZakS](https://github.com/tgstation/tgstation/assets/58055496/c4200d35-a2fa-4c3f-8e88-1fd87f44cd46)

</details>

## Changelog
🆑
add: Tweaked the saturation, color and intensity of a bunch of lights
/🆑
2024-03-09 23:57:19 +00:00
John Willard
9ac81e1a64 New station trait job: Human AI (#81681)
## About The Pull Request

This PR does many things, I'll try to explain the basic/background stuff
to the main thing first:

1. Adds a new remote that allows a human to function like an AI. It
controls a fly that will fly around the station slowly, and when it
reaches a machine then the person can interact with it as if they were
an AI. This required changing a lot of silicon/AI checks with one that
also checks for this remote, and some messing with shared ui state.
2. Moves req_access from the obj and bot to ``/atom/movable`` which lets
it be shared between the two, no more copy-paste and one side lacking
features/checks/signals the other has.
3. Adds a check for AI config for AI-related station traits, which was
lacking prior

Now for the good part...
Adds a new station trait that replaces the AI with a Human.
This person is equipped with an AI headset (including Binary), an
advanced camera console, an omni door wand, the machine controller, and
their laws.
They are immune to the SAT's turrets (even if set to target borgs) and
are slow outside of the SAT, mimicing the actions of the AI.

They interact with the world through their advanced camera console,
which allows them to do most AI stuff needed, and the holopad they can
connect to without having to ring first (like Command can).

They are given a paper with the laws they must follow, but since they
are human they are able to bend it. Cyborgs that run the default lawset
are "slaved" to them via an unremovable law 0, so the Human AI can bend
the laws if they really need to (for their own survival n such), and
make the cyborgs obey their commands above laws, but in general this
shouldn't be a frequent occurrence. This does take into account the
unique AI trait, so it's not guaranteed Asimov.

When this station trait rolls, all Intellicards, AI uploads, and AI core
boards are destroyed and are unresearchable. They can be spawned by
admins in-game if necessary. Maybe in the future we can also exclude
Oldstation from this but I haven't really decided.

Extra perks:

Human AI spawns with a Robotic voicebox (unless they are a body purist)
and teleport blocking implant, so they can't use teleporters to bypass
their on-station slowdown.
They also have an infinite laser pointer that can be used to blind
through their camera console. This is unfortunately nerfed from the
recent borg balance PR that removed its stun. This was meant to be the
alternative to no longer being able to permanently lock borgs down like
AIs can (or more than one, for that matter).
They aren't affected by Roburgers, Acid, and Fuel's toxicity.
Bots salute them like they do Beepsky (which is now a trait)
They spawn with SyndEye to replace the AI's tracking ability
They do not have a bank account

### The machine remote

The machine remote has a little fly in it that flies to the machines it
is pointed to, working as the arms and legs of the Human AI. It scans
the machine and punches in the action the AI does, and is how the AI
accesses basically anything. This fly slowly moves from one machine to
the next, and can be recalled with Alt Click.
It works on machines and bots.

### Video (Low quality to fit Github)


https://github.com/tgstation/tgstation/assets/53777086/e16509f8-8bed-42b5-9fbf-7e37165a11e8

## Why It's Good For The Game

I've seen a funny screenshot one day of a person replacing the AI by
using a bunch of door remotes, camera console, crew monitoring console,
and a few other things. I've been thinking about that for a few years
and really wanted to make it official if not easier to make possible,
because it is an incredibly funny interaction.
This makes it a reality, and while they aren't as powerful as regular
AIs, I think it makes for better and funnier in-game moments. With the
same weight as Cargorilla (1), I hope this wouldn't be rolling too often
and ruin rounds, but instead show off the different capabilities that
Humans and AIs can do, to do the job of an AI. You win some you lose
some.

## Changelog

🆑 JohnFulpWillard, Tattax
add: Adds a new station trait job: The Human AI.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-03-09 23:48:39 +01:00
SyncIt21
55ef6a6219 Use a common list for acceptable silo materials (#81790)
## About The Pull Request
This list containing the same material values was copy pasted all over.
It's already cached in the subsystem so let's just use that.

Renamed ore category into silo category.

## Changelog
🆑
code: Use a common list for acceptable silo materials for some stuff.
Renamed ore category into silo category.
/🆑
2024-03-09 05:24:33 +01:00
SyncIt21
62d74bc4d5 Minor cleanup for machine frames & boulder machines (#81706)
## About The Pull Request
- Moves call to `update_appearance(UPDATE_ICON_STATE)` to
`/obj/structure/frame/Initialize()` for both computer & machine frames
cause both do that anyway
- Fixes wrench screentip for machine frames
- Screw driving an incomplete machine frame won't display the "you need
to unsecure it first" along with "missing components" balloon alerts
- Moved boulder refinery code to `item_interaction()`
- Autodoc some golem procs for refineries
- Gives the secured machine frame an icon state of `box_1` so it looks
wired in the rcd menu as well
- Fixes screentips(like wrench act) for boulder machines

## Changelog
🆑
fix: fixes toolact screentips & balloon alerts for boulder machines &
machine frame
/🆑
2024-03-09 04:30:29 +01:00
Ben10Omintrix
6b6bd5ce95 fix ore vents spawning the wrong wolves and remove simple wolves (#81864)
## About The Pull Request
wolves got refactored but the ore vents were still spawning the old
versions, this fixes it and removes the old wolves from the code

## Why It's Good For The Game
fixes ore vents spawning old wolves

## Changelog
🆑
fix: fixes ore vent spawned wolves being untammable
/🆑
2024-03-07 11:10:07 -07:00
MrMelbert
8d599455d7 Boulder refineries can process golems (#81849)
## About The Pull Request

Golems (if lying down) can enter (and be processed by) boulder
refineries.

## Why It's Good For The Game

Rocks are rocks

## Changelog

🆑 Melbert
add: Boulder refineries and smelters can refine Golems. 
/🆑

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
2024-03-06 16:08:58 -07:00
13spacemen
357799c8a5 Removes Orbit Polling Component, SSpolling improvement (#81748)
When I made SSpolling, jlsnow gave me his blessing to delete the orbit
polling component [where you orbit something for 20 seconds before it
chooses a ghost from the orbiters]
It's only used in a few places like soulstones replacing
jobbanned/inactive players, etc.

Also upgraded SSpolling; you can now place a little icon on the sides in
the chat message, chat message looks a lot nicer, the alert pic and the
jump target don't have to be the same anymore, and I made it be able to
pre-pick candidates since 90% of the use cases would just want 1
candidate

Also prints to chat who the chosen one was

Also made slime intelligence potions ask the user for a reason, which
will be displayed in the alert poll
2024-03-06 08:24:36 +00:00
ViktorKoL
d6319d2b87 Lots of description changes and grammar fixes for heretics (#81761)
## About The Pull Request

Changes a lot of text. Apart from grammar fixes, here are the notable
changes:

- Ash jaunt description just said it is a "short range jaunt" without
explaining what exactly a jaunt is. I believe it is better to describe
without comparing to another spell the player may not have experience
with.
- Cosmic grasp now explains what the deal is with star marks and cosmic
fields. It is still possible to crosspath into a star mark spell,
skipping this description, but I assume a player like that is
experienced enough to know what the star mark does anyway...
- The knowledge for ash spirits no longer refers to them as "Ash Men" -
"Ash Spirit" is the mob's actual name. If you think "Ash Man" is a
better name, I can change it around so that the mob gets renamed that
instead.
- Removes the lines from paradoxical curio's description about causing
brain damage on examination - many heretic items cause adverse effects
to heathens who try to interact with them, and there is never a need to
clutter the description with them.
- Changes the eldritch coin description, because the old one was, in my
opinion, awkward. I changed it to be more inline with the other items'
descriptions, and to not tell non-heretics what its purpose is. If you
liked the old one better, I can revert this change.
## Why It's Good For The Game

Grammar good. Accurate descriptions good.
## Changelog
🆑
fix: made some heretic descriptions more accurate
spellcheck: improved english of the heretical eldritch patrons
/🆑
2024-03-03 20:00:17 +01:00
ArcaneMusic
161b96c99d Fixes mining cyborg ore scanner shutting off when stored. (#81604) 2024-02-23 09:44:57 -07:00
John Willard
9fe36a193c Monster cores work while resting (#81548)
## About The Pull Request

Currently to use items like the regenerative core, you can either attack
yourself (or someone else), or use Z to use the item in-hand, unless you
are lying down in which case you have to specifically click, and can't
use in-hand. It's kinda dumb and this has been an issue I had since I've
started playing, and today I thought "wait why did I just never fix it
then?", so now I am.

## Why It's Good For The Game

Mostly explained in the about section, you can already use cores while
resting, this just means you can't use Z instead of having to click on
your character sprite.

## Changelog

🆑
fix: Regenerative cores (and other monster organs) now work when using
it in-hand while resting.
/🆑
2024-02-19 15:24:50 +01:00
SyncIt21
6c59996ef1 [NO GBP]Some BRM Fixes (#81551)
## About The Pull Request
- The time from which the boulder is picked to when it's teleported onto
the conveyer belt is 1.5 seconds. During that time the boulder could get
deleted due to many factors and we lose our materials. No one like's
that that so now both steps are combined into 1 proc so we no longer
loose boulders during teleportation.
- Batch processing cooldown was not working when
`boulder_processing_max` is > 1. Now it does

## Changelog
🆑
fix: boulders are no longer lost when teleported by the BRM
fix: batch processing cooldown works when teleporting multiple boulders
/🆑
2024-02-19 15:20:49 +01:00
SyncIt21
df2ce692ee General maintenance for all things boulder related. (#81358)
## About The Pull Request
**1. Qol**
- Adds screen tips & examines for screwdriver & crowbar acts on BRM,
Refinery & Smelter
- Adds examines to display number of boulders stored inside a refinery &
maximum number of boulders it can hold. Right click screentip to remove
boulders
- Adds examines to display maximum number of boulders than can be
teleported by a BRM & screentips for interacting with wires
- More audio & visual feedback for refinery processing. If a boulder
requires multiple steps you will get a balloon alert saying "crushing"
for refineries & "smelting" for smelters along with a sound per process
tick(which is every 2 seconds so no need for cooldown) giving you a
better idea of what's happening in the pipeline
- BRM now will display all lights when the "Automatic boulder retrieval"
is on & turn off the lights when disabled along with examines giving you
a visual indicator of its state

**2. Code Improvements**
- Splits types of boulders into its own file `boulder_types.dm` for easy
maintainability
- Moves beacon for refinery machines into its own file
`boulder_processing/beacon.dm` for easy maintainability
- Moves the cooldown for processing a boulder `processing_cooldown` into
the refinery machine itself. Since 100's of boulders can be created per
round this var can take up memory quickly so by moving them into the
refinery machine it gives us some savings
- Compressed & merged procs such as `create_mineral_contents()` ,
`flavour_boulder()` etc with the vent code. These procs were only used
by the vent 1 time & by merging the code we removed if conditions to
check if a parent vent was passed or not(since now that's always the
case). Helped in removing boilder plate code

**3. Fixes**
- **Fixes vents always spawning "Small size boulders" & not medium, nor
large boulders.**
 Once a vent generates a boulder it calls  `flavour_boulder()`

084f56938c/code/game/objects/structures/lavaland/ore_vent.dm (L385)
however this proc also accepts 2 more params `size` which would always
default to `BOULDER_SIZE_SMALL` and `is_artifact` which is simply unused
in the proc

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L219)
Therefore vents would always generate small boulders giving us no
varity. Now the boulder size is set depending on the vent size &
durability for each boulder is set to a random value between 2 & the
boulder max size giving us the flavour we actually wanted

- **Fixes "Expanded Gulag boulders" using "normal gulag material list"
when setting its custom materials.**
If you look at the `add_gulag_minerals()` proc it always picks from the
`gulag_minerals` list & accepts no params

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L235-L236)
So when we try to pass params to this proc which in reality doesn't
accept any we were wasting our time doing this

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L274)
And for our case `expanded_gulag_minerals` list was simply unused
because our proc doesn't care about it and it went back to just using
`gulag_minerals` list thus ignoring our list

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L282)
As i said in the "Code Improvement` section when i moved boulder types
into it's own unique file this was fixed & now expanded gulag boulders
actually has a chance to spawn with bluespace crystals inside them

- **Fixes manual tapping of ore vents by hand not using a cooldown**
`produce_boulder()` accepts a cooldown var for when you need to manually
tap the vent by hand.

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L374)
This var was always set to FALSE because we never passed `TRUE` into it.
Not once here

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L124)
Nor here

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L131)
Now we just pass `TRUE` so tapping these vents by hand have a cooldown

- **Fixes BRM off icon state never being used**
When the room ran out of power it would still look on. Now we use that
state correctly

- **Fixes Automatic Boulder Retrieval by the BRM not actually being
automatic**
You must have noticed that once you do "Right click" and wait for all
the boulders it can teleport (determined by `boulder_processing_max`) to
be teleported it stops permanently after that. Even if more boulders get
generated it won't do anything, You have to again "Right click" &
retoggle automatic boulder retrieval on again, thus forcing someone to
stand there & monitor the BRM

Now once you set Automatic Boulder Retrieval on you can leave & forget.
It will teleport boulders as & when available thus enabling automation
properly.

- **Fixes boulders ejected from refineries via right click from getting
teleported back into the machines loc**
Fixes
https://github.com/tgstation/tgstation/pull/78524#issuecomment-1911666995.
The problem is refinery machines & the BRM keep track of all the
boulders that entered into it via the `boulders_contained` list.

Now we directly check `contents` for boulders so we don't have to
maintain 2 seperate lists to keep track of boulders. It also now uses
`processed_by` var of boulders to ensure refinerries don't retake in the
same boulder it just processed. Not sure where exactly the problem got
fixed but implementing these 2 measures fixed it regardless.

- **Fixes boulders with 0 durability[a.k.a steps] from getting ejected
out**
Fixes
https://github.com/tgstation/tgstation/pull/78524#issuecomment-1914551952.
So inside `process()` we constantly decrease the durability of the
boulder till it becomes 0.

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L159)

  When it reaches 0 it calls `breakdown_boulder()`

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L164-L165)

This proc has a chance to reject the boulder if it could not process any
materials

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L219-L222)
  
  **"Without resetting its durability"** over here

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L241)

So it ends up rejecting a "0" or worse -1 durability boulder. Now we set
the durability in `remove_boulder()` so regardless of what circumstances
the boulder is ejected it always gets a positive durability

- **Fixes BRM & Refinery from rapidly spitting out boulders in their loc
which causes lag in the long terms**
Fixes #81404. Basically even if there is 1 boulder sitting at a BRM's
loc or an refineries loc. Operations are haulted i.e. the BRM will not
teleport any more boulders & the refinery will keep their already
processed boulders inside till their locs are cleared from boulders.
This prevents large number of boulders from pilling up in long rounds

- **[Priority : High] Fixes refineries incorrectly removing materials
from processed boulders**
Fixes #81109. This bug is quite serious because it can't literarily
affect any random item with custom materials in game. This one line of
code over here can break the entire material economy as we know it

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L217)
  
**"DONT DO THIS"**. The `custom_materials` list is a **"read only"**
list & if you ever want to change it call the `set_custom_materials()`
proc with your new values but do not edit this list manually as it is
done here.
  
All lists related to materials are cached by the `SSmaterials`
subsystem. List values are cached & shared across multiple objects so
when you edit those values like here, you might end up effecting an
item/multiple items in some random corner of the map that shares this
list.

This also causes boulders with empty list of materials to get spawned at
random so yeah again plzz don't do this

**4. Refactors**
- Repathes `obj/machinery/boulder_processing/brm` -> just
`obj/machinery/brm`.
Even though semantically it looks nice that the brm is a subtype of
`obj/machinery/boulder_processing` from a code & operation perspective
they have 0 similarities.

1) The BRM does not accept boulders feed into it from a conveyer belt
unlike a refinery but instead picks boulders from `SSore` subsystem &
put it on the conveyer belt. This means procs for accepting boulders
such `CanAllowThrough()`, `breakdown_boulder()`, `accept_boulder()` etc
have no use in the BRM. Their just code clutter at this point
2) The BRM overrides `process()` & does not call its parent proc making
that code wasted
3) It has no use for silo materials & mining points making those vars go
to waste

With so much wasted code its better to just let go off all of it & just
make it a basic instance of `obj/machinery` making maintainence easy

- BRM now teleports boulders in a batch (batch size determined by
`boulders_processing_max` max value from upgraded parts is 7) with a
boulder appearing every 1.5 seconds rather than spawning all at once.
After a batch is processed it has a cooldown of 3 seconds before
repeating the process if automatic boulder retrieval is on. This stops
the conveyer belt from getting crowded with boulders and makes the
refining process more efficient.

With this BRM wires are removed because only it had only 1 wire
responsible for toggling boulder retrieval but now since this process is
automatic, we have true control over the timing of boulders spawned &
don't want to leave it in the hands of players

## Changelog
🆑
qol: adds examines & screentips for crowbar, screwdriver acts to BRM &
refinery machines
qol: adds examines about the number of boulders stored & processed to
BRM & refinery machines
qol: BRM now has its lights turn on/off depending on wether automatic
boulder retrieval is on/off for visual clarity along with examines
qol: refinery machines now display ballon alerts & plays sounds more
frequently when processing boulders for better feedback
fix: vents now spawn boulders of all sizes & not just small ones
fix: expanded gulag boulders now have correct materials in them.
fix: manual tapping of vents now has a cooldown applied as intended.
fix: BRM has its light turned off when area power goes off
fix: boulders ejected from refineries by hand no longer teleport all
over the place occasionally.
fix: refineries no longer eject boulders with 0 durability
fix: Boulders & refineries no longer pile up on top of BRM's &
refineries in long rounds. Their locs have to be clear of boulders
before they spit out more boulders to prevent a large pile of boulders
from causing lag
fix: sheets ejected from lathes no longer get rejected when inserted
back which could happen at random, no more boulders with empty materials
code: splits boulder types into its own file along with other items
code: merges & autodocs procs, vars related to boulders
refactor: repaths BRM to a simpler subtype
refactor: BRM now spawns boulders in batches(batch size can be increased
with upgraded parts) with a boulder appearing every second. After a
batch is processed a 3 second cooldown is applied to stop the conveyer
belt from clogging up, With this BRM wires are removed as there is no
need for timers to be attached to wires which intefers without our batch
processing timings.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-18 03:40:57 +01:00
jimmyl
54192fda81 deathmatch (#81444)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/70376633/44f1d1af-2cd6-4e69-a13e-6d2a663d668d)

adds a deathmatch minigame, a port and slightly redone version of the
aetherstation deathmatch (by TheChosenEvilOne)
the goal is to kill everyone else with loadouts

## Why It's Good For The Game

CTF sucks and this is probably better to filter out the bloodthirsty
terry players anyway

## Changelog
🆑
add: deathmatch minigame
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-18 03:39:00 +01:00
SyncIt21
6b6a22ee71 General maintenance for ore box (#81459)
## About The Pull Request
**1. Qol**
- Adds examines & screentips for crowbar, ore & boulder insertion
- Empty button of ore box greys out when the box is empty

**2. Code**
- Cleaned up `dump_box_contents()` proc. It was doing way too much
excessive checking for if the box or its contents was deleted & was
setting the plane of the ore when dropped onto the turf via tick check?
Just completely unnecessary
- Removed `type` when sending ui data, use the `id` provided by the ui
instead. Boulders & ores are wrapped up in the same `materials` list &
we use only 1 for loop when checking for content types
- Corrected return value of `crowbar_act`
- `attack_hand()` & `attack_robot()` are unnecessary because
`ui_interact()` covers both cases

**3. Spellcheck**
- Corrected description & ui notice of ore box to specify it can carry
boulders as well

## Changelog
🆑
qol: adds examines & screentips for ore box
code: cleans up some procs for ore box
spellcheck: corrected description & ui notice of ore box to specify it
can hold boulders too
/🆑
2024-02-16 19:48:52 +01:00
Interception&?
2e0d6cec0c Fix lag when viewing ore silo long logs list (#81232)
![6OrHcTlN6Z](https://github.com/tgstation/tgstation/assets/137328283/89ed9091-e85b-4032-bae1-19200d5ad10d)


## About The Pull Request

- Logs tab is now using a virtual list that renders only visible
components, thus preventing lag when logs list grows too long. More
about it
[here](https://github.com/tgstation/tgstation/pull/81016#issuecomment-1921765723).
- Minor tweaks to Ore Silo UI to account for new backend changes and TG
style guide.

## Changelog

🆑
fix: Separated logs list into pages in ore silo UI, thus fixing lag when
logs list grows too long.
/🆑
2024-02-12 22:40:08 +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
SyncIt21
4495ea2e4d Refactors how machines are deconstructed (#81291)
## About The Pull Request
This refactors how machines are deconstructed in the following ways

- You can no longer override `obj/machinery/deconstruct()`. If you want
customized behaviour then override `on_deconstruction()` instead.

This comes with the added benifit of no longer needing to check for the
`NO_DECONSTRUCTION` flag because the machine base proc does that for us
& if it finds that flag it won't proceed to call `on_deconstruction()`
meaning no machine will have a chance to spawn anything which is the
current behaviour.

This is required to make #81290 work for all machines at least so that
machine can send the `COMSIG_OBJ_DECONSTRUCT` signal without subtypes
overriding & forgetting to call the parent proc

- `dump_contents()` only gets called when the machine is deconstructed
not destroyed thus not leaving behind any of its contents inside. Fixes
https://github.com/tgstation/tgstation/pull/81290#issuecomment-1925752583

## Changelog
🆑
fix: machines that should not drop contents when deleted no longer do.
refactor: refactors how machines are deconstructed. report bugs on
github.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-02-11 14:52:19 +01:00
MrMelbert
3cc3ad3935 Mining Bluespace Survival Capsule's "Stand back!" alert now actually has meaning (#81193)
## About The Pull Request

- Standing in range of a Bluespace Survival Capsule being deployed will
now toss you away from the deployed location of the pod, to roughly 2
tiles away.

## Why It's Good For The Game

I always found it weird (and a little misleading) that triggering a
survival capsule alerts people to "Stand back!", but it's actually
harmless to stand on top of it and even smart in some contexts since you
phase into it like nothing happened.

So I added the missing flavor. 

This also has some potential shenanigans involving antagging, as you can
time it perfectly so that you toss it just in time to throw people away
from it.

Note: The Luxury Elite pod is so large, that even after being thrown
away, you may still end up inside the pod by the time it deploys, but I
think that's funny. So.

## Changelog

🆑 Melbert
add: Shaft Miner's Bluespace Survival Capsules will now throw people
away from it when it deploys. Be sure to heed the warning to "Stand
back".
/🆑
2024-02-11 00:13:19 +01:00