forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 33
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-ru' of https://gitlab.workbench.network/Workbenc…
…h-Team/space-station-14 into arumoon-server # Conflicts: # Resources/Locale/en-US/ss14-ru/prototypes/actions/types.ftl # Resources/Locale/en-US/ss14-ru/prototypes/entities/objects/devices/pda.ftl # Resources/Locale/ru-RU/ss14-ru/prototypes/actions/types.ftl # Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/devices/pda.ftl # Resources/Maps/metastation.yml # Resources/Prototypes/Catalog/Fills/Lockers/security.yml # Resources/Prototypes/Maps/Driller.yml # Resources/migration.yml
- Loading branch information
Showing
256 changed files
with
201,503 additions
and
60,898 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,8 @@ | ||
using Content.Shared.PDA; | ||
using Content.Shared.Light; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.PDA; | ||
|
||
public sealed class PdaSystem : SharedPdaSystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<PdaComponent, AppearanceChangeEvent>(OnAppearanceChange); | ||
} | ||
|
||
private void OnAppearanceChange(EntityUid uid, PdaComponent component, ref AppearanceChangeEvent args) | ||
{ | ||
if (args.Sprite == null) | ||
return; | ||
|
||
if (Appearance.TryGetData<bool>(uid, UnpoweredFlashlightVisuals.LightOn, out var isFlashlightOn, args.Component)) | ||
args.Sprite.LayerSetVisible(PdaVisualLayers.Flashlight, isFlashlightOn); | ||
|
||
if (Appearance.TryGetData<bool>(uid, PdaVisuals.IdCardInserted, out var isCardInserted, args.Component)) | ||
args.Sprite.LayerSetVisible(PdaVisualLayers.IdLight, isCardInserted); | ||
} | ||
|
||
protected override void OnComponentInit(EntityUid uid, PdaComponent component, ComponentInit args) | ||
{ | ||
base.OnComponentInit(uid, component, args); | ||
|
||
if (!TryComp<SpriteComponent>(uid, out var sprite)) | ||
return; | ||
|
||
if (component.State != null) | ||
sprite.LayerSetState(PdaVisualLayers.Base, component.State); | ||
|
||
sprite.LayerSetVisible(PdaVisualLayers.Flashlight, component.FlashlightOn); | ||
sprite.LayerSetVisible(PdaVisualLayers.IdLight, component.IdSlot.StartingItem != null); | ||
} | ||
|
||
public enum PdaVisualLayers : byte | ||
{ | ||
Base, | ||
Flashlight, | ||
IdLight | ||
} | ||
} |
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,30 @@ | ||
using Content.Shared.Light; | ||
using Content.Shared.PDA; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.PDA; | ||
|
||
public sealed class PdaVisualizerSystem : VisualizerSystem<PdaVisualsComponent> | ||
{ | ||
protected override void OnAppearanceChange(EntityUid uid, PdaVisualsComponent comp, ref AppearanceChangeEvent args) | ||
{ | ||
if (args.Sprite == null) | ||
return; | ||
|
||
if (AppearanceSystem.TryGetData<string>(uid, PdaVisuals.PdaType, out var pdaType, args.Component)) | ||
args.Sprite.LayerSetState(PdaVisualLayers.Base, pdaType); | ||
|
||
if (AppearanceSystem.TryGetData<bool>(uid, UnpoweredFlashlightVisuals.LightOn, out var isFlashlightOn, args.Component)) | ||
args.Sprite.LayerSetVisible(PdaVisualLayers.Flashlight, isFlashlightOn); | ||
|
||
if (AppearanceSystem.TryGetData<bool>(uid, PdaVisuals.IdCardInserted, out var isCardInserted, args.Component)) | ||
args.Sprite.LayerSetVisible(PdaVisualLayers.IdLight, isCardInserted); | ||
} | ||
|
||
public enum PdaVisualLayers : byte | ||
{ | ||
Base, | ||
Flashlight, | ||
IdLight | ||
} | ||
} |
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,14 @@ | ||
namespace Content.Client.PDA; | ||
|
||
/// <summary> | ||
/// Used for visualizing PDA visuals. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class PdaVisualsComponent : Component | ||
{ | ||
public string? BorderColor; | ||
|
||
public string? AccentHColor; | ||
|
||
public string? AccentVColor; | ||
} |
Oops, something went wrong.