Merge remote-tracking branch 'upstream/master' into ups

This commit is contained in:
Jabak
2024-07-26 21:32:42 +03:00
790 changed files with 5278 additions and 138 deletions

View File

@@ -86,10 +86,10 @@ public abstract partial class SharedBuckleSystem : EntitySystem
case StrapPosition.None:
break;
case StrapPosition.Stand:
_standing.Stand(buckleUid);
_standing.Stand(buckleUid, unbuckle: false);
break;
case StrapPosition.Down:
_standing.Down(buckleUid, false, false);
_standing.Down(buckleUid, false, false, false);
break;
}
}

View File

@@ -186,7 +186,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
return false;
}
Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, standingState);
Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, true, standingState);
return true;
}
// WD EDIT END
@@ -203,6 +203,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
EntityUid uid,
bool playSound = true,
bool dropHeldItems = true,
bool unbuckle = true, // WD EDIT
StandingStateComponent? standingState = null,
AppearanceComponent? appearance = null,
HandsComponent? hands = null)
@@ -292,7 +293,8 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
EntityUid uid,
StandingStateComponent? standingState = null,
AppearanceComponent? appearance = null,
bool force = false)
bool force = false,
bool unbuckle = true) // WD EDIT
{
if (!Resolve(uid, ref standingState, false))
return false;
@@ -300,7 +302,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
// Optional component.
Resolve(uid, ref appearance, false);
if (TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT
if (unbuckle && TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT
return false;
if (standingState.CurrentState is StandingState.Standing)

View File

@@ -361,7 +361,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
return false;
}
if (_container.IsEntityInContainer(target))
if (_container.IsEntityInContainer(target) && !_container.ContainsEntity(target, user)) // WD EDIT
{
if (_container.TryGetOuterContainer(target,Transform(target) ,out var container) &&
!HasComp<HandsComponent>(container.Owner))

View File

@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using Content.Shared._White.Containers;
using Content.Shared._White.Events;
using Content.Shared._White.WeaponModules;
using Content.Shared.ActionBlocker;
@@ -230,7 +231,12 @@ public abstract partial class SharedGunSystem : EntitySystem
private void AttemptShoot(EntityUid user, EntityUid gunUid, GunComponent gun)
{
if (gun.FireRateModified <= 0f ||
!_actionBlockerSystem.CanAttack(user))
!_actionBlockerSystem.CanAttack(user) || TryComp(gunUid, out UseDelayComponent? useDelay) &&
_useDelay.IsDelayed((gunUid, useDelay))) // WD EDIT
return;
if (Containers.TryGetOuterContainer(user, Transform(user), out var container) &&
HasComp<ShootBlockerContainerComponent>(container.Owner)) // WD
return;
var toCoordinates = gun.ShootCoordinates;

View File

@@ -1,6 +1,7 @@
using Content.Shared.Coordinates;
using Content.Shared.Humanoid;
using Content.Shared.Interaction.Events;
using Content.Shared.Polymorph.Components;
using Content.Shared.Stealth.Components;
using JetBrains.Annotations;
using Robust.Shared.Timing;
@@ -54,6 +55,9 @@ public sealed class WhistleSystem : EntitySystem
if (TryComp(iterator, out stealth) && stealth.Enabled)
continue;
if (HasComp<ChameleonDisguisedComponent>(iterator)) // WD
continue;
//We don't want to ping user of whistle
if (iterator.Owner == owner)
continue;

View File

@@ -6,5 +6,5 @@ namespace Content.Shared._White.BuffedFlashGrenade;
public sealed partial class FlashSoundSuppressionComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MaxRange = 3f;
public float MaxRange = 2f;
}

View File

@@ -0,0 +1,6 @@
namespace Content.Shared._White.Containers;
[RegisterComponent]
public sealed partial class ShootBlockerContainerComponent : Component
{
}

View File

@@ -11,10 +11,10 @@ public sealed class ConcealableSystem : EntitySystem
base.Initialize();
SubscribeLocalEvent<ConcealableComponent, ExamineAttemptEvent>(OnExamine);
SubscribeLocalEvent<ConcealableComponent, InteractionAttemptEvent>(OnInteract);
SubscribeLocalEvent<ConcealableComponent, GettingInteractedWithAttemptEvent>(OnInteract);
}
private void OnInteract(Entity<ConcealableComponent> ent, ref InteractionAttemptEvent args)
private void OnInteract(Entity<ConcealableComponent> ent, ref GettingInteractedWithAttemptEvent args)
{
if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false})
args.Cancel();

View File

@@ -0,0 +1,8 @@
namespace Content.Shared._White.WeaponModules;
[RegisterComponent]
public sealed partial class ShutterModuleComponent : BaseModuleComponent
{
[ViewVariables(VVAccess.ReadWrite), DataField]
public string Tag;
}

View File

@@ -21,7 +21,8 @@ public enum ModuleVisualState : byte
{
BarrelModule,
HandGuardModule,
AimModule
AimModule,
ShutterModule
}
[Serializable, NetSerializable]