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:
|
case CartridgeAmmoComponent cartridge:
|
||||||
if (!cartridge.Spent)
|
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)
|
if (cartridge.Count > 1)
|
||||||
{
|
{
|
||||||
var ev = new GunGetAmmoSpreadEvent(cartridge.Spread);
|
var ev = new GunGetAmmoSpreadEvent(cartridge.Spread);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using Content.Shared.Weapons.Ranged.Systems;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Prototypes;
|
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||||
|
|
||||||
namespace Content.Shared.Weapons.Ranged.Components;
|
namespace Content.Shared.Weapons.Ranged.Components;
|
||||||
@@ -180,18 +179,6 @@ public sealed partial class GunComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public bool ResetOnHandSelected = true;
|
public bool ResetOnHandSelected = true;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Type of ammo the gun can work with
|
|
||||||
/// </summary>
|
|
||||||
[DataField]
|
|
||||||
public List<ProtoId<TagPrototype>>? CompatibleAmmo;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Damage the gun deals when used with wrong ammo
|
|
||||||
/// </summary>
|
|
||||||
[DataField]
|
|
||||||
public DamageSpecifier? DamageOnWrongAmmo = null;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The base value for how fast the projectile moves.
|
/// The base value for how fast the projectile moves.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ gun-selected-mode = Selected {$mode}
|
|||||||
gun-disabled = You can't use guns!
|
gun-disabled = You can't use guns!
|
||||||
gun-clumsy = The gun blows up in your face!
|
gun-clumsy = The gun blows up in your face!
|
||||||
gun-set-fire-mode = Set to {$mode}
|
gun-set-fire-mode = Set to {$mode}
|
||||||
gun-component-wrong-ammo = Wrong ammo!
|
|
||||||
|
|
||||||
# SelectiveFire
|
# SelectiveFire
|
||||||
gun-SemiAuto = semi-auto
|
gun-SemiAuto = semi-auto
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: BaseShellShotgun
|
id: BaseShellShotgun
|
||||||
name: shell (.50)
|
name: shell (.50)
|
||||||
parent: BaseCartridge
|
parent: BaseCartridge
|
||||||
@@ -155,14 +155,13 @@
|
|||||||
name: uranium shotgun shell
|
name: uranium shotgun shell
|
||||||
parent: BaseShellShotgun
|
parent: BaseShellShotgun
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
layers:
|
layers:
|
||||||
- state: depleted-uranium
|
- state: depleted-uranium
|
||||||
map: [ "enum.AmmoVisualLayers.Base" ]
|
map: [ "enum.AmmoVisualLayers.Base" ]
|
||||||
- type: CartridgeAmmo
|
- type: CartridgeAmmo
|
||||||
count: 5
|
count: 5
|
||||||
spread: 6
|
spread: 6
|
||||||
proto: PelletShotgunUranium
|
proto: PelletShotgunUranium
|
||||||
- type: SpentAmmoVisuals
|
- type: SpentAmmoVisuals
|
||||||
state: "depleted-uranium"
|
state: "depleted-uranium"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: PelletShotgunSlug
|
id: PelletShotgunSlug
|
||||||
name: pellet (.50 slug)
|
name: pellet (.50 slug)
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
@@ -132,10 +132,7 @@
|
|||||||
!type:PhysShapeAabb
|
!type:PhysShapeAabb
|
||||||
bounds: "-0.1,-0.1,0.1,0.1"
|
bounds: "-0.1,-0.1,0.1,0.1"
|
||||||
mask:
|
mask:
|
||||||
- BulletImpassable
|
- BulletImpassable
|
||||||
- type: Tag
|
|
||||||
tags:
|
|
||||||
- PelletShotgunFlare
|
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
|
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
|
||||||
state: buckshot-flare
|
state: buckshot-flare
|
||||||
|
|||||||
@@ -17,13 +17,8 @@
|
|||||||
selectedMode: SemiAuto
|
selectedMode: SemiAuto
|
||||||
availableModes:
|
availableModes:
|
||||||
- SemiAuto
|
- SemiAuto
|
||||||
compatibleAmmo:
|
|
||||||
- PelletShotgunFlare
|
|
||||||
soundGunshot:
|
soundGunshot:
|
||||||
path: /Audio/Weapons/Guns/Gunshots/flaregun.ogg
|
path: /Audio/Weapons/Guns/Gunshots/flaregun.ogg
|
||||||
damageOnWrongAmmo:
|
|
||||||
types:
|
|
||||||
Blunt: 6.0
|
|
||||||
- type: BallisticAmmoProvider
|
- type: BallisticAmmoProvider
|
||||||
whitelist:
|
whitelist:
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -1022,9 +1022,6 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: ShellShotgun
|
id: ShellShotgun
|
||||||
|
|
||||||
- type: Tag
|
|
||||||
id: PelletShotgunFlare
|
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Shiv
|
id: Shiv
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user