Commit Graph

310 Commits

Author SHA1 Message Date
grungussuss
58501dce77 Reorganizes the sound folder (#86726)
## About The Pull Request

<details>

- renamed ai folder to announcer

-- announcer --
- moved vox_fem to announcer
- moved approachingTG to announcer

- separated the ambience folder into ambience and instrumental
-- ambience --

- created holy folder moved all related sounds there
- created engineering folder and moved all related sounds there
- created security folder and moved ambidet there
- created general folder and moved ambigen there
- created icemoon folder and moved all icebox-related ambience there
- created medical folder and moved all medbay-related ambi there
- created ruin folder and moves all ruins ambi there
- created beach folder and moved seag and shore there
- created lavaland folder and moved related ambi there
- created aurora_caelus folder and placed its ambi there
- created misc folder and moved the rest of the files that don't have a
specific category into it

-- instrumental --

- moved traitor folder here
- created lobby_music folder and placed our songs there (title0 not used
anywhere? - server-side modification?)

-- items --

- moved secdeath to hailer
- moved surgery to handling

-- effects --

- moved chemistry into effects
- moved hallucinations into effects
- moved health into effects
- moved magic into effects

-- vehicles --

- moved mecha into vehicles


created mobs folder

-- mobs --

- moved creatures folder into mobs
- moved voice into mobs

renamed creatures to non-humanoids
renamed voice to humanoids

-- non-humanoids--

created cyborg folder
created hiss folder
moved harmalarm.ogg to cyborg

-- humanoids --




-- misc --

moved ghostwhisper to misc
moved insane_low_laugh to misc

I give up trying to document this.

</details>

- [X] ambience
- [x] announcer
- [x] effects
- [X] instrumental
- [x] items
- [x] machines
- [x] misc 
- [X] mobs
- [X] runtime
- [X] vehicles

- [ ] attributions

## Why It's Good For The Game

This folder is so disorganized that it's vomit inducing, will make it
easier to find and add new sounds, providng a minor structure to the
sound folder.

## Changelog
🆑 grungussuss
refactor: the sound folder in the source code has been reorganized,
please report any oddities with sounds playing or not playing
server: lobby music has been repathed to sound/music/lobby_music
/🆑
2024-09-23 22:24:50 -07:00
John Willard
1880003270 Reworks silicon/ai access checking & fixes some ui_act's (#84964)
## About The Pull Request

Currently to check for Silicon access, we do:
``if is silicon or is admin ghost or has unlimited silicon privileges or
has machine remote in hand``
What has unlimited silicon privileges? Bots, Drones, and admin ghosts.
To check for AI access, it just checks for AI instead of silicon, and
doesnt check for unlimited silicon privileges.

This was kinda silly, so I thought I should make this a little easier to
understand.
Now all silicon/ai traits come from ``AI_ACCESS_TRAIT`` or
``SILICON_ACCESS_TRAIT``. I made a single exception to keep Admin ghost,
since now instead of being a var on the client, we moved it to using the
same trait but giving it to the client instead, but since we have to
keep parity with previous functionality (admins can spawn in and not
have this on, it only works while as a ghost), I kept previous checks as
well.

No more type checks, removes a silly var on the mob level and another on
the client.

Now while I was doing this, I found a lot of tgui's ``ui_act`` still
uses ``usr`` and the wrong args, so I fixed those wherever I saw them,
and used a mass replace for the args.

Other changes:

- machinery's ``ui_act`` from
https://github.com/tgstation/tgstation/pull/81250 had ``isAI`` replaced
with ``HAS_AI_ACCESS``, this has been reverted. Machine wands and admin
ghosts no longer get kicked off things not on cameras. This was my
fault, I overlooked this when adding Human AI.
- Human AI's wand gives AI control as long as it's in your hand, you can
swap to your offhand. I hope this doesn't end up going horribly,
otherwise I'll revert this part. It should let human AIs not have their
UI closed on them when swapping to eat food or use their door wand or
whatnot.
- Bots previously had special checks to scan reagents and be
unobservant, I replaced this with giving them the trait. I also fixed an
instance of unobservant not being used, so now statues don't affect the
basic creature, whatever that is.

## Why It's Good For The Game

This is an easier to understand way of handling silicon access and makes
these mobs more consistent between eachother.
Other than what I've mentioned above, this should have no impact on
gameplay itself.

## Changelog

🆑
fix: Statues don't count as eyes to creatures.
fix: Human AIs and Admin ghosts no longer get kicked off of machines
that aren't on cameranets.
/🆑
2024-08-19 10:43:45 +00:00
norsvenska
5f80128fa9 Corrects 200+ instances of "it's" where it should've been "its" instead (#85169)
## About The Pull Request

it's - conjunction of "it" and "is"
its - possessive form of "it"

grammar is hard, and there were a lot of places where "it's" was used
where it shouldn't have been. i went and painstakingly searched the
entire repository for these instances, spending a few hours on it. i
completely ignored the changelog archive, and i may have missed some
outliers. most player-facing ones should be corrected, though
## Why It's Good For The Game
proper grammar is good

## Changelog
🆑
spellcheck: Numerous instances of "it's" have been properly replaced
with "its"
/🆑
2024-07-21 13:41:37 -06:00
LemonInTheDark
9bc534f3d6 Variable Door Delay + Timer Based Animations (#84631)
## About The Pull Request

### Variable Door Delay

Door opening/closing delay times are currently static, but many doors do
not have animations that FIT the actual timings.

It would be better if subtypes cound declare how long each animation
takes, and how long it takes for opening to say, become passable and
such.

Let's do that.

### Timer Based Animations

Currently all doors use flick() to do their animations. This is fine
right NOW, but fucks with walleniong because we have to split most
things into segments to make layering work.

So rather then flick let's use client timers and update_icon_state to
achive our effects, alongside a proc that lets us do other effects (like
sound) on playing an animation

## Why It's Good For The Game

Door behavior and visuals better match up, wallening compatability
upstreaming.

## Changelog
🆑
add: Most door animations now better line up with when they are/are not
passable.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-07-08 22:24:36 +02:00
jimmyl
4ba3dd1a73 adds a new wire to mecha wires + fixes mecha shock wire (#84538)
## About The Pull Request

the shock wire if cut shocks you
adds a new wire that if cut makes the mecha pick a random weapon that it
will shoot you with, or punch if no weapons were attached
if pulsed, it will do the same if you pulsed it yourself with a
multitool but with a signaler it will pick a target in range
also this wire doesnt work if piloted no powergaming for you

## Why It's Good For The Game

stealing a mecha right now is extremely easy, mauler included, all you
need is a wirecutter and screwdriver you dont even need insuls
theres little risk to that even if the shock wire actually worked
with the additional risk of getting shot you now should think twice
before you should try your luck stealing an efficient killing tool

## Changelog
🆑
add: mecha wire that shoots you or anyone nearby if pulsed or cut
fix: mecha shock wire shocks you
/🆑
2024-07-03 20:46:37 +02:00
Andrew
b984c9d6f0 APC channel wires (#84099)
## About The Pull Request

Added wires for toggling channels between Auto and Off to the APC.


![image](https://github.com/tgstation/tgstation/assets/3625094/b4986bd1-3c10-4200-bc88-405fe6c40d6a)

## Why It's Good For The Game

Allows for a few interesting setups, such as:

- Connecting signaller to the lights channel to control lights remotely
or using proximity sensors/infrared lasers.
- Connecting signaller to the machinery channel to automatically disable
machine power usage in an area for power saving with signaller or
proximity sensors.

## Changelog

🆑
qol: APC has wires for machinery/lights/environment channels
/🆑
2024-06-19 08:31:19 -04:00
thegrb93
4140471dfb Fix unable to interact with depowered shocked door (#83903)
## About The Pull Request
Fixes bug where you can't interact with a shocked door without shock
protection even if it is depowered.

## Why It's Good For The Game
Prevents cheese where if you get lucky and depower a door, you can
easily find its shock wire and also easily test if budget insuls you
have work.
2024-06-13 13:01:07 -05:00
Afevis
b663fbff22 Syndicate AI fixes (#83317) 2024-06-05 22:54:32 -06:00
MrMelbert
cf27199e7e Reading a photo with blueprints now requires squinting (#82984)
## About The Pull Request

To see the wires in a photo of blueprints you first must squint at them.

## Why It's Good For The Game

Realism, a picture of blueprints taken from across the room makes it
difficult to see what's up

## Changelog

🆑 Melbert
balance: To see wires in photos of blueprints, you first must squint at
the photo.
/🆑
2024-05-08 01:12:48 +02:00
Fikou
3b807fcc8d you can use a photo with blueprints on it to read wires (#82873)
## About The Pull Request
like how you can get the objective by taking a photo of the station
blueprints, now you can view wires with a photo of them

## Why It's Good For The Game
lets the chief engineer help out his fellas if he wants to and provides
plausible deniability for traitors that want a picture of the blueprints

## Changelog
🆑
add: you can use a photo with blueprints on it to read wires
/🆑
2024-04-30 18:17:37 +02: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
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
John Willard
0417e090cc Removes camera assembly structures (#81656)
## About The Pull Request

Removes the camera assembly structure middleman between the camera
wallframe and camera machine. All its behavior has been instead moved to
the camera, and I've tried to keep as much of the behavior the same as
before.
This also fixes the issue that camera assemblies had where, upon the
construction being finished, it would move itself into the newly
finished camera machine, therefore taking itself off a wall, therefore
deconstructing itself. This resulted in 2 piece of iron being in each
camera machine (except roundstart ones), and because camera machines
rely on the assembly inside of them for upgrades and such, upgrading
didn't work at all.

I've also made camera nets use defines (not in map) so it's easier to
find a list of them all, and tried to add autodoc comments to nearly
every var in camera code.

## Why It's Good For The Game

Removes copy paste and spaghetti code between structure and machine
camera, thus making it easier to work around with.
Closes https://github.com/tgstation/tgstation/issues/79019

## Changelog

🆑
fix: Cameras built in-round can be upgraded again.
fix: Deconstructing cameras now more consistently return to you the
upgrades inside of the camera.
fix: RD's telescreen can now properly see Ordnance cameras again.
fix: [Deltastation] Library art gallery no longer has an invisible
camera.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-27 15:35:07 +01:00
antropod
54fdf6963e Fix vending machine shocking you twice when you pulse high voltage wire (#82077)
## About The Pull Request

Vending machine no longer shocks you twice when you pulse high voltage
wire.

as a bonus fixed a bug in airlock wires code - wires window closes when
you get shocked

## Changelog
🆑
fix: Vending machine no longer shocks you twice when you pulse high
voltage wire.
fix: Airlock wires window closes when you get shocked
/🆑
2024-03-19 09:16:24 +01:00
Ghom
8c6f4180ae Adds a collar bomb to the black market. (#81898)
## About The Pull Request
Originally part of the other blackmarket PR, but it seemed a tad awkward
to have it mandatorily installed on mobs rescued from the holding
facility.

But yeah, this PR adds a neck item that causes the wearer's death with a
5 seconds countdown when triggered, which can be bought from the market
uplinks. The box comes with a yellow button to trigger it, but it can
also hold a signaler (which the wearer cannot tamper) if you wish to use
assemblies. Take note that, upon being worn, the item cannot be removed
by any mean beside beheading iirc (so HARS should counter it), and
fire/acid if you have a ton of patience because of its high armor
values.

## Why It's Good For The Game
More mean and evilish stuff to populate the black market with.

## Changelog

🆑
add: Added a collar bomb to the black market.
add: Added a possible kit to the special syndie bundle B, which also has
uses these collars.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-16 01:37:10 +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
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
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
ArcaneMusic
002051a3d5 ArcMining Pr Beta: Version 1.2 (#78524)
This one's not like the last one, so much so that I'm not even going to
outsource the PR description to a robot this time!
Basically, **You should read the PR body before assuming that everything
is the same as last time. It's not.**

## Video Summary
Click the link below to see a video summary of the main features of this
pull request.
https://youtu.be/Aho2omR0mjY?feature=shared

## About The Pull Request
This pull request serves as a large rework of minerals produced by
mining, and by extension mining itself. I'll try and list each change
and it's associated nuance here.

### Ore Vents
The biggest addition to the game with ArcMining is **Ore Vents**. Ore
vents spawn as a ruin on the map, placing a randomized ore vent onto map
generation. Ore vents spawn in 3 different sizes, **Small, Medium, and
Large**. These vents will pick from a pool of materials they can
generate, and will hang out across the map. A player can use a mining
scanner to discover an ore vent, granting a small quantity of **mining
points** to begin with. Once scanned, ore vents will show what minerals
that ore vent will generate after they're fully tapped.

Scanning the vent again will trigger the extraction process. A small
drone will fly down, called the NODE drone, and buckle onto the vent.
Your job during wave defense is to protect the drone and to defeat waves
of randomly spawning mobs (dependent on if you're on lavaland or on
icebox). The quantity, duration, and time between waves is scaled to the
size of the vent you're protecting. Starting by scanning and protecting
lower tier vents earlier in the shift is a safer bet than doing a large
vent in the first few minutes. The drone has 500 health, and can take a
good few hits, but leaving it alone will cause it to meet an unfortunate
end quite quickly.

Cooperation can be your best asset, as mining with allies can greatly
help with wave defense, and mineral points are granted to anyone who
helps with defending the ore vent equally (So 500 * size tier,
regardless of how much help you receive). Once complete, the ore vent
will have a mining machine constructed on top of it, and will start to
dredge up **Boulders** from the earth automatically. More on boulders
later.

Ore vents can be located based on your mining scanner, and will provide
an appropriate audio cue based on if the ore vent has been discovered or
not, and once processed will no longer alert you to it's presence.

**Each station comes with a free vent that produces exclusively iron and
glass, free of charge.** This is to help with shifts where the station
may not have shaft miners to produce minerals, and to provide the
station with a baseline amount of minerals where none may exist
otherwise.

### Mineral Generation
Mineral generation has been completely reworked. Previously, Mineral
Generation had a flat 13% spawn rate in-game. Once minerals spawned,
they would also have a chance to propagate their minerals to nearby
tiles, resulting in a rather massive pool of minerals that could spawn
throughout lavaland on the whole.

This tweaks that, by making minerals in walls spawn based on their
proximity to ore vents on maps that use cave generation. Both the
probability, and quantity of ores spawning in walls is scaled based on
distance, with ore vents looking like large caches of ores found in
walls. This makes following ores found in walls and checking their
quantity of minerals spawned a good indicator of how close you are to a
nearby vent in-round.

This means you can collect some points form both discovering ore vents
first, as well as collecting their surrounding ores, turn those in for
mining points, and then trading them in for gear upgrades to more
effectively take on ore vents. As a result of tweaking the balance of
this, the total amount of ores spawned in walls overall has been
decreased. However, by making more of the process time based, we still
result in a mostly balanced finished product.

### Boulder Processing
On station, there are now three new machines. These are the BRM, the
Refinery, and the Smelter.

- The BRM acts as a teleporter. Instead of needing to carry boulders
back to the station, you can activate the BRM, and it will automatically
pick boulders to teleport back to itself. You can use this to teleport
boulders dredged up from lavaland onto the station for processing. **The
BRM will only lock on to boulders that are resting on an ore vent.**
Moving boulders back by hand will mean you'll have to haul it back by
hand.
- The refinery processes the non-metallic materials out of boulders.
This process sends the materials straight to the ORM, and collects
mining points from the ores smelted in the machine. Swiping with an ID
card lets you withdraw those points for your own personal account, but
remember that these points are for your whole team to share from. The
**Mining points obtained from this process is only 75% of the amount an
equivalent amount of ores would provide.**
- The smelter works nearly identically, however the smelter produces
metallic materials out of boulders instead.
- Once a boulder has had all of it's materials extracted, it's broken
down and deleted from the line. Otherwise, the boulder is spat out for
the next machine to process it (either the refinery or smelter).
- Once there's no minerals left in a boulder of any type, the refinery
or smelter will break the boulder down.
- Boulders **do not stack onto tiles with each other**, so they'll block
each other when pulled or when moving on a conveyor belt.

Boulders can also be processed by hand. Using a mining tool on a boulder
with right click will allow you to break down a boulder into it's
composite ores, but limits you to a maximum of 10 ore per boulder, where
the full amount can be extracted using the proper processing machines.
Also, processing by hand does deal small amounts of stamina damage over
time, do breaking a full large boulder can be particularly taxing.

Additional Boulder Processing Machines can be built, with the BRM board
being obtained from the Protolathe, while the Smelter and Refinery
boards being obtainable from the Autolathe instead. A _boulder
processing beacon_ can also be obtained from the mining points vendor as
a reward to assist with boulder processing. Boulder processing beacons
can be used to spawn in a new BRM, refinery, and smelter on the tile the
user is standing on, however **you'll still need to link them to the
ORM**!

All three machines can be upgraded with Stock Parts, allowing for **more
boulders to be processed at a time**. It does not, however, increase the
amount of minerals received from boulders, or points earned.

### Mining Borg Tweaks
Mining borgs have been given some minor adjustments to compensate for
the changes to mining. Their mineral scanner, which now has an active
component to gameplay, is now a module as opposed to built into the mob.
This module allows for the same ability to discover and start waves of
monsters to fight.

Mining modules will find that their PKA now has a total of 90% mod
capacity as compared to the 80% they had before, to allow for more
robust defense of ore vents.

In addition, all borgs and AIs can interact with the BRM for boulder
collection.

### Mining Mech Tweaks
Mining Mechs have had their utility tweaked as a result of these changes
as well. Mineral scanners to be used on mining mechs now have a larger
radius by comparison to their handheld cousins. Similarly, it now has an
active scanning button, which will actively discovery nearby ore vents.
To begin wave defense, you will need to hop out and scan a second time
however, so that you can properly accept the risks of drawing a horde of
bloodthirsty wildlife towards you and your companions.

Mechs can also manually process boulders, similar to mining tools using
their drill.

### Golem Tweaks
Golems, being more gentle and less aggressive than humans, while being
made out of LITERAL ROCKS, have a greater need to secure access to ores
and minerals to eat. As such, they have adapted to be able to do two new
things:

- Golems may now right click ore vents to be able to manually haul a
boulder out of the vent. This costs a hefty amount of stamina, but it
allows for golems to avoid combat during regular gameplay.
- Golems may now left click a boulder with an open hand in order to
manually process a boulder like a pickaxe. While not faster, it is
consistent and prevents golems from starving if they have access to a
vent, but no ores, somehow.

### Gulag Tweaks
The labor camp, being a camp for rehabilitation and ~~excessive manual
labor~~ has been tweaked. Boulders now replace the random minerals
located on their island, and to acquire their prizes inside, much be
excavated and then broken out of the rock. Now YOU TOO can excavate
minerals and become a true mineral hero by working your way to freedom.

### Mining Point Changes
As a result of fewer mining points being available across the map due to
the new ore spawning mechanics, and the shift in how and when ores will
be coming in, almost every progress based mining point cost has been
reduced by around 10-20%. Many numbers are still subject to change at
present, but the idea is that core progress unlocks should be made a bit
more available earlier in the round before players can start to solo or
duo larger or more difficult ore vents, after which they'll be rolling
in ores.

### Rarities
Every once in awhile, an unusual boulder will get hauled up from the
mineral rich depths of lavaland. These **Artifact boulders** can
occasionally produce rare items, but for now they've mostly just been
pulling up **Strange objects** for science. Nanotrasen Natural Sciences
department will reward you extra points to be collected by boulder
processing machines for successfully extracting one. In the future, this
opens up a passive reward space that mining can reward to the station,
like providing cytology DNA samples, ancient seeds, or other artifacts.

### Misc notes

- Boulders can be stored in all varieties of ore boxes (ground, mech)
should you choose, however as mentioned it's best to leave them where
they spawn and teleport them to the station for convenience.
- Maps that are not subject to cave generation will find that they are
largely untouched in terms of mineral balance.
- Future or existing ruins can now be tweaked to have a mineral balance
cost, as the ore vent ruin does. This will allow us to spawn in more
interesting ruins for pre-made combat challenges.
- There are unique ore vents that spawn across the map, that will summon
a boss mob relevant to that map. If the boss mob is defeated, that vent
will spawn large boulders pulling from every possible ore type that can
spawn. Not for the faint of heart!
- Similarly, the number of ore vents and mineral budget is now
adjustable in the cave generation procs, so maps may spawn with more or
less ore vents as desired for balance.
- Artifact boulders opens up a LOT of room for possible future content
like archaeology, xenoarch, artisci, and other design spaces!
- Megafauna STILL SPAWN ON THE MAP. They just happen to spawn in
addition to boss ore vents.
- **I'll add more to this as I get asked questions and remember things,
this is a huge PR and I'm confident I've missed at least something**

## Why It's Good For The Game

I outlined a lot of this in #78040, so I'll try and keep this relatively
snappy this time, while noting that I've made some concessions to make
the whole system a lot more playable while not trying to break out
design decisions that are at the end of the day, better for the game and
the overall resource balance in round.

Minerals are a very poorly balanced system, and have been since their
inception many years ago. We heavily rely on mineral balance in round,
and yet we've really only balanced it by introducing so much supply that
there's no equivalent exchange for materials that doesn't just heavily
flood the exchanged material. For example, items printed from materials
that are otherwise considered "rare" on master exist in such quantities
and they'll never practically run out in our allotted 90 minute time
slot design. This PR adjusts how ores spawn to a point where we can
minimize the amount of ores that need to exist on the map for mining to
be able to progress, while still providing enough resources for the
station that it covers the needs of the station adequately.

Miners will need to be more strategic about what resources they've
collected, and be able to make decisions about which vents are worth the
risk of attempting to fight, how to prepare for a wave defense, and when
to head back up for upgrades, while finally giving them at least some
kind of incentive to work together and use different equipment.
Resonators make cleaning up the caves around vent easy, sandbags set up
easy defenses for your vent, mechs can serve as a wider range radar
while mining, all while still providing a new gameplay loop to mining.

By limiting the amount of ores that can enter the round from the
massive, massive amounts that were coming into the round beforehand (see
#78346 ), we can make ore processing more meaningful by adding more
gameplay to the processing of minerals. I have some plans for that,
however this PR already got bloated really REALLY badly due to scope
creep and the number of intersecting systems that rammed into each other
to make this PR possible. So that'll be next. Plus, as I've mentioned,
we open up places for ore processing to find fossils, relics, and other
things that can implemented down the line.

Overall, I don't expect this PR to save or kill ore balance, but we gain
a LOT more control over it through the use of our mining defines
attached to this PR, and at the end of the day, that's a great place to
start off of.

## Changelog

🆑
add: Added ore vents. Scanning them with mining scanners shows what
minerals they contain. Scan again to fight off a horde of beasts as your
drone assistant excavates the vent, so the ore vent will produce mineral
boulders!
bal: Ores that spawn in walls now spawn based on their proximity to ore
vents, with their chance to spawn and their minerals contained scaling
from low to high.
add: Added the BRM, Refinery, and Smelter. These pieces of equipment are
used to process ore boulders into minerals for the station. Stock Part
upgrades allow more boulders to be processed at one time. They collect
mining points as well, to be redeemed with an ID card swipe.
add: Boulders are teleported to the station via the BRM if left
untouched. Boulders can also be cracked open for a reduced amount of ore
using pickaxes or golems hands.
add: All stations come equipt with a pre-excavated ore vent, which
produces a basic supply of iron and glass only. Scan other vents for
your critical resources!
add: Look there's a shit ton of changes on mining, for more detail check
out the Pull Request: https://github.com/tgstation/tgstation/pull/78524.
sound: New sounds and noises for your high octane factorio-like
gameplay!
image: All new boulder sprites for the new minerals and rocks added to
the mining gameplay loop, as well as mining machines!
image: Overlays appear over vents when scanned to let you know their
contents at a glance when actively scanned with any mining scanners.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-21 11:32:05 -05:00
LemonInTheDark
5a81631089 Reverts Canister Wiring (#80265) (#80607)
## About The Pull Request

Reverts #80265

It's a cool idea, but the ability to toggle valves/control pressure make
this just a ttv but without the access issues we tie to that.
Eats into that space way too much.

Removing those but not the rest results in disappointment, so I'm just
full removing this.
I am keeping the code quality changes, screentips, that sort of thing
tho. That bit goes hard.
Also, refactored a few procs slightly to make them easier to read. Early
returns, sane loops, etc.

## Why It's Good For The Game

Closes #80604
Cheap remote mass producible maxcaps are a bad idea actually
Sorry I didn't catch this in review, been resting for the week

## Changelog
🆑
del: Removes the wires from canisters. It's a cool idea, but cheap
controlled maxcaps are bad actually
/🆑
2023-12-28 10:35:29 +13:00
13spacemen
5d2d2a01e7 Canisters: Wires, Rigging and Screentips (#80265)
## About The Pull Request
Added 6 wires to gas canisters, accessible when you screw open the panel
Toggle valve, toggle shielding, min pressure, max pressure, eject tank,
toggle reaction suppression (only works with hypernob crystal'd
canisters)
Pulsing the wires only works if the canister has a cell

You can attach dual assembly combos to canisters too, doesn't have to be
an igniter combo, could be a prox-signaler or timer-signaler. These are
visible on the canister sprite and can be removed by right-clicking the
canister. Visible assemblies don't trigger anything inside the canister,
it's like taping it to the canister, also looks more menacing.

Also added screentips to canisters
## Why It's Good For The Game
Emergent gameplay, more possibilities with atmos automation and
contraptions, can make traps like a proximity sensor N2O canister in
maint for cult conversions, anything

AND YES EVERYTHING IS LOGGED NO STEALTH GRIEFING POSSIBLE

## Video



https://github.com/tgstation/tgstation/assets/46101244/922465b3-9f9c-4b7b-8769-fca6df3b87a3



## Changelog
🆑
add: Canisters now have wires! You can pulse wires to do various
canister functions like opening/closing the valve. Make sure it has a
cell though.
add: You can rig assembly combos (igniter-timer, prox-signaler, etc.)
onto canisters
qol: Canisters now have screentips
/🆑
2023-12-25 02:13:25 +01:00
jimmyl
fa52602e37 xenobio shield gens can be rebuilt + some code cleanup and changes (#79887)
## About The Pull Request
shield gens now have a board, cant be printed
![2023-11-22
06_49_55-Window](https://github.com/tgstation/tgstation/assets/70376633/0041d965-98ae-40a1-b36a-fd6ce15f4720)

you may now screw open an unlocked shield generator to access its sole
wire, the wire that toggles it on and off
you may also after that crowbar it if it isnt active to deconstruct

converted things to balloon alerts and some cleaning

## Why It's Good For The Game

these things just vanishing if destroyed is dumb and wiring allows for
shenanigans

## Changelog
🆑
fix: shield wall gens actually use power now
qol: shield wall gens may now be rebuilt and use some balloon alerts,
and have wiring
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-11-30 14:06:42 -05:00
Rhials
21a101bf31 Gives Cargo its own departmental wires (#79912)
## About The Pull Request

Gives Cargo its own area wires, instead of having them use the same wire
layouts as the Service areas.
## Why It's Good For The Game

Back when the original PR (#52563) was made, cargo was a weird subset of
"quartermaster" areas that must have just been swept into service. I
looked into it and to my surprise cargo just wasn't ever mentioned in
it. When the QM areas were converted to cargo areas, there weren't any
cargo wires so they probably just inherited the service wires and were
forgotten about?

Now, with the QM being a head and cargo being a more defined department
than ever, it shall receive the distinction of being called "its own
department" in the worst way possible -- by giving it its own wires.
## Changelog
🆑 Rhials
qol: Gives Cargo areas its own wire layout, instead of having it use the
same wires as Service areas.
/🆑
2023-11-24 15:23:07 -07:00
lizardqueenlexi
1b8bcd0365 Basic drones (#79109)
## About The Pull Request

Fixes #68825
Fixes #72249
Fixes #70184

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

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

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

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

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

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

## Changelog
🆑
refactor: Maintenance Drones now use the basic mob framework. This
shouldn't come with any noticeable gameplay changes, but please report
any bugs.
fix: Drones can now interact normally with electrified doors.
fix: Drones' built-in tools can no longer be placed in storage objects
and/or thrown on the floor.
fix: Drones can now perform right-click interactions correctly, such as
deconstructing reinforced windows.
fix: Drones can now reboot or cannibalize other drones without being in
combat mode.
/🆑
2023-10-21 23:36:48 +00:00
jimmyl
3e7eb56041 fixes gibtonite bomb (#79038)
## About The Pull Request



https://github.com/tgstation/tgstation/assets/70376633/8d15d7c9-51c2-4aeb-b1c6-4386168947da

i made it work slightly better too so
also this was in the code since like 2015 but it probably got broken
sometime

also 10 second detonation timer is pretty harmless anyway so

## Why It's Good For The Game

bug bad
fyi this was added in 2015
https://github.com/tgstation/tgstation/pull/8587

## Changelog
🆑
fix: making assembly activated bombs works again
/🆑
2023-10-20 07:44:27 +02:00
lessthanthree
c2fb08407a Microwave upgrades: Microwave PDA charging, power cells (#78717)
## About The Pull Request

For the hard-working tradesperson who's in the middle of nowhere and
just wants to warm up their pastry-based savoury item purchased from an
overpriced vending machine, introduces the engineer themed wireless
microwave.

No more going hungry in a pinch, this variant uses changeable power
cells instead of APC power. Can be built normally or printed with a
furnishings-upgraded RCD.

The other upgrade now available: PDA charging. Upgrade the capacitors in
the microwave to add a Charge mode for your portable device!

Also cleans up microwave code a bit and adds much needed context hints
for when it's broken, dirty, etc.
Swaps a few break room microwaves to upgraded variants on mapload, adds
a microwave/donks to Birdshot, donks to Tramstation.

## Why It's Good For The Game

Slap together a semi-portable microwave with your components on hand,
have an engineering picnic in space or wherever else the day takes you.

With increased PDA drain, adding another option to charge your PDA in
common areas is useful. Microwaves are already strategically placed
around the station. Please ensure the model you're using has the
charging feature before operating.


![image](https://github.com/tgstation/tgstation/assets/83487515/22abdbea-57bf-41d8-903c-6af5b6827bed)

![image](https://github.com/tgstation/tgstation/assets/83487515/7b5d0f21-df7c-4b33-8798-7ea57c0e3561)

## Changelog

🆑 LT3
add: Introducing Nanotrasen Wave! A Nanotrasen exclusive, Waveallows
your PDA to be charged wirelessly through microwave frequencies. You can
Wave-charge your device by placing it inside a compatible microwave and
selecting the charge mode.
add: Microwaves can be upgraded to add wireless charging
add: Cell-swappable microwave for the engineer on-the-go
add: Microwave now has a wire to swap charge/cook modes
add: Furnishings RCD upgrade now includes wireless microwave
add: Tramstation and Birdshot engineering break rooms now have microwave
and donk pockets. Some microwaves come pre-equipped with wireless
charging and an upgraded cell.
fix: The microwave in the snowdin ruin is now real, not a fluff prop
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-10-12 00:43:10 +02:00
Emmett Gaines
e8d12b29fe Removes all spawn locations of the awakened plush except the bus ruin (#78559)
It's supposed to be a coderbus easter egg, stop putting it elsewhere. I
want it to stay rare enough that it confuses people when it makes it to
the station.

The secure closet had it on the loot table and due to how that's coded
it has to have something replace the slot (or rework the loot spawning
code there) so I put a live bomb in the slot instead.

🆑 ninjanomnom
del: An easter egg plushie that was spawning where it shouldn't has been
brought back home.
add: The secure closet can now spawn live gibtonite, enjoy your free
bomb.
/🆑
2023-09-30 04:31:50 +02:00
Teagarden
c7a33df99b Buildable mass drivers (#78360)
## About The Pull Request
Adds the ability to build mass drivers, you activate them by attaching a
signaler to their launch wire. They also have a safety wire, that when
pulsed, increases the power of it. To reset the power back to normal you
cut the safety wire. This is mostly just a port of
https://github.com/BeeStation/BeeStation-Hornet/pull/5563

## Why It's Good For The Game

Less weird unique machines, and you can do some interesting stuff with
mass drivers, like traps, cannons, and many other interesting things.

## Changelog

🆑
add: mass drivers are now buildable, you activate them by attaching a
signaler to their launch wire, and can increase their power by pulsing
the safeties wire, and reset it back to normal by cutting the safeties
wire.
/🆑
2023-09-18 14:13:19 +02:00
Bloop
69f51c6c65 Fixes typo 'transfered', olive oil reaction repath (#78064)
## About The Pull Request

Transferred.

## Why It's Good For The Game

How did this get to be in 71 files?! This bothers me.

Also changes 'quality_oil' typepath in the reactions to 'olive_oil' to
match its rename post-foodening.

## Changelog
N/A
2023-09-02 18:23:18 +01:00
SyncIt21
b94173c110 Machines don't deconstruct themselves when detaching a signaller (#77788)
## About The Pull Request
Fixes #77768

1. Signallers are now removed from the machine's component parts so they
don't deconstruct the machine when moved out of the objects contents via
Detach in the wires UI
2. Adds type check for signallers inside the machines
`dump_inventory_contents()` so it does not get moved out for e.g., when
a microwave has finished cooking

## Changelog
🆑
fix: you can detach signaller from wires without the machine
deconstructing itself
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-21 13:51:38 +00:00
Andrew
2d34c7433a New Mech UI and equipment refactor (#77221)
![bWJlVIDO53](https://github.com/tgstation/tgstation/assets/3625094/d75030b5-59e9-43f6-96b4-1b7564caceef)

## About The Pull Request

Made a new UI and refactored some mech code in the process.

Fixes #66048
Fixes #77051
Fixes #65958 ??? if it was broken
Fixes #73051 - see details below
Fixes other undocumented things, see changelog.

## Why It's Good For The Game

The UI was too bulky and Mechs were too complex for no reason. 
Now they follow some general rules shared between other SS13 machinery,
and there is less magic happening under the hood.

## Detailed Changes

### New Mech UI, Air Tank and Radio as separate modules

Previous UI for comparison:

<img alt="9SScrXAOjy"
src="https://github.com/tgstation/tgstation/assets/3625094/904e3d07-e7d7-4d3a-a062-93e0e35b4b66">

Previously mechs came with radio pre-installed and air canisters
magically pre-filled with air even when you build one in fab.
Radio and Air Tanks are now both utility modules that are optional to
install. Gas RCS thrusters still require Air Tank module to operate.

This made the Mechs more barebones when built, giving you only the basic
functionality.

<img alt="5SDMlXTJxv"
src="https://github.com/tgstation/tgstation/assets/3625094/b9364230-49ac-416b-aa70-e851fbf2050e">

To compensate this change, all mechs got two extra utility module slots.

All other modules got new UI. And ore box now shows the list of ores
inside.

<img alt="SRX5FjvsHA"
src="https://github.com/tgstation/tgstation/assets/3625094/cbe2e98d-1cd4-4667-8dae-2f9227b4b265">

### Mounted Radio

Works as a normal radio, but with subspace transmission. Available from
the basic mech research node and can be printed in fab.

### Cabin Sealing

To compensate for the lack of air tank by default, mechs with enclosed
cabin (e.g. all except Ripley) got an ability to toggle cabin exposure
to the outside air. Exiting the mech makes cabin air automatically
exposed.

When you seal the cabin, it traps some of the outside air inside the
cabin and you can breathe with this air to perform a short space trips.
But the oxygen will run out quickly and CO2 will build up.

Sealing the cabin in space will make the cabin filled with vacuum, and
it will stay there until you return to air environment and unseal the
cabin, letting the breathable air to enter. There are temperature and
pressure sensors that turn yellow/red when the corresponding warning
thresholds are reached.

You could also use personal internals in combination with cabin sealing
for long space travels, so Air Tank is completely optional now and
mostly needed when you need RCS thruster.

### RCS thrusters

They are now available earlier in tech tree and consume reasonable
amount of air (5 times more than human jetpacks), and they don't work
without Mounted Air Tank, unless it's an Ion thruster variant.

### Mounted Air Tank

Available from the basic mech research node and can be printed in fab.
Built model comes empty, and syndicate mechs come with one full of
oxygen.

<img alt="GrFDrH5Hwe"
src="https://github.com/tgstation/tgstation/assets/3625094/b677b705-bda0-4c8c-96c7-d32bf7bf9f28">

Can be switched to pressurize or not pressurize the cabin. Releases gas
only when the cabin is sealed shut. Starts releasing automatically, but
can be toggled to not release if you want to use it just as a portable
canister.

Cabin pressure can now be configured in the module UI instead of
Maintenance UI.

Can be attached to a pipe network when the mech is parked above a
connection port.

Comes with a pump that works similarly to the portable pump. It lets you
vent the air tank contents outside, or suck air from the room to fill
the air tank. Intended to provide an ability to fill the air tank
without the need to bother with pipes.

Also has gas sensors that display gas mix data of the tank and the cabin
(when sealed).

### Stock part changes

All mechs now require a servo motor and they reduce mech movement power
consumption instead of scanning module.

Scanning modules are optional for mech operation (still required to
build) and the lack of one disables the following UI elements:

- Display of mech integrity (you can still see the alerts or examine the
mech to get rough idea)
- Display of mech status on internal damage (and you can't repair what
you can't diagnose)

The rating of scanning module doesn't have any effect as of now.

Cargo mech comes without it roundstart.

<img alt="2vDtt99oqb"
src="https://github.com/tgstation/tgstation/assets/3625094/147144ca-824e-4501-acf5-6ee104f309e7">

Capacitors now also reduce light power usage and raise the overclocking
temperature thresholds (see below).

### Maintenance

Maintenance UI removed, and its logic migrated to other places.

Access modification now managed inside the mech, and anyone who can
control the mech, can adjust the access in the same way as they can set
DNA key.

To open the maintenance panel you just need a screwdriver. It is instant
when the mech is empty and it has a 5 second delay when there is an
occupant to avoid in-combat hacking and part removal. It will alert the
occupant that someone is trying to tinker with their mech.


![image](https://github.com/tgstation/tgstation/assets/3625094/1abfca3c-8ba9-44b0-913c-c209564b91fd)

Once the panel is open, you can see the part ratings:


![image](https://github.com/tgstation/tgstation/assets/3625094/404f95bb-9f74-4e5b-a975-5ab6f74bdfa9)

With open panel you can hack the mech wires (roboticists can now see
them):

<img alt="mj205G2qDa"
src="https://github.com/tgstation/tgstation/assets/3625094/44cea0d1-44b4-4b50-b1d3-a97c0056bab3">

There are wires for:
- Enabling/Disabling ID and DNA locks
- Toggling mech lights
- Toggling mech circuits malfunction (battery drain, sparks) 
- Toggling mech equipment malfunction (to repair after EMP or cause
EMP-like effect, disarming mech)
- 3 dud wires that do nothing

The hacker may be shocked if the mech power cell allows.

When the panel is open and the user has access to the mech, they can
remove parts with a crowbar:

<img alt="jR40gyTWtJ"
src="https://github.com/tgstation/tgstation/assets/3625094/b573f5b9-b8ea-412e-b3e0-c872e01e0c23">

Hitting the mech with an ID from outside now toggles the ID Lock on/off
if the ID has sufficient access.

### Power consumption and overclocking

Rebalanced mech power consumption. T4 parts were not working in
Syndicate Mechs, as their effect was not calculated until you manipulate
parts manually. Constructed mechs with t1 parts even had their energy
drain reduced with upgrade to t1.

Now all mechs apply their base step power usage correctly don't ignore
the stock parts.

Servo tier now reduces base power consumption by 0% at t1, 50% at t2,
33% at t3 and 25% at t4
Capacitor tier now reduces base power consumption of mele attacks,
phasing and light by the same amounts.

Gygax leg actuators overload replaced with mech overclocking. Any mech
can be overclocked by hacking wires, but only Gygax has a button for
toggling it from the Cabin.

Now there is an overclock coefficient. 1.5 for Gygax and other mechs, 2
for Dark Gygax.

When overclocked, mechs moves N times faster, but consumes N times more
power.


![image](https://github.com/tgstation/tgstation/assets/3625094/01e285fd-6fd6-4558-8277-2ed3abf474d8)

While overclocked, mech heats up every second, regardless of movement,
and starts receiving internal and integrity damage after a certain
temperature threshold. The chance is 0% at the threshold, and 100% at
thresholds * 2. The roll happens every tick. Capacitor upgrades this
threshold, letting you overclock safely for longer periods.


![image](https://github.com/tgstation/tgstation/assets/3625094/80d90cea-0d20-4054-9369-a47deb6f52f2)

When you stop overclock, the temperature goes back down.

### Other changes and fixes

Concealed weapon bay now doesn't show up when you examine the mech, so
it's actually concealed now.

New radio module can properly change its frequency, as it didn't work
for previous radio.

Launcher type weapons were ignoring cooldowns and power usage, so you
could spam explosive banana peals, while they should have a 2 second
cooldown:
<img alt="q5GjUsHwGr"
src="https://github.com/tgstation/tgstation/assets/3625094/d102725d-e9e1-4588-9d6c-b9e38b7a6535">

Now this is fixed and all launcher type weapons properly use power and
have their cooldowns working.
And now they have the kickback effect working (when it pushes you in the
opposite direction in zero gravity on throw).

Thermoregulator now heats/cools considering heat capacity instead of
adding/reducing flat 10 degrees. So you can heat up cabin air quicker if
the pressure is low.

There were some other sloppy mistakes in mech code, like some functions
returning too early, blocking other functionality unintentionally. Fixed
these and made some other minor changes and improvements.

## Changelog

🆑
refactor: Refactored Mech UI
refactor: Refactored mech radio into a utility module, adding extra slot
to all mechs
refactor: Refactored mech air tank into a utility module with an air
pump, adding extra slot to all mechs
refactor: Refactored mech cabin air - there is now a button to seal or
unseal cabin to make it airtight or exchanging gases with the
environment
refactor: Removed mech maintenance UI Access is set in mech UI, and
parts are ejected with a crowbar
add: Mech now has wires and can be hacked
qol: Roboticists now can see MOD suit and mech wires
add: Mechs now require servo motor stock part and it affects movement
power usage instead of scanning module
add: Scanning module absence doesnt block mech movement and hides some
UI data instead. Big Bess starts without one.
qol: Hitting mech with ID card now toggles ID lock on/off if the card
has required access
fix: Fixed concealed weapon bay not being concealed on mech examine
fix: Fixed mech radio not changing frequency
fix: Fixed mech launcher type weapons ignoring specified cooldown
fix: Fixed mech launcher type weapons not using specified power amount
fix: Fixed mech temperature regulator ignoring gas heat capacity
fix: Fixed mech stopping processing other things while not heating
internal air
fix: Fixed mech being able to leave transit tube in transit
fix: Fixed mech internal damage flags working incorrectly
fix: Fixed Gygax leg overloading being useless
fix: Fixed mechs ignoring their stock parts on creation. Syndicate mechs
now stronger against lasers and consume less energy on move. Upgrading
from tier 1 to tier 2 doesn't make mech consume MORE energy than before
the upgrade.
balance: Rebalanced mech energy drain with part upgrades. Base energy
drain reduced by 50%, 33%, 25% with upgrades and applies to movement
(Servo rating), phasing, punching, light (Capacitor rating).
balance: Hydraulic clamp now can force open airlocks
balance: Made mech RCS pack consume reasonable amount of gas
code: Fixed some other minor bugs and made some minor changes in the
mech code
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Sealed101 <cool.bullseye@yandex.ru>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-08-15 18:02:28 +01:00
Ghom
5d5492e111 Implements usage of the REVERSE_DIR macro throughout the code. (#77122)
## About The Pull Request
Replaces a ton of `turn(dir, 180)` calls with the aforementioned macro.

## Why It's Good For The Game
Afaik, `REVERSE_DIR` was coded to be faster than the classic `turn(dir,
180)` call, being a simple set of binary operations. To sum it up, micro
optimization.

## Changelog

N/A
2023-07-28 15:16:09 +02:00
Jacquerel
14aef72a4a No roundstart playable MULEs / Trampling requires hacking (#76837)
## About The Pull Request

Prevailing feedback has been:
- The player base cannot be trusted to control MULEbots.
- It should be clearer what bots can and can't do.

The former is easy to fix.
The latter is sort of a matter for policy but I'm going to investigate
giving bots a rudimentary laws system. Plus that sounds much more
controversial than this so I am going to atomise this outside of that
PR.

MULEbots can still be set to allow sentience by cargo technicians, but
don't start that way.

ADDITIONALLY this PR just changes it so that MULEbots do not crush
people unless:
- They have been emagged.
- Their safety wire has been cut.
Either means works, so it's not too hard to access for nefarious
purposes, but hard to do to yourself.
Otherwise they just slow down for a few seconds instead.

Also fixed an unrelated name bug while I was there.

Closes #76926

## Why It's Good For The Game

Players would take them, not deliver any cargo, and repeatedly ask
people to lie down in front of them.
Plus Tram has 5 of the things which is frankly too many to be wandering
around the bar.

## Changelog

🆑
balance: You can't possess a MULE as soon as the round starts, someone
will have to give you permission.
balance: MULEbots no longer crush prone characters unless they have been
hacked (or emagged).
fix: Bots can put numbers in their names, what with being robots.
admin: Adds attack logging when certain wires are cut (for instance:
MULEbot safeties)
/🆑
2023-07-19 10:01:58 +02:00
LemonInTheDark
830d2e50b4 Fixes some stupid airlock sleeps (#75961)
## About The Pull Request

[A common problem with explosions is an overabundance of
sleeping](6499077a09)

In an attempt to solve this issue, let's not continue to sleep and do
work in door closing if the door is already deleted

(This is caused by firelocks activating due to other adjacent objects
deleting, triggering an atmos update, and closing the firelocks before
they get bombed. I don't have a elegant way of resolving that core
problem, so let's just minimize the impact)

[Nukes a stupid sleep loop in airlock
code](5b16360520)

When an airlock was depowered, it would enter a sleep loop, decrementing
its delay by 1 second every well, one second, so long as it had the
right wires flipped
This is very stupid

Instead, let's use signals off wire changes and a combo of timer and
remaining time var to do this with JUST a timer

Most of the changes here are just swapping over wires to a setter to
make signal registration work\

## Why It's Good For The Game

Less sleeping around explosions means less dropped ticks after a bomb
goes off. Good just in general
Also this excises dumb boomer code and adds some hooks for other devs to
use (we should use wires more man)
2023-06-19 02:18:48 +00:00
SyncIt21
8b67c85d89 Machine's correctly eject signaller's attached to it's wires (#75928)
## About The Pull Request

Fixes #72053
the signaller is made part of the machine's `component_parts` now so it
doesn't get moved out when `dump_inventory_contents()` is called like in
the case of microwave when it has finished cooking
This fix also applies for other machine's that call this proc

Fixes #72132
Clear's out the `holder` & `connected` vars from the signaller when the
wire's get destroyed allowing the signaller to be picked up

## Changelog
🆑
fix: microwave's(after it has finished cooking) & other machine's that
spit out contents don't spit out assemblies/signallers attached to it's
wires.
fix: signallers can be picked up if you attached them to a machine's
wire & later deconstructed that machine without detaching it first.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-06-14 09:35:36 -07:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
GuillaumePrata
9b9c93e21d Air alarms will now talk about their problems (#75315)
## About The Pull Request
This PR makes air alarms state atmos issues they are dealing with.
Simple Low/high pressure/temperature messages will be said every 10
seconds if there is something going on with the air alarms.

Similar to how vending machines do slogans for their products.

I didn't add any check for particular gases because it looked
unnecessary, but it is trivial to add more into the system.

It now has a speaker wire, so a way to disable audible spam while
letting the air alarm detect issues if you need this for an atmos
project.
## Why It's Good For The Game
![talking
alarm](https://github.com/tgstation/tgstation/assets/55374212/57b11efb-91b1-4459-9769-0aef1fb9bbed)
Base message as example, it changes into "Danger! Low pressure
detected." and similar.

This lets players know what the issue is on a room easier, specially
helpful for new players that might not understand atmos enough.

The only other option to getting this information is atmos equipment
like the ranged gas analyzer, being a Silicon to check the air alarms
from range or walking to the air alarm, which new or ill equipped won't
do.

Something, something, atmospherics is an eldritch beast with a big
barrier of entry on not only playing the job, but just understanding the
basic system, hopefully this cuts one tail of this mysterious creature.

And I just think talking machinery is cute!
## Changelog
🆑 Guillaume Prata
add: Air alarms will now talk about their atmospheric problems (low/high
pressure/temperature) so players can understand what is the room's issue
easier.
/🆑

---------

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2023-05-28 03:00:03 +00:00
Jordan Dominion
0a8b0334d0 Fix SHOULD_NOT_SLEEP hit in airlock wires on_cut() (#75240) 2023-05-08 13:54:59 -05:00
Helg2
190786c616 Adds helpers for apc. (#74651)
## About The Pull Request
I asked someone in discord if it was worth it, they said it was, from
what i remember at least.

## Why It's Good For The Game
More comfort with apc's for mappers.

---------

Co-authored-by: san7890 <the@san7890.com>
2023-04-15 21:35:22 -06:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

This took a while to do, but here's the gist:

Python file now regexes every file in `/code` except for those that have
some valid reason to be tacking on more global defines. Some of those
reasons are simply just that I don't have the time right now (doing what
you see in this PR took a few hours) to refactor and parse what should
belong and what should be thrown out. For the time being though, this PR
will at least _halt_ people making the mistake of not `#undef`ing any
files they `#define` "locally", or within the scope of a file.

Most people forget to do this and this leads to a lot of mess later on
due to how many variables can be unmanaged on the global level. I've
made this mistake, you've made this mistake, it's a common thing. Let's
automatically check for it so it can be fixed no-stress.

Scenarios this PR corrects:

* Forgetting to undef a define but undeffing others.
* Not undeffing any defines in your file.
* Earmarking a define as a "file local" define, but not defining it.
* Having a define be a "file local" define, but having it be used
elsewhere.
* Having a "local" define not even be in the file that it only shows up
in.
* Having a completely unused define*

(* I kept some of these because they seemed important... Others were
junked.)
## Why It's Good For The Game

If you wanna use it across multiple files, no reason to not make it a
global define (maybe there's a few reasons but let's assume that this is
the 95% case).

Let me know if you don't like how I re-arranged some of the defines and
how you'd rather see it be implemented, and I'd be happy to do that.
This was mostly just "eh does it need it or not" sorta stuff.

I used a pretty cool way to detect if we should use the standardized
GitHub "error" output, you can see the results of that here
https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792
## Changelog
Nothing that really concerns players.

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
Capsandi
dfacb7d1c2 Adds a second boom wire to payload bombs. (#73021)
## About The Pull Request

Adds a second detonation wire onto payload bombs, bringing the total
number of wires to 6.

## Why It's Good For The Game

As it stands, there are two wires capable of neutralizing the bomb in
most circumstances and one detonation wire. Unbolting a bomb from the
floor and spacing it is as effective a solution to a bomb as defusing it
until the explosion is imminent (You can tell by the lack of defusals
which are performed once the bomb can be moved). Even unbolting it with
10 seconds to spare gives the crew a great deal of control over where
the explosion occurs. This itself isn't an issue because shoving a bomb
out into space and hearing it explode off screen is pretty badass.
The issue is that with 2 wires capable of more or less defusing the bomb
and 1 which causes the explosion, you have a 2/3 chance to save the day
while blindly cutting wires. A second wire brings these odds to a
thrilling 50/50!
The proceed wire used to detonate the bomb when cut but will now disable
the examinable countdown timer, leaving only the beeping to indicate how
close the bomb is to exploding. This is reset once the defusal wire is
cut.

## Changelog

🆑
balance: There's a second detonation wire on payload bombs now.
balance: Cutting the proceed wire no longer detonates the bomb but
instead deactivates the countdown timer on examine. This is reset once
the bomb is defused
/🆑
2023-02-07 09:28:43 +13:00
vincentiusvin
af4333bc47 Refactor air alarm TLV and modes. (#72315)
## About The Pull Request
#65902 but with a lot of fat trimmed.
Ditched the lazy initialization thing since the memory gains isn't worth
the increased code complexity.
Ditched the vent bitflag changes, that will come in the future maybe.
Ditched the thermomachine and alarm resubtyping. Will also maybe come in
the future.

Added the operating mode datums so we can reduce the amount of code in
the main air alarm page. The datums lets us write tidier code too.

Scope is much much more limited than the old PR. The diffs are mostly
just me splitting and moving the files around. Things to pay attention
to are:
- `_air_alarm.dm`'s UI procs and things that deals with TLV and modes.
- `air_alarm_variants.dm`'s coldroom and server room numbers
- `air_alarm_thresholds.dm`
- `air_alarm_modes.dm`

Smaller changes on:
- `air_alarm_interact.dm` should be untouched except for one select_mode
call.
- `air_alarm_circuit.dm`'s also untouched except the part that deals
with TLV and modes
- `wires/air_alarm.dm`'s also untouched except for the panic siphon
wire.

<details>
<summary>Images</summary>
<img
src="https://user-images.githubusercontent.com/54709710/209765698-47bd2564-cc6a-4829-9418-97d8814d9f7a.png"/>
<img
src="https://user-images.githubusercontent.com/54709710/209765764-7f59fa2d-66ad-4bc6-8687-a1024898823c.png"/>
<img
src="https://user-images.githubusercontent.com/54709710/210332278-17d286fe-6d78-44f2-ac6f-77deb0dac92e.png"/>
</details>

## Why It's Good For The Game
Cleaner code for the backend, static typing for the frontend, bugfixes.
New UI for the threshold thing.

## Changelog
🆑
qol: made the threshold page of air alarm use colloquial terms instead
of code terms. Added reset and disable buttons.
qol: Air alarm's gas breakdown now displays the moles, percentage, and
partial pressure.
fix: operating mode selection in air alarm will be red if the selected
mode is dangerous.
fix: fixed the area atmosphere alarm button on air alarm not working.
code: told the game that hyper nob isn't dangerous.
refactor: refactored the threshold values and operating mode of air
alarms in the backend. No changes expected except the ones stated above.
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-01-06 12:31:17 -08:00
MrMelbert
acb96fee1d Refactors memories to be less painful to add and apply, moves memory detail / text to memory subtypes. Adds some new memories to demonstrate. (#72110)
## About The Pull Request

So, a huge issue with memories and - what I personally believe is the
reason why not many have been added since their inception is - they're
very annoying to add!

Normally, adding subtypes of stuff like traumas or hallucinations are as
easy as doing just that, adding a subtype.

But memories used this factory argument passing method combined with
holding all their strings in a JSON file which made it just frustrating
to add, debug, or just mess with.

It also made it much harder to organize new memories keep it clean for
stuff like downstreams.

So I refactored it. Memories are now handled on a subtype by subtype
basis, instead of all memories being a `/datum/memory`.

Any variety of arguments can be passed into memories like addcomponent
(KWARGS) so each subtype can have their own `new` parameters.

This makes it much much easier to add a new memory. All you need to do
is make your subtype and add it somewhere. Don't need to mess with jsons
or defines or anything.

To demonstrate this, I added a few memories. Some existing memories had
their story values tweak to compensate.

## Why It's Good For The Game

Makes it way simpler to add new memories. Maybe we'll get some more fun
ones now?

## Changelog

🆑 Melbert
add: Roundstart captains will now memorize the code to the spare ID
safe.
add: Traitors will now memorize the location and code to their uplink.
add: Heads of staff winning a revolution will now get a memory of their
success.
add: Heads of staff and head revolutionaries who lose their respective
sides of the revolution also get a memory of their failure.
add: Completing a ritual of knowledge as a heretic grants you a quality
memory.
add: Successfully defusing a bomb now grants you a cool memory. Failing
it will also grant you a memory, though you will likely not be alive to
see it.
add: Planting bombs now increase their memory quality depending on how
cool the bomb is.
refactor: Memories have been refactored to be much easier to add.
/🆑
2023-01-03 11:23:31 -08:00
Tim
f6caf9a008 Add language variety to machines that speak (#71643)
## About The Pull Request
This builds on #70278 by giving other machines (vendors, newscasters,
computers, etc.) the ability to speak different languages. If the
station "Bot language malfunction" trait is rolled, then these machines
will select a random race starting language. If a machine is EMP'd then
it has a chance to change the language. There is also a language wire
that can be pulsed to change the language for vending machines.

Default language for machines is galactic common, but there are rare
exceptions:

- Beach vendors will now speak beachbum
- Syndicate vendors will now speak codespeak
- Changeling vendors will now speak a random language after each slogan 

## Why It's Good For The Game
More depth to the language feature.

## Changelog
🆑
add: Add language variety to machines that speak. You can also pulse the
vendor language wire to make it switch languages or EMP a machine to get
the same effect.
add: Shambling cola vendors will now speak a different language each
time they talk. Syndicate vendors will now speak codespeak. Beach
vendors will now speak beachbum.
/🆑
2022-12-21 14:18:52 -08:00
Mothblocks
2e6b06353d Atmospheric machineries now interact with each other directly, rather than going through a radio layer -- saves about 0.4s of init time (#71232)
More than a decade ago, these were all coded to use a weird dynamic list
radio broadcasting system to communicate with each other. If there was
any depth that they were planning on creating with this, it didn't come
to fruition, and it instead just wasted a lot of init time.

Removing `post_signal` saves 198.41ms, fired 588 times from lots of
different machinery. Its self cost was 81.44ms.

`broadcast_status`, also removed, was taking 218ms.

I'm pretty sure I'm done with this, but it's hard to tell given the
nature of old radio signal code.

A small self cost of 34.9ms was added in the form of /obj/Initialize
checking id_tag to set in a global list. This could be optimized away by
tagging everything that does use id_tag, but it's a loooot and I think
this is just a useful mechanism to have. Not worth it IMO.

The "Check Atmos Chamber Devices" verb has been removed. Everything it
did *should* be replicated by runtimes on Initialize, which is both more
obvious to mappers and shows up in unit tests since we spawn every ruin.
2022-12-02 01:28:24 -08:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
antropod
372227bc56 Fix assemblies not pick-upable after detaching from chemical grenade (#70956)
Assemblies (signallers, mousetraps, timers, etc.) can be picked up again after detaching from chemical grenade
2022-11-02 14:31:52 -05:00
SuperSayu
94cbfb30c3 Various assembly fixes. (#69772)
About The Pull Request

Fixes #69043 assemblies not providing a UI when part of a one-tank bomb. (This doesn't count voice analyzers, which don't have UI)
Fixes #68139 assemblies triggering themselves (and often turning themselves off).
Fixes timers ceasing to loop if the timer is set to less than the 3-second anti-spam threshold.
#69335, #68733 signalers occasionally runtiming due to qdel'd weak reference datums. Already addressed by another PR
Proximity sensors and mousetraps work on more wire datums, but proximity sensors are still buggy.
Igniter-sensor pairs can detonate fuel tanks properly, including plumbed fuel tanks. Fuel tank explosions scale with how much fuel is in them; this is slightly nerfed from existing values.

The fuel tank detonation code has been made generic, but other reagent dispensers have rigging turned off. If turned on with a varedit, you can rig and detonate water and other reagent tanks. Reagent tanks can theoretically both explode and spread reagents if it should happen to contain both welding fuel and other stuff. I have not actually tested this part of it, but I have detonated both water tanks and fuel tanks and each works correctly.

In making mousetraps work on wire datums, I had the opportunity to make it so that you could place a mousetrap in a door's wire and it would activate when someone passed through the door (useful to bolt a door open when someone authorized goes through, for example). This is a fun mechanic but does not make sense for a simple mousetrap to be so powerful, so it is disabled. Ideally, you could put the laser tripwire in a door's wires to do the same thing, but that would be a massive rework. Mousetraps still work in on-found mode for all wire datums, and will work on items with wiring datums (like C4 and chem bombs) when stepped on.

The signaler runtimes were a result of weak_ref datums being deleted, and the communications system not handling that. It's probably not ideal to run null checks in the post_signal loop, but I am not going to worry about it.

Many of the assemblies were not properly registering when the assembly holder was attached to an item. This was most important for proximity sensors, but that also has other problems that I haven't been able to track down.

The problem with UI not appearing was a result of the transition to TGUI however long ago that was; the proc that assures TGUI that you have the right item needed to be aware of one-tank bombs and similar, or else when you pass along an interact request it says "but you can't see it" and ignores you.
Why It's Good For The Game

Bugfixen.

The thing with the reagent dispensers only got this complicated when I realized that the plumbed fuel tank variant wasn't a subtype and therefore couldn't be rigged. And then... I basically just scaled it because the flat scale no matter the contents of the tank offended me. You could wrench open tanks, drain them entirely of fuel, rig them, and they would still go off like a pile of dynamite.

I used to have code in my branch that turned chem bombs into variants depending on the trigger, with mousetraps being mines for example. That's honestly the main reason I went out of my way to make mousetraps work better as assemblies. I could wish it were better supported, but mousetraps on grenade wiring will have to do for now.
Changelog

cl
balance: Welding fuel tank explosions have been scaled slightly down and require the fuel tanks to actually be full of welding fuel
fix: You can detonate welding fuel tanks with an igniter-sensor assembly
fix: You can reach your one-tank bomb's assembly controls by activating the item in your hand.
fix: Certain assemblies should no longer turn themselves off.
fix: Clumsy fools handling a mousetrap-based multi-part assembly may set it off by accident
/cl
2022-09-30 13:07:02 +13:00
san7890
532037aa13 Adds the installed message phrase for voice analyzers to logging (bonus runtime fix) (#70066)
* Adds the installed message phrase for voice analyzers to logging

Hey there,

Sometimes, it's CBT to figure out what exactly made a bomb go off, especially when a voice analyzer is involved. Now, when a voice analyzer is involved in TTV Bomb/Grenade explosions (already logged), it will also output the recorded phrase when present.

To do this, I just span up a quick `isvoice()` macro define to ensure that we would get the variable, and it would just append the message that we were already spitting out into logs. I rewrote how grenade logs currently operate a bit, let me know if I accidentally omitted something critical.
2022-09-22 20:57:05 -07:00
Marina
fcaa0b24db Alphabetized, fixed spelling error, clarifying event descriptions. Polish (#69707)
About The Pull Request

Alphabetized several long lists of strings so its easier for us to look through them, just code polish, nothing the players would see.

Fixed some minor spelling errors as well.

Clarified door bolt state to be less ambiguous in the door wiring gui.
Originally it would say the door bolts have fallen, and the door bolts "Look up". i dont know about you but that was very not clear for me to read. Like where are the bolts? In the door or the frame? Arnt there bolts on top and bottom? Just didn't make sense to me.

Now it says "Have engaged!" & "Have disengaged"
hopefully that makes the state clearer at a glance.

I also added a small handful of funny texts to some string files. See changelog
Why It's Good For The Game

Well, who doesn't like a bit of polish? Just makes the game a little easier for people.
Also funny text funny text.
Changelog

spelling: improves spelling and adds more flavortext
2022-09-11 21:51:01 +12:00