Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jabak
2024-06-03 19:54:40 +03:00
104 changed files with 2329 additions and 184889 deletions

View File

@@ -42,7 +42,7 @@ namespace Content.Server.Bed.Sleep
_actionsSystem.AddAction(uid, ref component.WakeAction, WakeActionId, uid);
// TODO remove hardcoded time.
_actionsSystem.SetCooldown(component.WakeAction, _gameTiming.CurTime, _gameTiming.CurTime + TimeSpan.FromSeconds(2f));
_actionsSystem.SetCooldown(component.WakeAction, _gameTiming.CurTime, _gameTiming.CurTime + TimeSpan.FromSeconds(15f)); // WD EDIT
}
private void OnShutdown(EntityUid uid, SleepingComponent component, ComponentShutdown args)
@@ -88,4 +88,4 @@ public sealed partial class WakeActionEvent : InstantActionEvent;
public sealed class SleepStateChangedEvent(bool fellAsleep) : EntityEventArgs
{
public bool FellAsleep = fellAsleep;
}
}

View File

@@ -0,0 +1,44 @@
using Content.Shared.Security;
using Robust.Shared.Serialization;
namespace Content.Shared._White.SecurityHud;
[Serializable, NetSerializable]
public enum SecurityHudUiKey
{
Key
}
[Serializable, NetSerializable]
public sealed class SecurityHudBUIState : BoundUserInterfaceState
{
public IReadOnlyCollection<string> Ids { get; set; }
public NetEntity User { get; set; }
public NetEntity Target { get; private set; }
public SecurityHudBUIState(IReadOnlyCollection<string> ids, NetEntity user, NetEntity target)
{
Ids = ids;
User = user;
Target = target;
}
}
[Serializable, NetSerializable]
public class SecurityHudStatusSelectedMessage : BoundUserInterfaceMessage
{
public SecurityStatus Status { get; private set; }
public NetEntity User { get; private set; }
public NetEntity Target { get; private set; }
public SecurityHudStatusSelectedMessage(SecurityStatus status, NetEntity user, NetEntity target)
{
Status = status;
User = user;
Target = target;
}
}

View File

@@ -54,7 +54,9 @@ public abstract class SharedTelescopeSystem : EntitySystem
!TryComp(ent, out EyeComponent? eye))
return;
SetOffset((ent, eye), msg.Offset, telescope);
var offset = Vector2.Lerp(eye.Offset, msg.Offset, telescope.LerpAmount);
SetOffset((ent, eye), offset, telescope);
}
private void SetOffset(Entity<EyeComponent> ent, Vector2 offset, TelescopeComponent telescope)

View File

@@ -6,7 +6,10 @@ namespace Content.Shared._White.Telescope;
public sealed partial class TelescopeComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float Divisor = 1f;
public float Divisor = 0.1f;
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float LerpAmount = 0.1f;
[ViewVariables]
public EntityUid? LastHoldingEntity;