From 457ba1edd3bab4ddd2a0cb8128d70275979d855d Mon Sep 17 00:00:00 2001 From: GayBot Date: Thu, 3 Oct 2024 03:10:49 +0300 Subject: [PATCH 1/3] Automatic changelog update --- Resources/Changelog/ChangelogSunrise.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Resources/Changelog/ChangelogSunrise.yml b/Resources/Changelog/ChangelogSunrise.yml index c9146592c9..da87e1ae03 100644 --- a/Resources/Changelog/ChangelogSunrise.yml +++ b/Resources/Changelog/ChangelogSunrise.yml @@ -4024,3 +4024,12 @@ id: 291 time: '2024-10-03T00:07:55.0000000+00:00' url: https://github.com/space-sunrise/space-station-14/pull/447 +- author: Alan Wake + changes: + - message: "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0430 \u0432\u043E\u0437\ + \u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u043B\u043E\u0436\u0438\u0442\ + \u044C\u0441\u044F \u043D\u0430 R." + type: Add + id: 292 + time: '2024-10-03T00:11:13.0000000+00:00' + url: https://github.com/space-sunrise/space-station-14/pull/417 From d90d22f2f8c3b10cc6d9ad17c3e7d0895c409f3f Mon Sep 17 00:00:00 2001 From: SplikZerys <136282037+SplikZerys@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:54:51 +0300 Subject: [PATCH 2/3] Added new TTS-voice - Soldier from TF2 (#450) * Added new TTS-voice - Soldier from TF2 * yes --- Resources/Changelog/ChangelogSunrise.yml | 8 ++++++++ .../ru-RU/_strings/_sunrise/tts/tts-voices-sunrise.ftl | 1 + Resources/Prototypes/_Sunrise/tts_voices_sunrise.yml | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/Resources/Changelog/ChangelogSunrise.yml b/Resources/Changelog/ChangelogSunrise.yml index da87e1ae03..2186ace537 100644 --- a/Resources/Changelog/ChangelogSunrise.yml +++ b/Resources/Changelog/ChangelogSunrise.yml @@ -4033,3 +4033,11 @@ id: 292 time: '2024-10-03T00:11:13.0000000+00:00' url: https://github.com/space-sunrise/space-station-14/pull/417 +- author: SplikZerys + changes: + - message: "\u0414\u043E\u0431\u0430\u0432\u0438\u043B \u0422\u0422\u0421-\u0433\ + \u043E\u043B\u043E\u0441 \u0441\u043E\u043B\u0434\u0430\u0442\u0430 \u0438\u0437\ + \ TF2." + type: Add + id: 293 + time: '2024-10-03T13:53:41.040404+00:00' diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/tts/tts-voices-sunrise.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/tts/tts-voices-sunrise.ftl index bd347a3852..6b8ec97e5e 100644 --- a/Resources/Locale/ru-RU/_strings/_sunrise/tts/tts-voices-sunrise.ftl +++ b/Resources/Locale/ru-RU/_strings/_sunrise/tts/tts-voices-sunrise.ftl @@ -22,3 +22,4 @@ tts-voice-name-kendrick = (NEW) [SS14] Kendrick tts-voice-name-splikzerys = (NEW) [SUNRISE] SplikZerys tts-voice-name-dota2-riki = (NEW) [Dota 2] Рики tts-voice-name-dota2-pudge = (NEW) [Dota 2] Пудж +tts-voice-name-tf2-soldier = (NEW) [Team Fortress 2] Солдат 2.0 diff --git a/Resources/Prototypes/_Sunrise/tts_voices_sunrise.yml b/Resources/Prototypes/_Sunrise/tts_voices_sunrise.yml index 95feb5ce4d..cce0fd0c59 100644 --- a/Resources/Prototypes/_Sunrise/tts_voices_sunrise.yml +++ b/Resources/Prototypes/_Sunrise/tts_voices_sunrise.yml @@ -218,3 +218,10 @@ sex: Male speaker: dota2_pudge provider: sunrise + +- type: ttsVoice + id: TF2Soldier + name: tts-voice-name-tf2-soldier + sex: Male + speaker: tf2_soldier + provider: sunrise From 5efc51b30419881d6c9d8e4afdd217c5697d54d5 Mon Sep 17 00:00:00 2001 From: haiwwkes <49613070+rhailrake@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:23:41 +0500 Subject: [PATCH 3/3] tweaks (#451) * tweak: add RestrictedRange to prison and transit hub. * tweak: make laydown better * ay lmaoo --- .../LayDown/LieDownPressingButtonSystem.cs | 8 +++ .../Salvage/RestrictedRangeSystem.cs | 4 +- .../Systems/EmergencyShuttleSystem.cs | 8 +++ .../LieDown/LieDownPressingButtonSystem.cs | 8 +++ .../PlanetPrison/PlanetPrisonStationSystem.cs | 9 +++ .../LieDownPressingButton/LieDownComponent.cs | 8 +++ .../SharedLieDownPressingButtonSystem.cs | 59 ++++++++++++++----- 7 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 Content.Client/_Sunrise/LayDown/LieDownPressingButtonSystem.cs create mode 100644 Content.Server/_Sunrise/LieDown/LieDownPressingButtonSystem.cs diff --git a/Content.Client/_Sunrise/LayDown/LieDownPressingButtonSystem.cs b/Content.Client/_Sunrise/LayDown/LieDownPressingButtonSystem.cs new file mode 100644 index 0000000000..6480005da7 --- /dev/null +++ b/Content.Client/_Sunrise/LayDown/LieDownPressingButtonSystem.cs @@ -0,0 +1,8 @@ +using Content.Shared._Sunrise.SharedLieDownPressingButtonSystem; + +namespace Content.Client._Sunrise.LayDown; + +public sealed class LieDownPressingButtonSystem : SharedLieDownPressingButtonSystem +{ + +} diff --git a/Content.Server/Salvage/RestrictedRangeSystem.cs b/Content.Server/Salvage/RestrictedRangeSystem.cs index f43d814538..cf8d5af3cc 100644 --- a/Content.Server/Salvage/RestrictedRangeSystem.cs +++ b/Content.Server/Salvage/RestrictedRangeSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Salvage; using Robust.Shared.Map; using Robust.Shared.Physics.Collision.Shapes; using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Systems; namespace Content.Server.Salvage; @@ -36,7 +37,8 @@ public sealed class RestrictedRangeSystem : SharedRestrictedRangeSystem boundaryUid, cShape, "boundary", - collisionLayer: (int) (CollisionGroup.HighImpassable | CollisionGroup.Impassable | CollisionGroup.LowImpassable), + collisionLayer: (int) CollisionGroup.AllMask, + collisionMask: (int) CollisionGroup.AllMask, body: boundaryPhysics); _physics.WakeBody(boundaryUid, body: boundaryPhysics); AddComp(boundaryUid); diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index a783182b45..248dd84430 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -47,6 +47,7 @@ using Robust.Shared.Timing; using Robust.Shared.Utility; using Content.Server.GameTicking; using Content.Shared.Parallax.Biomes; +using Content.Shared.Salvage; using Robust.Shared.Audio; namespace Content.Server.Shuttles.Systems; @@ -574,6 +575,13 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem return; } + var restricted = new RestrictedRangeComponent + { + Origin = new Vector2(0, 0), + Range = 160, + }; + AddComp(mapUid, restricted); + EnsureComp(mapUid); Log.Info($"Created transit hub grid {ToPrettyString(uids[0])} on map {ToPrettyString(mapUid)} for station {ToPrettyString(station)}"); diff --git a/Content.Server/_Sunrise/LieDown/LieDownPressingButtonSystem.cs b/Content.Server/_Sunrise/LieDown/LieDownPressingButtonSystem.cs new file mode 100644 index 0000000000..4b1a328d66 --- /dev/null +++ b/Content.Server/_Sunrise/LieDown/LieDownPressingButtonSystem.cs @@ -0,0 +1,8 @@ +using Content.Shared._Sunrise.SharedLieDownPressingButtonSystem; + +namespace Content.Server._Sunrise.LieDown; + +public sealed class LieDownPressingButtonSystem : SharedLieDownPressingButtonSystem +{ + +} diff --git a/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs b/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs index 17cf897173..eaca5c9ec7 100644 --- a/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs +++ b/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs @@ -1,4 +1,5 @@ using System.Linq; +using System.Numerics; using Content.Server._Sunrise.NightDayMapLight; using Content.Server.Chat.Managers; using Content.Server.GameTicking; @@ -8,6 +9,7 @@ using Content.Server.Shuttles.Systems; using Content.Shared._Sunrise.Shuttles; using Content.Shared._Sunrise.SunriseCCVars; using Content.Shared.Parallax.Biomes; +using Content.Shared.Salvage; using Content.Shared.Shuttles.Components; using Robust.Server.GameObjects; using Robust.Server.Maps; @@ -130,6 +132,13 @@ public sealed class PlanetPrisonStationSystem : EntitySystem _biomeSystem.EnsurePlanet(mapUid, biome); + var restricted = new RestrictedRangeComponent + { + Origin = new Vector2(0, 0), + Range = 160, + }; + AddComp(mapUid, restricted); + EnsureComp(mapUid); var destComp = _entManager.EnsureComponent(mapUid); diff --git a/Content.Shared/_Sunrise/LieDownPressingButton/LieDownComponent.cs b/Content.Shared/_Sunrise/LieDownPressingButton/LieDownComponent.cs index c1f22c1d84..06ea5990f0 100644 --- a/Content.Shared/_Sunrise/LieDownPressingButton/LieDownComponent.cs +++ b/Content.Shared/_Sunrise/LieDownPressingButton/LieDownComponent.cs @@ -1,4 +1,6 @@ +using Content.Shared.DoAfter; using Robust.Shared.GameStates; +using Robust.Shared.Serialization; namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem { @@ -10,3 +12,9 @@ namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem public bool Lied { get; set; } = false; } } + + +[Serializable, NetSerializable] +public sealed partial class LieDownDoAfterEvent : SimpleDoAfterEvent +{ +} diff --git a/Content.Shared/_Sunrise/LieDownPressingButton/SharedLieDownPressingButtonSystem.cs b/Content.Shared/_Sunrise/LieDownPressingButton/SharedLieDownPressingButtonSystem.cs index fbca48df0a..035e1b8d81 100644 --- a/Content.Shared/_Sunrise/LieDownPressingButton/SharedLieDownPressingButtonSystem.cs +++ b/Content.Shared/_Sunrise/LieDownPressingButton/SharedLieDownPressingButtonSystem.cs @@ -1,17 +1,18 @@ +using Content.Shared.DoAfter; using Robust.Shared.Player; using Robust.Shared.Input.Binding; using JetBrains.Annotations; using Content.Shared.Humanoid; -using Content.Shared.Rotation; -using Content.Shared.Popups; +using Content.Shared.Movement.Systems; using Content.Shared.Standing; namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem { - public class SharedLieDownPressingButtonSystem : EntitySystem + public abstract class SharedLieDownPressingButtonSystem : EntitySystem { [Dependency] private readonly StandingStateSystem _standing = default!; - [Dependency] private readonly SharedPopupSystem _popup = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; static private Angle _defaultAngleRotation = 0; @@ -22,7 +23,37 @@ namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem CommandBinds.Builder .Bind(KeyFunctions.LieDown, InputCmdHandler.FromDelegate(HandlePressButtonLieDown, handle: false, outsidePrediction: false)) .Register(); + + SubscribeLocalEvent(OnDoAfter); + SubscribeLocalEvent(OnRefreshMovementSpeed); } + + private void OnDoAfter(Entity ent, ref LieDownDoAfterEvent args) + { + if (args.Handled || args.Cancelled) + return; + + if (!TryComp(ent, out var standingStateComponent)) + return; + + if (!standingStateComponent.Standing) + { + TryStand((ent, standingStateComponent)); + return; + } + + TryLieDown((ent, standingStateComponent)); + } + + + private void OnRefreshMovementSpeed(Entity ent, ref RefreshMovementSpeedModifiersEvent args) + { + if (_standing.IsDown(ent)) + args.ModifySpeed(0.4f, 0.4f); + else + args.ModifySpeed(1f, 1f); + } + private void HandlePressButtonLieDown(ICommonSession? session) { if (session?.AttachedEntity is var attachedEnt && attachedEnt is null) @@ -30,13 +61,12 @@ namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem var ent = attachedEnt.Value; - if (TryComp(ent, out var standingStateComponent)) - if (!standingStateComponent.Standing) - { - TryStand((ent, standingStateComponent)); - return; - } - TryLieDown((ent, standingStateComponent)); + var doAfterArgs = new DoAfterArgs(EntityManager, ent, 1, new LieDownDoAfterEvent(), ent, ent) + { + BreakOnDamage = true, + }; + + _doAfter.TryStartDoAfter(doAfterArgs); } [PublicAPI] @@ -56,10 +86,8 @@ namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem private void LieDown(Entity ent) { /*_rotationVisuals.SetHorizontalAngle(ent.Owner, _defaultAngleRotation);*/ - _standing.Down(ent, playSound: false, dropHeldItems: false, force: true); - - _popup.PopupPredicted("Ложится прямо как в матрице!", ent, ent); - + _standing.Down(ent, playSound: true, dropHeldItems: false, force: true); + _movementSpeed.RefreshMovementSpeedModifiers(ent); /*Dirty(ent);*/ } @@ -76,6 +104,7 @@ namespace Content.Shared._Sunrise.SharedLieDownPressingButtonSystem private void Stand(Entity ent) { _standing.Stand(ent, standingState: ent.Comp); + _movementSpeed.RefreshMovementSpeedModifiers(ent); /*_rotationVisuals.ResetHorizontalAngle(ent.Owner);*/ /*Dirty(ent);*/