Hacking protections for airlocks (#18894)
* Adds the ability to better protect to the internal wiring of airlocks - Achieved by opening the maintenance panel, adding either steel or plasteel to the airlock, then welding the plate in place - To access the wiring, the plating must be cut with a welder and then pried out with a crowbar * Code revisions - Cleaned up the code - Cutting the security grille can now shock you - Atmospherics and Security dept airlocks start with a medium level of protection (a welded steel plate) - Command dept airlocks start with a high level of protection (a welded plasteel plate and electrified security grille) * Code revision - Accounted for a potentially null string * Update Content.Server/Construction/Completions/AttemptElectrocute.cs Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com> * Update ChangeWiresPanelSecurityLevel.cs Adjusted scope * Update Content.Shared/Wires/SharedWiresSystem.cs Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com> * Update Content.Shared/Wires/SharedWiresSystem.cs Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com> * Update ChangeWiresPanelSecurityLevel.cs Removed get / setter and added [ValidatePrototypeId] attribute * Update ChangeWiresPanelSecurityLevel.cs Set security level to "Level0" as the default * Update airlock.yml Removed 'super max' level of security * Update WiresPanelSecurityLevelPrototype.cs * Update WiresSystem.cs Added check for WiresAccessible to OnInteractUsing * Update AttemptElectrocute.cs File scoped namespace * Update ChangeWiresPanelSecurityLevel.cs File scoped namespace * Update AirlockSystem.cs File scoped namespace * Update SharedWiresSystem.cs Removed boiler plate 'OnGetState' and 'OnHandleState' * Update WiresPanelComponent.cs Implemented AutoGenerateComponentState * Removed unnecessary usage references * use TryCloseAll when wires not accessible * minor changes to AttemmptElectrocute * lets try all 7 levels * fix indent in airlock graph * fix indent 2 --------- Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com> Co-authored-by: Slava0135 <super.novalskiy_0135@inbox.ru>
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Structures/Doors/Airlocks/Standard/atmospherics.rsi
|
||||
- type: Construction
|
||||
node: airlockMedSecurity
|
||||
|
||||
- type: entity
|
||||
parent: Airlock
|
||||
@@ -69,6 +71,8 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Structures/Doors/Airlocks/Standard/command.rsi
|
||||
- type: Construction
|
||||
node: airlockMaxSecurity
|
||||
|
||||
- type: entity
|
||||
parent: Airlock
|
||||
@@ -77,6 +81,8 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Structures/Doors/Airlocks/Standard/security.rsi
|
||||
- type: Construction
|
||||
node: airlockMedSecurity
|
||||
|
||||
- type: entity
|
||||
parent: Airlock
|
||||
@@ -156,6 +162,8 @@
|
||||
sprite: Structures/Doors/Airlocks/Glass/atmospherics.rsi
|
||||
- type: PaintableAirlock
|
||||
group: Glass
|
||||
- type: Construction
|
||||
node: airlockMedSecurity
|
||||
|
||||
- type: entity
|
||||
parent: AirlockGlass
|
||||
@@ -206,6 +214,8 @@
|
||||
sprite: Structures/Doors/Airlocks/Glass/command.rsi
|
||||
- type: PaintableAirlock
|
||||
group: Glass
|
||||
- type: Construction
|
||||
node: airlockMaxSecurity
|
||||
|
||||
- type: entity
|
||||
parent: AirlockGlass
|
||||
@@ -216,3 +226,5 @@
|
||||
sprite: Structures/Doors/Airlocks/Glass/security.rsi
|
||||
- type: PaintableAirlock
|
||||
group: Glass
|
||||
- type: Construction
|
||||
node: airlockMedSecurity
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level0
|
||||
wiresAccessible: true
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level1
|
||||
examine: wires-panel-component-on-examine-security-level1
|
||||
wiresAccessible: false
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level2
|
||||
examine: wires-panel-component-on-examine-security-level2
|
||||
wiresAccessible: false
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level3
|
||||
examine: wires-panel-component-on-examine-security-level3
|
||||
wiresAccessible: false
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level4
|
||||
examine: wires-panel-component-on-examine-security-level4
|
||||
wiresAccessible: false
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level5
|
||||
examine: wires-panel-component-on-examine-security-level5
|
||||
wiresAccessible: false
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level6
|
||||
examine: wires-panel-component-on-examine-security-level6
|
||||
wiresAccessible: false
|
||||
|
||||
- type: WiresPanelSecurityLevel
|
||||
id: Level7
|
||||
examine: wires-panel-component-on-examine-security-level7
|
||||
wiresAccessible: false
|
||||
|
||||
@@ -86,24 +86,6 @@
|
||||
- tool: Prying
|
||||
doAfter: 5
|
||||
|
||||
|
||||
- node: airlock
|
||||
entity: Airlock
|
||||
edges:
|
||||
- to: wired #TODO DOOR ELECTRONICS. If door electronics ever govern access permissions, this step should probably be further down? It makes it too easy to swap permissions around. See also windoor.
|
||||
conditions:
|
||||
- !type:EntityAnchored {}
|
||||
- !type:DoorWelded {}
|
||||
- !type:DoorBolted
|
||||
value: false
|
||||
- !type:WirePanel {}
|
||||
- !type:AllWiresCut
|
||||
completed:
|
||||
- !type:EmptyAllContainers {}
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 5
|
||||
|
||||
- node: glassElectronics
|
||||
entity: AirlockAssembly
|
||||
edges:
|
||||
@@ -146,3 +128,217 @@
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 2
|
||||
|
||||
- node: airlock
|
||||
entity: Airlock
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level0
|
||||
edges:
|
||||
- to: wired #TODO DOOR ELECTRONICS. If door electronics ever govern access permissions, this step should probably be further down? It makes it too easy to swap permissions around. See also windoor.
|
||||
conditions:
|
||||
- !type:EntityAnchored {}
|
||||
- !type:DoorWelded {}
|
||||
- !type:DoorBolted
|
||||
value: false
|
||||
- !type:WirePanel {}
|
||||
- !type:AllWiresCut
|
||||
completed:
|
||||
- !type:EmptyAllContainers {}
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 5
|
||||
|
||||
- to: airlockMedSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- material: Steel
|
||||
amount: 2
|
||||
doAfter: 2
|
||||
|
||||
- to: airlockHighSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- material: Plasteel
|
||||
amount: 2
|
||||
doAfter: 2
|
||||
|
||||
## Return node so that removing all internal plating doesn't reset the door
|
||||
- node: airlockUnsecured
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level0
|
||||
edges:
|
||||
- to: wired
|
||||
conditions:
|
||||
- !type:EntityAnchored {}
|
||||
- !type:DoorWelded {}
|
||||
- !type:DoorBolted
|
||||
value: false
|
||||
- !type:WirePanel {}
|
||||
- !type:AllWiresCut
|
||||
completed:
|
||||
- !type:EmptyAllContainers {}
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 5
|
||||
|
||||
- to: airlockMedSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- material: Steel
|
||||
amount: 2
|
||||
doAfter: 2
|
||||
|
||||
- to: airlockHighSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- material: Plasteel
|
||||
amount: 2
|
||||
doAfter: 2
|
||||
|
||||
## Medium security level airlock: a layer of steel plating protects the internal wiring
|
||||
- node: airlockMedSecurityBreached
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level1
|
||||
edges:
|
||||
- to: airlockUnsecured
|
||||
completed:
|
||||
- !type:GivePrototype
|
||||
prototype: SheetSteel1
|
||||
amount: 2
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 4
|
||||
|
||||
- to: airlockMedSecurity
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 3
|
||||
|
||||
- node: airlockMedSecurity
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level2
|
||||
edges:
|
||||
- to: airlockMedSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 10
|
||||
|
||||
## High security level airlock: a layer of plasteel plating protects the internal wiring
|
||||
- node: airlockHighSecurityBreached
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level3
|
||||
edges:
|
||||
- to: airlockUnsecured
|
||||
completed:
|
||||
- !type:GivePrototype
|
||||
prototype: SheetPlasteel1
|
||||
amount: 2
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 4
|
||||
|
||||
- to: airlockHighSecurity
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 5
|
||||
|
||||
- node: airlockHighSecurity
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level4
|
||||
edges:
|
||||
- to: airlockHighSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 15
|
||||
|
||||
- to: airlockMaxSecurity
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- material: MetalRod
|
||||
amount: 2
|
||||
doAfter: 1
|
||||
|
||||
## Max security level airlock: an electric grill is added
|
||||
- node: airlockMaxSecurity
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level5
|
||||
edges:
|
||||
- to: airlockHighSecurity
|
||||
completed:
|
||||
- !type:AttemptElectrocute
|
||||
- !type:GivePrototype
|
||||
prototype: PartRodMetal1
|
||||
amount: 2
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Cutting
|
||||
doAfter: 0.5
|
||||
|
||||
- to: airlockSuperMaxSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- material: Plasteel
|
||||
amount: 2
|
||||
doAfter: 2
|
||||
|
||||
## Super max security level airlock: an additional layer of plasteel is added
|
||||
- node: airlockSuperMaxSecurityBreached
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level6
|
||||
edges:
|
||||
- to: airlockMaxSecurity
|
||||
completed:
|
||||
- !type:GivePrototype
|
||||
prototype: SheetPlasteel1
|
||||
amount: 2
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 4
|
||||
|
||||
- to: airlockSuperMaxSecurity
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 5
|
||||
|
||||
- node: airlockSuperMaxSecurity
|
||||
actions:
|
||||
- !type:ChangeWiresPanelSecurityLevel
|
||||
level: Level7
|
||||
edges:
|
||||
- to: airlockSuperMaxSecurityBreached
|
||||
conditions:
|
||||
- !type:WirePanel {}
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 15
|
||||
|
||||
Reference in New Issue
Block a user