Commit Graph

328 Commits

Author SHA1 Message Date
die
0204ab8fdd Canreach refactor (#93165)
## About The Pull Request
ports https://github.com/DaedalusDock/daedalusdock/pull/1144
ports https://github.com/DaedalusDock/daedalusdock/pull/1147

full credit to @Kapu1178 for the juice

instead of `reacher.CanReach(target)` we now do
`target.CanBeReachedBy(reacher)`, this allows us to give special
behavior to atoms which we want to reach, which is exactly what I need
for a feature I'm working on.
## Why It's Good For The Game
allows us to be more flexible with reachability
## Changelog
🆑
refactor: refactored how reaching items works, report any oddities with
being unable to reach something you should be able to!
/🆑
2025-10-07 20:28:59 +02:00
Leland Kemble
c53286a625 Changes bolt light wire to feedback wire, which disables both lights and feedback sounds (#92950)
## About The Pull Request

Changes the "Bolt Lights" wire to a "Feedback" wire, which as well as
disabling the door's lights also disables the deny access sound. Sounds
that happen because the door is actually moving or bolting are
unchanged.

## Why It's Good For The Game

closes #65244
Justification is mostly in mentioned issue, primarily the accessibility
issue of denied door feedback being sound-only when the lights are cut.
Also, "Bolt Lights" is just inaccurate, as it controls all of the lights
on the door.

## Changelog
🆑

balance: The "Bolt Lights" wire is now the "Feedback" wire, and controls
both lights and sounds for the airlock.

/🆑
2025-09-15 17:38:24 -04:00
Aliceee2ch
35dba8dad8 Fixes multitool/wirecutters interaction with mechs (and wires) (#92821)
## About The Pull Request

hi

## Changelog

🆑
fix: Fixed wires interaction and fixed mech multitool/wirecutters
interaction.
/🆑
2025-09-07 11:37:16 +02:00
SyncIt21
0b6101a37e General maintenance for vending machines (#91987)
## About The Pull Request
**1. Code Improvements**
- Removed unused vars `coin`, `bill` & other stuff
- Removed duplicate definition of `on_deconstruction()`
- Autodoc for a lot of procs
- Merged smaller procs into larger ones to avoid scrolling in the code
editor & reduced overhead
- Split the vending machine file into several smaller files for easy
code management

**2. Qol**
- Implemented vending machine ads. They now display random stuff on the
UI


https://github.com/user-attachments/assets/9720ea60-f268-4ca2-940d-243e3d0ac75f
- More error messages for custom & normal vendors as to why an item
could not be loaded
- Custom vending machines can be deconstructed safely via crowbar
without any explosion only after unlinking your account from the machine
else you get the same explosion. Upon deconstruction all loaded items
are moved into its restock canister meaning the machine can be safely
moved with all its products just like a regular vending machine to a new
location

**3. Fixes**
- Fixes #81917. Any returned items in the vending machine now show up as
free in the UI & won't cost credits to buy them
- Fixes #87416. Custom & normal vendors now keep track of products
removed via `Exited()` so the UI gets always updated
- Fixes #83151. Items with different names & custom prices now show up
in unique rows
- Fixes #92170 Custom vendors now show the correct icon for inserted
items
- Closes #80010. From the above fix this situation is impossible so it's
safe to close this as a duplicate
- Closes #78016 same problem as above with `Exited()` duplicate
- Custom vendors can now actually be used by players who are not the
owner instead of locking down the UI
- Vending machines keep track of `max_amount` of stocked items by hand
as well & not just RPED

**4. Refactor**
- Separates custom vending machine code from normal vending machine
code. This prime Marely focus on the `vending_machine_input` list which
now only exists inside the custom vending machine
- Compressed the UI code for vending machine so both custom & normal
vending machines can send the same data instead of separating the 2.
Overall less code
- Moved attack chain from `attackby()` to `item_interaction()` for
loading items

## Changelog
🆑
code: cleaned up vending machine code
qol: vending machines now have more product slogans you never heard
before
qol: custom & normal vending machines now have more feedback on why an
item could not be loaded
qol: vending machines now display random ads on the UI
qol: custom vending machines can be deconstructed via crowbar safely
only after unlinking your account from the machine.
qol: upon deconstructing a custom vendor all its products are moved into
its refill canister & it will be restored when reconstructing the
machine elsewhere
fix: Returned items to the vending machine now show up as free in the UI
and won't be greyed out if you don't have credits to get them back
fix: items that leave the vending machine by any means will update the
UI in all cases
fix: loading items by hand to the vending machine now respects the
max_amount for that category
fix: custom vendors can now actually be used by players who are not the
owner thus enabling them to transfer credits to the owner during
purchases & basically they do their job again
fix: custom vendors now show the correct icon for inserted items
fix: Items with different names & custom prices now show up in unique
rows in custom vendors
refactor: separated custom & normal vending machine code. Reduced UI
code & improved attack chain
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2025-08-11 14:37:13 +02:00
MrMelbert
b19160619e Fire alarm attackby + screentips + new wires (#91569)
## About The Pull Request

1. Adds 4 wires to fire alarms

trigger - triggers the fire alarm on pulse, disables trigger on cut
reset - resets the fire alarm on pulse, disables reset on cut
toggle - takes the old multitool act on pulse (toggling auto fire
detection), does similar on cut
dud - does nothing

2. Fire alarm attackby -> tool and item interactions

3. Fire alarm screentips

4. Changed fire alarm trigger on damage from flat 33% to (3 * damage)%

## Why It's Good For The Game

1. Allows for more assembly shenanigans - maybe cutting the reset wire
and having a signaller on pulse

2. Cleaner

3. Helpful

4. allows you to consistently rely on the behavior by using higher force
weapons (such as guns) (this was a request)

## Changelog

🆑 Melbert
add: Fire alarms now has wires
add: Fire alarm trigger on damage now scales based on damage dealt,
rather than being a flat 33%
qol: Fire alarm screentips
refactor: Refactored fire alarms de/assembly, report any oddities
/🆑
2025-06-25 23:28:37 +02:00
jimmyl
089059d7d3 atmospherics shield generator (#91055)
## About The Pull Request

(old video)


https://github.com/user-attachments/assets/4b04c372-05a2-4bab-b4a4-1b2c965061e5

unlocked by holographics research
put two facing eachother and turn one on to make a field that blocks
atmos, if not obstructed by wall
fields cannot be broken or clicked but the generators may (theyre
relatively weak)
requires external airlock access or apc access
uses area power, environmental channel
may be locked
may be screwed open to access wiring, has 1 wire that just toggles it

changes tiny fans on stations to use those

## Why It's Good For The Game

a better and rebuildable alternative to magic tiny fans 

## Changelog
🆑
add: atmospherics shield generator, unlocked by Holographics research
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2025-06-10 15:31:43 +02:00
SmArtKar
a5eed384ce Colorblindness now prevents you from seeing wire colors (#91315)
Being colorblind now makes you see all wires in tones of grey.

Also fixes the eyechart not taking the monochromacy quirk into account
when checking for colorblindness

Makes the quirk/trauma a bit more immersive and can lead to funny
situations when you know which color to cut but can't find it.
2025-05-28 09:45:20 -04:00
John Willard
5fc14ff4bb Adds a notification to silicon/drones being watched (#90471)
## About The Pull Request

Cyborgs now have an alert that shows when someone is watching their
internal camera through a security camera console. SyndEye is excluded
from this as it's spying instead.
Made as an alternative to
https://github.com/tgstation/tgstation/pull/90410 but they also aren't
mutually exclusive, though I have the same fix for borg camera cutting
in this one too.


https://github.com/user-attachments/assets/5dfe92f8-8948-4a80-bb64-cbeaca4f80e0

##### This is part of the same code bounty as
https://github.com/tgstation/tgstation/pull/90410

## Why It's Good For The Game

Pretty much the same reason this PR is an alternative to, it's hard for
borgs to get away with doing antagonist stuff when people are able to
silently watch them at any point from any console or laptop laying
around the station, of which there are many. This hopefully lets borgs
know if someone is watching, to avoid doing anything in front of the
cameras, and to encourage them to get said cameras cut if they plan on
doing anything.

## Changelog

🆑
add: Drones now have internal cameras that shows up on camera consoles
(like Cyborgs)
balance: Cyborgs (and drones) now get a notification when someone is
watching them through a security camera console.
fix: Cutting a Cyborg's camera wire now properly disables it, and
mending it now properly re-enables it.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-04-08 21:41:47 +00:00
mcbalaam
fab5943719 Some minor Big Manipulator refactors (#90240)
## About The Pull Request

guh

I accidentally broke the manipulator while refactoring the UI because
ALL OF A SUDDEN, one of three options is actually two options that are
not in any way connected although they should be. And also there are
three variables for storing action delays (???). I believe it's not
about GBP in the first place, it's about taking responsibility for your
own fuck-ups, so here I am.

Removed some reused value variables, better autodoc readability, renamed
some procs and variables, made more things into constants.

## Why It's Good For The Game


![image](https://github.com/user-attachments/assets/e850b3e5-441e-45c6-a25e-2bf28c958885)

## Changelog

🆑
refactor: Minor Big Manipulator code refactoring
/🆑

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2025-03-26 10:44:54 +01:00
Maximal08
8752e4e991 Adds wires for holopad (#89947)
## About The Pull Request
Adds wires for the holopad with a red light to turn recording on and off
and a purple one to switch the loop.

An example of a fun use with proximity sensor and looping switching:


https://github.com/user-attachments/assets/ad6a711a-3e10-4bfd-9b8c-ab83ca949f03

And a small piece showing what happens if you try to play a recording
without a disc or with an empty disc:



https://github.com/user-attachments/assets/9dd398d6-f189-4f65-b5e3-f53f2747398f
## Why It's Good For The Game
The holopad has great potential for personal constructions of players,
and I would like to expand its functionality by adding interaction with
the wiring.
## Changelog
🆑
add: Adds wires for holopad
/🆑

---------

Co-authored-by: grungussuss <96586172+Sadboysuss@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-03-17 08:26:32 +00:00
SmArtKar
a916f4ec62 Cleans up chem grenade code, fixes prox sensors not working in grenades (#89891)
## About The Pull Request

Closes #89886
Closes #89887
Closes #89888

## Changelog
🆑
fix: You can no longer insert infinite amounts of slime cores into
advanced chem grenades
fix: Non-beaker containers in grenades work once more
fix: Proximity sensors in grenade finally work after like, 4 years.
code: Cleaned up chemical grenade code
/🆑
2025-03-15 04:23:21 +00:00
MrMelbert
97b05b3738 Syndicate Bombs get harder the longer you set the timer (#89693)
## About The Pull Request

Bomb starts at 2 boom wires (90 seconds). Going up to 180 seconds adds 2
dud wires.

Beyond that, for every 45 seconds added to the timer, a dud wire is
added. For every *other* 45 seconds added to the timer, a boom wire is
added.

This applies up to 9 minutes (12 added wires, 6 boom and 6 bust) 

| Duration (s) | Boom | Duds | 
| ----------| ------- | ------|
| 90  | 2 | 0 |
| 135 | 2 | 1 |
| 180 | 2 | 2 |
| 225 | 3 | 2 |
| 270 | 3 | 3 |
| 315 | 4 | 3 |
| ... | ... | ... |
| 540 | 6 | 6 | 

Numbers aren't final, and can be tweaked. (Might have gone overboard.)

Cargo shuttle event is untouched. It always has 2 booms and 0 busts.

## Why It's Good For The Game

We were having a discussion on Bombs recently and it tangentially made
me realize, there's really no benefit to raising the bomb timer outside
of, I guess, timing something specific?

All you're doing is giving people more time to escape or defuse it. 

So I figured we could at least improve one of those things, the "ease of
defusing"

This should make bombs set at longer times a bit more of a "situation"
the crew has to deal with, encouraging a more strategic approach
(evacuating the area, etc)

## Changelog

🆑 Melbert
balance: Syndicate bombs get harder to defuse the longer its timer is
set, up to 9 minutes.
fix: Training bombs won't message admins when they're "detonated" or
defused.
/🆑
2025-03-12 19:05:18 -06:00
Roxy
5ca36c3b83 Add air alarm wire knowledge to the Engineer skillchip (#89587)
## About The Pull Request

Add air alarm wires to the list of things that the engineer skillchip
gives you knowledge of

## Why It's Good For The Game

Engineers have access to air alarms so there's no real problem with them
knowing these, and it's helpful for fixing them.

## Changelog

🆑
qol: air alarm wires are now labeled if you have the engineering
skillchip
/🆑
2025-02-22 11:44:37 +01:00
Xackii
6fcb5ba419 Big Manipulators: Little Fix, Wires and Monkey Hardworkers. (#88805)
## About The Pull Request

Returning Use Mode to manipualtors but now manipulator use not the power
of invisible guys but the power of monkey hardworkes. You now can
drug-drop monkey to the manipulator and buckle him to it. After that you
will unlock use mode and manipulator will use manipulated item on living
mob, structure or macinery with using monkey hands.


https://github.com/user-attachments/assets/277bca71-059f-4f59-8e0d-7d17575cf6cf

Also this pr adds wires to manipulator. You can open big manipulator
panel and manipulate with wires to: on/off manipulator, drop item that
manipulator uses, switch what take type, change manipulate mode, switch
only one priority button and calculate throw range.

![Снимок экрана 2024-12-29
203214](https://github.com/user-attachments/assets/b02894be-74f3-4f97-9046-614b4c5bac6e)

Also this PR also fix a bug in which the manipulator ignores objects on
the tile from which he should take them if the object appeared there
using spawn or other non-agreed methods (for example, when frying meat
on a campfire, manipulator does not want to touch the fried meat)

## Why It's Good For The Game

Returns Use Mode to the manipulator to create complex logistics systems.
Adds wires to control manipulators remotely and fixes the manipulator’s
reluctance to touch meat fried at the campfire.

## Changelog

🆑
add: Big Manipulator now has use mode once again. You need buckle monkey
to unlock this future.
add: Big Manipulator now has wires.
fix: Big Manipualtor now sees objects that appeared on the tile using
spawn or any other means in which the object is not considered to have
moved
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2025-02-17 10:52:54 +00:00
MrMelbert
fca806da0c Fix cyborg flash / Makes cyborgs use item interaction (#89274)
## About The Pull Request

Fixes #89272

- Adds an argument to `is_wire_tool` to fail if the item is secured,
which assemblies are by default. (They must be screwdriver'd to attach
to things)

Makes cyborg use item interaction

- Cleaner, non-deprecated attack chain. 
- Also changes to chats to balloon alerts.

## Changelog

🆑 Melbert
qol: Using items on cyborgs now use balloon alerts instead of chat
messages.
fix: You can flash cyborgs again
refactor: Refactored item interaction on cyborgs. 
/🆑
2025-01-30 13:07:15 +01:00
Y0SH1M4S73R
90b67b0541 A Small Circuit Expansion: Wallmounts, Undertiles, and Wire Bundles (#89122)
## About The Pull Request

This PR adds several circuit features, and changes several
assembly-related features to make them a bit more logical in how they
work. Included are the following changes/additions:

- Assemblies and wires have been refactored with vars that describe
their behavior:
- Assemblies have an `assembly_behavior` bitflag instead of a
`attachable` var. This var has 3 flags:
- `ASSEMBLY_INPUT`: The assembly is able to pulse the wire it is
attached to.
- `ASSEMBLY_TOGGLE_ARMED`: On activation, the assembly toggles whether
it can pulse the wire it is attached to.
- `ASSEMBLY_FUNCTIONAL_OUTPUT`: On activation, the assembly does
something other than just toggling whether it's armed.
  - Wires have a `wires_behavior` bitflag with 3 flags:
- `WIRES_INPUT`: The object the wires are attached to does something
when the wires are pulsed.
- `WIRES_TOGGLE_ARMED`: The object the wires are attached to can
activate assemblies attached to those wires, and is fine if all that
activating that assembly does is toggle whether it's armed.
- `WIRES_FUNCTIONAL_OUTPUT`: The object the wires are attached to
expects that assemblies attached to its wires do something other than
toggling themselves when activated.
- Buttons can only accept assemblies with `ASSEMBLY_FUNCTIONAL_OUTPUT`.
- Pressure plates can now accept any assembly with
`ASSEMBLY_FUNCTIONAL_OUTPUT`, not just signalers. Assembly shells
attached to pressure plates will draw power from the powernet if the
pressure plate is under a tile.
- Adds a new circuit component - the wire bundle.
- This component gives the circuit a number of wires corresponding to
the size of the shell.
- Each wire has a corresponding port on the component that can pulse,
and receive pulses from, that wire.
  - A circuit can only have one wire bundle component.
- Assembly shells cannot be attached to these wires, and no wires will
be created if the component is added to an assembly shell.
  - Available with roundstart tech.
- Adds two new shells.
- The wallmounted shell is a large shell that can be hung on walls, and
uses power from the area it's placed in.
    - Frame icon:

![image](https://github.com/user-attachments/assets/2fe9297d-44a9-4ceb-b803-a758e59b807d)
    - Constructed icon:

![image](https://github.com/user-attachments/assets/34c3ffcb-53cb-415f-952f-aec5de63cf17)
- The undertile shell is a small shell that only works when fit under a
floor tile, but uses power from the area it's placed in.

![image](https://github.com/user-attachments/assets/11ea150d-08be-4ce9-bf44-35a9d6e2d94f)
  - Both shells support usb cables.
- The above shells are available with the Advanced Shells techweb node.

## Why It's Good For The Game

The wire bundle component complements the functionality of the assembly
shell by allowing circuits to use assemblies directly in their logic.

The wallmounted and undertile shells provide ways of placing circuits
that don't necessarily take up space for machines. The undertile shell
is particularly useful for relaying usb component data over wirenets.

Pressure plates being able to accept assemblies other than signalers
expands their uses significantly.

## Changelog

🆑
refactor: Wires and assemblies have been refactored to have
directionality to them. This mostly makes it so that assemblies can only
be attached to wires it would make sense for them to be attached to.
qol: Pressure plates can now also accept igniters, condensers, flashes,
assembly shells, and door controllers.
add: Undertile circuit shells. They only work when placed under floor
tiles, but support USB cables and use APC power instead of cell power.
add: Wallmounted circuit shells. Large shells that support USB cables
and use APC power instead of cell power.
add: Wire bundle component. Adds a number of wires to the circuit
proportional to the capacity of the shell, allowing you to use
assemblies in circuit logic.
/🆑
2025-01-19 18:40:23 +00:00
MrMelbert
0f881d1397 Mulebot wires no longer references typepaths (#88220)
## About The Pull Request

Classic case of `[src]` in a datum

Fixes #88206

## Changelog

🆑 Melbert
fix: Mulebot wire hacking is less fourth wall breaking
/🆑
2024-11-27 03:13:57 +01:00
grungussuss
6fa26ecbb5 gives mulebot wires some messages when cut (#87895)
## About The Pull Request
closes https://github.com/tgstation/tgstation/issues/87640
## Why It's Good For The Game
feedback is cool
## Changelog
🆑 grungussuss
qol: added feedback for cutting mulebot wires
/🆑
2024-11-14 22:15:05 +01:00
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