This repository has been archived by the owner on Sep 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
2,964 additions
and
486 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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,2 +1,2 @@ | ||
# Sigma: | ||
@PuroSlavKing | ||
* @PuroSlavKing |
35 changes: 35 additions & 0 deletions
35
Content.Shared/Clothing/Components/EmitsSoundOnMoveComponent.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,35 @@ | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Map; | ||
|
||
namespace Content.Shared.Clothing.Components; | ||
|
||
/// <summary> | ||
/// Indicates that the clothing entity emits sound when it moves. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] | ||
public sealed partial class EmitsSoundOnMoveComponent : Component | ||
{ | ||
[ViewVariables(VVAccess.ReadWrite)] | ||
[DataField(required: true), AutoNetworkedField] | ||
public SoundSpecifier SoundCollection = default!; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("requiresGravity"), AutoNetworkedField] | ||
public bool RequiresGravity = true; | ||
|
||
[ViewVariables(VVAccess.ReadOnly)] | ||
public EntityCoordinates LastPosition = EntityCoordinates.Invalid; | ||
|
||
/// <summary> | ||
/// The distance moved since the played sound. | ||
/// </summary> | ||
[ViewVariables(VVAccess.ReadOnly)] | ||
public float SoundDistance = 0f; | ||
|
||
/// <summary> | ||
/// Whether this item is equipped in a inventory item slot. | ||
/// </summary> | ||
[ViewVariables(VVAccess.ReadOnly)] | ||
public bool IsSlotValid = true; | ||
} |
96 changes: 96 additions & 0 deletions
96
Content.Shared/Clothing/EntitySystems/EmitsSoundOnMoveSystem.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,96 @@ | ||
using System.Numerics; | ||
using Content.Shared.Clothing.Components; | ||
using Content.Shared.Gravity; | ||
using Content.Shared.Inventory; | ||
using Content.Shared.Inventory.Events; | ||
using Content.Shared.Mobs.Components; | ||
using Content.Shared.Movement.Components; | ||
using Robust.Shared.Audio.Systems; | ||
using Robust.Shared.Physics.Components; | ||
using Robust.Shared.Timing; | ||
|
||
namespace Content.Shared.Clothing.Systems; | ||
|
||
public sealed class EmitsSoundOnMoveSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedAudioSystem _audio = default!; | ||
[Dependency] private readonly SharedMapSystem _grid = default!; | ||
[Dependency] private readonly SharedGravitySystem _gravity = default!; | ||
[Dependency] private readonly IGameTiming _timing = default!; | ||
|
||
private EntityQuery<InputMoverComponent> _moverQuery; | ||
private EntityQuery<PhysicsComponent> _physicsQuery; | ||
private EntityQuery<ClothingComponent> _clothingQuery; | ||
|
||
public override void Initialize() | ||
{ | ||
_moverQuery = GetEntityQuery<InputMoverComponent>(); | ||
_physicsQuery = GetEntityQuery<PhysicsComponent>(); | ||
_clothingQuery = GetEntityQuery<ClothingComponent>(); | ||
|
||
SubscribeLocalEvent<EmitsSoundOnMoveComponent, GotEquippedEvent>(OnEquipped); | ||
SubscribeLocalEvent<EmitsSoundOnMoveComponent, GotUnequippedEvent>(OnUnequipped); | ||
} | ||
|
||
private void OnEquipped(EntityUid uid, EmitsSoundOnMoveComponent component, GotEquippedEvent args) | ||
{ | ||
component.IsSlotValid = !args.SlotFlags.HasFlag(SlotFlags.POCKET); | ||
} | ||
|
||
private void OnUnequipped(EntityUid uid, EmitsSoundOnMoveComponent component, GotUnequippedEvent args) | ||
{ | ||
component.IsSlotValid = true; | ||
} | ||
|
||
public override void Update(float frameTime) | ||
{ | ||
var query = EntityQueryEnumerator<EmitsSoundOnMoveComponent>(); | ||
while (query.MoveNext(out var uid, out var comp)) | ||
{ | ||
UpdateSound(uid, comp); | ||
} | ||
query.Dispose(); | ||
} | ||
|
||
private void UpdateSound(EntityUid uid, EmitsSoundOnMoveComponent component) | ||
{ | ||
if (!_physicsQuery.TryGetComponent(uid, out var physics)) | ||
return; | ||
|
||
// Space does not transmit sound | ||
if (Transform(uid).GridUid == null) | ||
return; | ||
|
||
if (component.RequiresGravity && _gravity.IsWeightless(uid, physics, Transform(uid))) | ||
return; | ||
|
||
var parent = Transform(uid).ParentUid; | ||
|
||
var isWorn = parent is { Valid: true } && | ||
_clothingQuery.TryGetComponent(uid, out var clothing) | ||
&& clothing.InSlot != null | ||
&& component.IsSlotValid; | ||
// If this entity is worn by another entity, use that entity's coordinates | ||
var coordinates = isWorn ? Transform(parent).Coordinates : Transform(uid).Coordinates; | ||
var distanceNeeded = (isWorn && _moverQuery.TryGetComponent(parent, out var mover) && mover.Sprinting) | ||
? 1.5f // The parent is a mob that is currently sprinting | ||
: 2f; // The parent is not a mob or is not sprinting | ||
|
||
if (!coordinates.TryDistance(EntityManager, component.LastPosition, out var distance) || distance > distanceNeeded) | ||
component.SoundDistance = distanceNeeded; | ||
else | ||
component.SoundDistance += distance; | ||
|
||
component.LastPosition = coordinates; | ||
if (component.SoundDistance < distanceNeeded) | ||
return; | ||
component.SoundDistance -= distanceNeeded; | ||
|
||
var sound = component.SoundCollection; | ||
var audioParams = sound.Params | ||
.WithVolume(sound.Params.Volume) | ||
.WithVariation(sound.Params.Variation ?? 0f); | ||
|
||
_audio.PlayPredicted(sound, uid, uid, audioParams); | ||
} | ||
} |
Binary file not shown.
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 @@ | ||
door-electronics-configuration-title = Настроить доступы |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
item-toggle-activate = Включить | ||
item-toggle-deactivate = Выключить |
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
13 changes: 9 additions & 4 deletions
13
Resources/Locale/ru-RU/medical/components/health-analyzer-component.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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
blueprint-receiver-popup-insert = { CAPITALIZE($user) } помещает { $blueprint } в { $receiver }. | ||
blueprint-receiver-popup-recipe-exists = Такой чертёж уже был добавлен! |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# General | ||
ai-wire-snipped = Был перерезан провод, координаты { $coords }. | ||
wire-name-ai-vision-light = ИИВ | ||
wire-name-ai-act-light = ИИС | ||
station-ai-takeover = ИИ захват | ||
# Radial actions | ||
ai-open = Открыть действия | ||
ai-close = Закрыть действия | ||
bolt-close = Заболтировать | ||
bolt-open = Разболтировать | ||
toggle-light = Переключить свет |
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
Oops, something went wrong.