-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ipc-flashlight-eddie
- Loading branch information
Showing
7 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
Content.Server/ADT/ActiveGateway/ActiveGatewayComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Content.Server.Gateway.Components; | ||
using Content.Server.Gateway.Systems; | ||
|
||
namespace Content.Server.ADT.ActiveGateway; | ||
|
||
[RegisterComponent, Access(typeof(ActiveGatewaySystem))] | ||
public sealed partial class ActiveGatewayComponent : Component | ||
{ | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
public bool Enabled = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Content.Server.Gateway.Components; | ||
using Content.Server.Gateway.Systems; | ||
|
||
namespace Content.Server.ADT.ActiveGateway; | ||
|
||
public sealed class ActiveGatewaySystem : EntitySystem | ||
{ | ||
[Dependency] private readonly GatewaySystem _gatewaySystem = new GatewaySystem(); | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<ActiveGatewayComponent, ComponentStartup>(OnComponentStartup); | ||
} | ||
|
||
private void OnComponentStartup(EntityUid uid, ActiveGatewayComponent component, ComponentStartup args) | ||
{ | ||
_gatewaySystem.SetEnabled(uid, component.Enabled); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Resources/Locale/ru-RU/ADT/prototypes/entities/structures/gateway.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ent-ADTGatewayActive = врата | ||
.desc = Таинственные врата, возведенные неизвестно кем, позволяют преодолевать быстрее света огромные расстояния. | ||
.suffix = { "Активированные" } |
6 changes: 6 additions & 0 deletions
6
Resources/Prototypes/ADT/Entities/Structures/Machines/gateway.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- type: entity | ||
parent: Gateway | ||
id: ADTGatewayActive | ||
suffix: "Активированный" | ||
components: | ||
- type: ActiveGateway # Если накинуть вместе с Gateway, то они будут в активированном состоянии всегда |