Merge remote-tracking branch 'origin/master' into weapon-modules
This commit is contained in:
@@ -15,7 +15,6 @@ using Content.Shared.Speech;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Strip.Components;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Physics.Components;
|
||||
|
||||
namespace Content.Shared.Mobs.Systems;
|
||||
|
||||
@@ -56,12 +55,7 @@ public partial class MobStateSystem
|
||||
_standing.Stand(target);
|
||||
break;
|
||||
case MobState.Dead:
|
||||
RemComp<CollisionWakeComponent>(target);
|
||||
_standing.Stand(target);
|
||||
if (!_standing.IsDown(target) && TryComp<PhysicsComponent>(target, out var physics))
|
||||
{
|
||||
_physics.SetCanCollide(target, true, body: physics);
|
||||
}
|
||||
|
||||
break;
|
||||
case MobState.Invalid:
|
||||
@@ -91,14 +85,8 @@ public partial class MobStateSystem
|
||||
_appearance.SetData(target, MobStateVisuals.State, MobState.Critical);
|
||||
break;
|
||||
case MobState.Dead:
|
||||
EnsureComp<CollisionWakeComponent>(target);
|
||||
_standing.Down(target);
|
||||
|
||||
if (_standing.IsDown(target) && TryComp<PhysicsComponent>(target, out var physics))
|
||||
{
|
||||
_physics.SetCanCollide(target, false, body: physics);
|
||||
}
|
||||
|
||||
_appearance.SetData(target, MobStateVisuals.State, MobState.Dead);
|
||||
break;
|
||||
case MobState.Invalid:
|
||||
|
||||
@@ -190,6 +190,10 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
||||
|
||||
private void PreventCollision(EntityUid uid, ProjectileComponent component, ref PreventCollideEvent args)
|
||||
{
|
||||
// Shoot yourself!
|
||||
if (args.OtherEntity == component.Target) // WD
|
||||
return;
|
||||
|
||||
if (component.IgnoreShooter && (args.OtherEntity == component.Shooter || args.OtherEntity == component.Weapon))
|
||||
{
|
||||
args.Cancelled = true;
|
||||
@@ -356,4 +360,4 @@ public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target
|
||||
/// Raised after a projectile has dealt it's damage.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture);
|
||||
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Stunnable;
|
||||
@@ -23,6 +24,12 @@ public sealed class BloodSpearSystem : EntitySystem
|
||||
SubscribeLocalEvent<BloodSpearComponent, ComponentRemove>(OnRemove);
|
||||
SubscribeLocalEvent<BloodSpearComponent, GotEquippedHandEvent>(OnEquip);
|
||||
SubscribeLocalEvent<BloodSpearComponent, ThrowDoHitEvent>(OnThrowDoHit);
|
||||
SubscribeLocalEvent<BloodSpearComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
private void OnExamine(Entity<BloodSpearComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("blood-spear-component-extra-desc"));
|
||||
}
|
||||
|
||||
private void OnThrowDoHit(Entity<BloodSpearComponent> ent, ref ThrowDoHitEvent args)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Ghost;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Hands.Components;
|
||||
@@ -29,6 +30,12 @@ public sealed class BoltBarrageSystem : EntitySystem
|
||||
SubscribeLocalEvent<BoltBarrageComponent, UnequippedHandEvent>(OnUnequipHand);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, ContainerGettingRemovedAttemptEvent>(OnRemoveAttempt);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, OnEmptyGunShotEvent>(OnEmptyShot);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
private void OnExamine(Entity<BoltBarrageComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("bolt-barrage-component-extra-desc"));
|
||||
}
|
||||
|
||||
private void OnUnequipHand(Entity<BoltBarrageComponent> ent, ref UnequippedHandEvent args)
|
||||
@@ -51,7 +58,7 @@ public sealed class BoltBarrageSystem : EntitySystem
|
||||
|
||||
private void OnDrop(Entity<BoltBarrageComponent> ent, ref DroppedEvent args)
|
||||
{
|
||||
if (_net.IsServer)
|
||||
if (_net.IsServer && ent.Comp.Unremoveable)
|
||||
QueueDel(ent);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Content.Shared._White.Keyhole.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
[RegisterComponent, Virtual]
|
||||
public partial class KeyBaseComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
|
||||
@@ -4,5 +4,13 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared._White.Keyhole;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed partial class KeyInsertDoAfterEvent : SimpleDoAfterEvent {}
|
||||
public sealed partial class KeyInsertDoAfterEvent : SimpleDoAfterEvent
|
||||
{
|
||||
public int FormId;
|
||||
|
||||
public KeyInsertDoAfterEvent(int formId)
|
||||
{
|
||||
FormId = formId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user