Merge remote-tracking branch 'upstream/master' into ed-19-08-2024-upstream
# Conflicts: # Content.IntegrationTests/Tests/PostMapInitTest.cs # Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs # Content.Shared/Clothing/Components/ClothingComponent.cs # Resources/Prototypes/Accents/word_replacements.yml # Resources/Prototypes/Maps/Pools/default.yml # Resources/Prototypes/Maps/atlas.yml # Resources/Prototypes/Maps/bagel.yml # Resources/Prototypes/Maps/cluster.yml # Resources/Prototypes/Maps/europa.yml # Resources/Prototypes/Maps/omega.yml # Resources/Prototypes/Maps/origin.yml # Resources/Prototypes/Traits/speech.yml # Resources/Prototypes/Voice/disease_emotes.yml # Resources/Prototypes/Voice/speech_emotes.yml # Resources/Prototypes/game_presets.yml # Resources/Prototypes/secret_weights.yml
This commit is contained in:
@@ -2,6 +2,7 @@ using Content.Server.Administration.Logs;
|
||||
using Content.Server.Damage.Components;
|
||||
using Content.Server.Weapons.Ranged.Systems;
|
||||
using Content.Shared._CP14.MeleeWeapon.Components;
|
||||
using Content.Shared.CombatMode.Pacification;
|
||||
using Content.Shared.Camera;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Events;
|
||||
@@ -10,6 +11,7 @@ using Content.Shared.Database;
|
||||
using Content.Shared.Effects;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Wires;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
@@ -29,6 +31,7 @@ namespace Content.Server.Damage.Systems
|
||||
{
|
||||
SubscribeLocalEvent<DamageOtherOnHitComponent, ThrowDoHitEvent>(OnDoHit);
|
||||
SubscribeLocalEvent<DamageOtherOnHitComponent, DamageExamineEvent>(OnDamageExamine);
|
||||
SubscribeLocalEvent<DamageOtherOnHitComponent, AttemptPacifiedThrowEvent>(OnAttemptPacifiedThrow);
|
||||
}
|
||||
|
||||
private void OnDoHit(EntityUid uid, DamageOtherOnHitComponent component, ThrowDoHitEvent args)
|
||||
@@ -71,5 +74,13 @@ namespace Content.Server.Damage.Systems
|
||||
|
||||
_damageExamine.AddDamageExamine(args.Message, damage, Loc.GetString("damage-throw"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prevent players with the Pacified status effect from throwing things that deal damage.
|
||||
/// </summary>
|
||||
private void OnAttemptPacifiedThrow(Entity<DamageOtherOnHitComponent> ent, ref AttemptPacifiedThrowEvent args)
|
||||
{
|
||||
args.Cancel("pacified-cannot-throw");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user