space-station-14 icon indicating copy to clipboard operation
space-station-14 copied to clipboard

Add access locks to gas canisters

Open JustinTrotter opened this issue 2 years ago • 9 comments

About the PR

During shifts cargo sometimes wants to sell Plasma/Tritium/Frezon filled gas canisters to make the big bucks; however, then as it's being transported to cargo, the clown slips the cargo-tech hauling it and as a joke opens the canister, que shuttle call. So to mitigate these unfortunate incidents, we can install access readers to all canisters, defaulting all to unlocked except for dangerous gases like Plasma, Frezon, Tritium, Miasma, and NitrousOxide.

Locking/Unlocking behaves the same as any locker, just alt + left click or use the content menu to unlock. Access is granted to only Atmospherics and Research Director privileges. (I figure that when toxin bombs eventually become a thing, the RD would be needed to unlock the canisters for his research team in order to set up a chain of custody.)

Antags are still be able to use emags to unlock the canisters. Also shitters could still bash the thing open.

Cargo selling locked canisters has no effect on its value.

I've added two led indicators on each gas canister to signify its locked status at a glance. Red for locked, Green for unlocked.

Attempting to hand interact with a locked canister without access results in a pop up message "Access denied." with a standard denied beeping sound. Like with lockers, hand interacting with a locked canister with the needed credentials will automatically unlock it and open the interface.

Screenshots

Screenshot_2022-08-13_22-53-32

Changelog

:cl:

  • add: Gas canisters now come with access locks.

JustinTrotter avatar Aug 14 '22 05:08 JustinTrotter

RSI Diff Bot; head commit 26994b5765a8b5bc5fa73e7b5f442186e443e6d5 merging into 8871c445b8fa469757d2c8dab2f4597b617ae5c5 This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Structures/Storage/canister.rsi

State Old New Status
can-locked Added
can-unlocked Added
Edit: diff updated after 26994b5765a8b5bc5fa73e7b5f442186e443e6d5

github-actions[bot] avatar Aug 14 '22 05:08 github-actions[bot]

this isn't on any server i'm aware of, but im down to try it honestly

mirrorcult avatar Aug 14 '22 05:08 mirrorcult

Should every canister have a lock? The O2 canisters are meant for people to refill their oxygen tanks

Elijahrane avatar Aug 14 '22 18:08 Elijahrane

Should every canister be locked? The O2 canisters are meant for people to refill their oxygen tanks

"defaulting to all unlocked except dangerous canisters like Plasma, Frezon, Tritium, Miasma, and NitrousOxide.

if i'm reading this right o2 is unlocked by default

HoidC avatar Aug 14 '22 18:08 HoidC

if i'm reading this right o2 is unlocked by default

Should it have the lock component at all though

Elijahrane avatar Aug 14 '22 18:08 Elijahrane

it should be lockable

Emisse avatar Aug 14 '22 18:08 Emisse

if i'm reading this right o2 is unlocked by default

Should it have the lock component at all though

I mean, why not? If I want to move an o2 canister through a hallway (for whatever reason) and don't want the above thing happening I'd like to lock it so people don't open it.

The only people who can lock them aren't traitors, so I doubt griefing would happen.

HoidC avatar Aug 14 '22 18:08 HoidC

The only people who can lock them aren't traitors, so I doubt griefing would happen.

Right this is why I decided not to include engineering on the access list. The only ones that should have the power to grant or prevent access would be atmos and relevant heads like Cap, RD, and CE.

JustinTrotter avatar Aug 14 '22 18:08 JustinTrotter

what do you think about leaving nitrous oxide off the locked list. I think co2 is more dangerous than nitrous.

Cheackraze avatar Aug 16 '22 01:08 Cheackraze

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Sep 14 '22 16:09 github-actions[bot]