Revert "Make flare gun explode, damage and stun the player when used … (#24679)
* Revert "Make flare gun explode, damage and stun the player when used with the wrong ammo (#22349)"
This reverts commit e301378114.
# Conflicts:
# Content.Shared/Weapons/Ranged/Components/GunComponent.cs
# Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml
# Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml
* Fix revert conflicts
* Update Content.Shared/Weapons/Ranged/Components/GunComponent.cs
This commit is contained in:
@@ -130,27 +130,6 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
case CartridgeAmmoComponent cartridge:
|
||||
if (!cartridge.Spent)
|
||||
{
|
||||
if (gun.CompatibleAmmo != null &&
|
||||
!gun.CompatibleAmmo.Exists(ammoAllowed => ammoAllowed.Equals(cartridge.Prototype))
|
||||
&& user != null)
|
||||
{
|
||||
if (gun.DamageOnWrongAmmo != null)
|
||||
Damageable.TryChangeDamage(user, gun.DamageOnWrongAmmo, origin: user);
|
||||
_stun.TryParalyze(user.Value, TimeSpan.FromSeconds(3f), true);
|
||||
|
||||
Audio.PlayPvs(new SoundPathSpecifier("/Audio/Weapons/Guns/Gunshots/bang.ogg"), gunUid);
|
||||
|
||||
PopupSystem.PopupEntity(Loc.GetString("gun-component-wrong-ammo"), user.Value);
|
||||
_adminLogger.Add(LogType.EntityDelete, LogImpact.Medium, $"Shot wrong ammo by {ToPrettyString(user.Value)} deleted {ToPrettyString(gunUid)}");
|
||||
userImpulse = false;
|
||||
|
||||
SetCartridgeSpent(ent!.Value, cartridge, true);
|
||||
MuzzleFlash(gunUid, cartridge, user);
|
||||
Del(gunUid);
|
||||
if (cartridge.DeleteOnSpawn)
|
||||
Del(ent.Value);
|
||||
return;
|
||||
}
|
||||
if (cartridge.Count > 1)
|
||||
{
|
||||
var ev = new GunGetAmmoSpreadEvent(cartridge.Spread);
|
||||
|
||||
Reference in New Issue
Block a user