Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b7cb8d82d1
10 changed files with 113 additions and 16 deletions
|
|
@ -0,0 +1,8 @@
|
|||
using Content.Shared._Sunrise.SharedLieDownPressingButtonSystem;
|
||||
|
||||
namespace Content.Client._Sunrise.LayDown;
|
||||
|
||||
public sealed class LieDownPressingButtonSystem : SharedLieDownPressingButtonSystem
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -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<BoundaryComponent>(boundaryUid);
|
||||
|
|
|
|||
|
|
@ -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<NightDayMapLightComponent>(mapUid);
|
||||
|
||||
Log.Info($"Created transit hub grid {ToPrettyString(uids[0])} on map {ToPrettyString(mapUid)} for station {ToPrettyString(station)}");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
using Content.Shared._Sunrise.SharedLieDownPressingButtonSystem;
|
||||
|
||||
namespace Content.Server._Sunrise.LieDown;
|
||||
|
||||
public sealed class LieDownPressingButtonSystem : SharedLieDownPressingButtonSystem
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -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<NightDayMapLightComponent>(mapUid);
|
||||
|
||||
var destComp = _entManager.EnsureComponent<FTLDestinationComponent>(mapUid);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<SharedLieDownPressingButtonSystem>();
|
||||
|
||||
SubscribeLocalEvent<StandingStateComponent, LieDownDoAfterEvent>(OnDoAfter);
|
||||
SubscribeLocalEvent<StandingStateComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovementSpeed);
|
||||
}
|
||||
|
||||
private void OnDoAfter(Entity<StandingStateComponent> ent, ref LieDownDoAfterEvent args)
|
||||
{
|
||||
if (args.Handled || args.Cancelled)
|
||||
return;
|
||||
|
||||
if (!TryComp<StandingStateComponent>(ent, out var standingStateComponent))
|
||||
return;
|
||||
|
||||
if (!standingStateComponent.Standing)
|
||||
{
|
||||
TryStand((ent, standingStateComponent));
|
||||
return;
|
||||
}
|
||||
|
||||
TryLieDown((ent, standingStateComponent));
|
||||
}
|
||||
|
||||
|
||||
private void OnRefreshMovementSpeed(Entity<StandingStateComponent> 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<StandingStateComponent>(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<StandingStateComponent?> 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<StandingStateComponent> ent)
|
||||
{
|
||||
_standing.Stand(ent, standingState: ent.Comp);
|
||||
_movementSpeed.RefreshMovementSpeedModifiers(ent);
|
||||
/*_rotationVisuals.ResetHorizontalAngle(ent.Owner);*/
|
||||
|
||||
/*Dirty(ent);*/
|
||||
|
|
|
|||
|
|
@ -4024,3 +4024,20 @@
|
|||
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
|
||||
- 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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue