Make flare gun explode, damage and stun the player when used with the wrong ammo (#22349)
* Flare gun can now only be loaded with actual flares * Make flare gun loadable with other shells, but destroy it and damage and stun the user when used * tweak * Logic fix + QOL add-ons * damageOnWrongAmmo in gun component * cleanup
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
|
||||
namespace Content.Shared.Weapons.Ranged.Components;
|
||||
|
||||
@@ -110,6 +114,18 @@ public partial class GunComponent : Component
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("resetOnHandSelected")]
|
||||
public bool ResetOnHandSelected = true;
|
||||
|
||||
/// <summary>
|
||||
/// Type of ammo the gun can work with
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("compatibleAmmo")]
|
||||
public List<ProtoId<TagPrototype>>? CompatibleAmmo;
|
||||
|
||||
/// <summary>
|
||||
/// Damage the gun deals when used with wrong ammo
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("damageOnWrongAmmo")]
|
||||
public DamageSpecifier? DamageOnWrongAmmo = null;
|
||||
|
||||
/// <summary>
|
||||
/// How fast the projectile moves.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user