Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emergency power unit #918

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Server.DeltaV.Construction.Components;

[RegisterComponent]
public sealed partial class PreventDeconstructionComponent : Component
{
[DataField]
public bool RemoveWirePanel;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Content.Server.Construction.Components;
using Content.Server.DeltaV.Construction.Components;
using Content.Shared.Wires;

namespace Content.Server.DeltaV.Construction;

public sealed class PreventDeconstructionSystem : EntitySystem
{
public override void Initialize()
{
SubscribeLocalEvent<PreventDeconstructionComponent, MapInitEvent>(OnMapInit);
}

private void OnMapInit(EntityUid uid, PreventDeconstructionComponent component, MapInitEvent args)
{
RemComp<ConstructionComponent>(uid);
if (component.RemoveWirePanel)
RemComp<WiresPanelComponent>(uid);
}
}
50 changes: 50 additions & 0 deletions Resources/Prototypes/DeltaV/Entities/Structures/Power/smes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
- type: entity
id: SMESEmergency
name: Emergency Power Unit
description: Supplies emergency power. Cannot be recharged.
suffix: Basic, 1.6MJ
parent: BaseSMES
components:
# Visual changes
- type: Sprite
sprite: DeltaV/Structures/Power/epu.rsi
- type: PowerMonitoringDevice
sprite: DeltaV/Structures/Power/epu.rsi
group: Generator
loadNode: output
collectionName: emergency power unit
- type: PointLight
radius: 1.5
energy: 1.6
color: "#FF4020"
- type: AmbientSound
volume: -5
range: 5
sound:
path: /Audio/Ambience/Objects/buzzing.ogg
# Functional changes
- type: Battery
maxCharge: 1600000
startingCharge: 1600000
- type: PowerNetworkBattery
maxChargeRate: 0
- type: BatteryCharger
voltage: High
node:
- type: NodeContainer
examinable: true
nodes:
output:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: PreventDeconstruction
removeWirePanel: true

- type: entity
id: SMESEmergencyHighCapacity
suffix: High-Capacity, 5MJ
parent: SMESEmergency
components:
- type: Battery
maxCharge: 5000000
startingCharge: 5000000
77 changes: 77 additions & 0 deletions Resources/Textures/DeltaV/Structures/Power/epu.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/9c7d509354ee030300f63c701da63c17928c3b3b and modified by Swept | smes.png created by @ps3moira on Discord",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "smes"
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

troll indent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real

"name": "static"
},
{
"name": "smes-open"
},
{
"name": "smes-oc0"
},
{
"name": "smes-oc1",
"delays": [
[
0.5,
0.5
]
]
},
{
"name": "smes-oc2",
"delays": [
[
0.5,
0.5
]
]
},
{
"name": "smes-og1",
"delays": [
[
1,
1
]
]
},
{
"name": "smes-og2"
},
{
"name": "smes-og3"
},
{
"name": "smes-og4"
},
{
"name": "smes-og5"
},
{
"name": "smes-op0"
},
{
"name": "smes-op1",
"delays": [
[
1,
1
]
]
},
{
"name": "smes-op2"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading