Felinid fixes and stuff. (#524)
* - add: Felinid fixes and stuff. * - fix: Fix felinids disappearing.
This commit is contained in:
@@ -227,7 +227,7 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
|
||||
if (TryComp<VirtualItemComponent>(args.Used, out var virtualItem)) // WD
|
||||
{
|
||||
RaiseLocalEvent(uid, new PseudoItemInteractEvent(virtualItem.BlockingEntity, args.User));
|
||||
RaiseLocalEvent(uid, new PseudoItemInteractEvent(virtualItem.BlockingEntity, args.User, args.Used));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -517,6 +517,9 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
if (!ActionBlocker.CanInteract(player, itemEnt))
|
||||
return;
|
||||
|
||||
if (HasComp<PseudoItemComponent>(itemEnt)) // WD
|
||||
return;
|
||||
|
||||
TransformSystem.DropNextTo(itemEnt, player);
|
||||
Audio.PlayPredicted(storageComp.StorageRemoveSound, storageEnt, player);
|
||||
}
|
||||
@@ -681,6 +684,8 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
|
||||
foreach (var entity in entities.ToArray())
|
||||
{
|
||||
if (HasComp<PseudoItemComponent>(entity)) // WD
|
||||
continue;
|
||||
Insert(target, entity, out _, user: user, targetComp, playSound: false);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ using Content.Shared.Standing.Systems;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
namespace Content.Shared.Stunnable;
|
||||
|
||||
@@ -27,6 +28,7 @@ public abstract class SharedStunSystem : EntitySystem
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly SharedStandingStateSystem _standingState = default!;
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffect = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Friction modifier for knocked down players.
|
||||
@@ -115,7 +117,7 @@ public abstract class SharedStunSystem : EntitySystem
|
||||
if (!TryComp(uid, out StandingStateComponent? standing) || !(!standing.CanLieDown || standing.AutoGetUp)) // WD EDIT
|
||||
return;
|
||||
|
||||
if (standing.AutoGetUp) // WD EDIT
|
||||
if (standing.AutoGetUp && !_container.IsEntityInContainer(uid)) // WD EDIT
|
||||
{
|
||||
_standingState.TryStandUp(uid, standing);
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Item;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.Item.PseudoItem;
|
||||
|
||||
@@ -28,9 +30,15 @@ public abstract class SharedPseudoItemSystem : EntitySystem
|
||||
protected virtual void OnGettingPickedUp(Entity<PseudoItemComponent> ent, GettingPickedUpAttemptEvent args) {}
|
||||
}
|
||||
|
||||
public sealed class PseudoItemInteractEvent(EntityUid used, EntityUid user)
|
||||
public sealed class PseudoItemInteractEvent(EntityUid used, EntityUid user, EntityUid virtualItem)
|
||||
: EntityEventArgs
|
||||
{
|
||||
public EntityUid Used { get; } = used;
|
||||
public EntityUid User { get; } = user;
|
||||
public EntityUid VirtualItem { get; } = virtualItem;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed partial class PseudoItemInsertEvent : SimpleDoAfterEvent
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user