Rework the Flare Gun & add a Security Shell Gun. (#32829)
* Rework flaregun and add security shell gun * Make flare gun twice as likely to appear in emergency lockers * Security shell gun can now fire lethal shells like the flare gun used to be able to. * Rebalance the sec shell gun material cost to primarily be steel instead of plastic * Define the ShellShotgunLight tag in tags.yml * Leave the no lethal shells for normal flareguns to a different PR. * Move a comment to re-run checks. * Bye bye lethal shells from plastic guns. * Fix weird whitespace issue. * Make the sec shell gun inherit the normal flare gun. * Remove the rack verb and update the sec shell gun description * Remove the ability to fire lethals from flare guns, pending blowing up the gun --------- Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
@@ -22,6 +22,12 @@ public sealed partial class ChamberMagazineAmmoProviderComponent : MagazineAmmoP
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("autoCycle"), AutoNetworkedField]
|
||||
public bool AutoCycle = true;
|
||||
|
||||
/// <summary>
|
||||
/// Can the gun be racked, which opens and then instantly closes the bolt to cycle a round.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("canRack"), AutoNetworkedField]
|
||||
public bool CanRack = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("soundBoltClosed"), AutoNetworkedField]
|
||||
public SoundSpecifier? BoltClosedSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Bolt/rifle_bolt_closed.ogg");
|
||||
|
||||
|
||||
@@ -67,7 +67,10 @@ public abstract partial class SharedGunSystem
|
||||
return;
|
||||
|
||||
args.Handled = true;
|
||||
UseChambered(uid, component, args.User);
|
||||
if (component.CanRack)
|
||||
UseChambered(uid, component, args.User);
|
||||
else
|
||||
ToggleBolt(uid, component, args.User);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -75,7 +78,7 @@ public abstract partial class SharedGunSystem
|
||||
/// </summary>
|
||||
private void OnChamberActivationVerb(EntityUid uid, ChamberMagazineAmmoProviderComponent component, GetVerbsEvent<ActivationVerb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract || component.BoltClosed == null)
|
||||
if (!args.CanAccess || !args.CanInteract || component.BoltClosed == null || !component.CanRack)
|
||||
return;
|
||||
|
||||
args.Verbs.Add(new ActivationVerb()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
- id: MedkitOxygenFilled
|
||||
prob: 0.2
|
||||
- id: WeaponFlareGun
|
||||
prob: 0.05
|
||||
prob: 0.1
|
||||
- id: BoxMRE
|
||||
prob: 0.1
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
name: shell (.50 beanbag)
|
||||
parent: BaseShellShotgun
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Cartridge
|
||||
- ShellShotgun
|
||||
- ShellShotgunLight
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: beanbag
|
||||
@@ -52,6 +57,11 @@
|
||||
name: shell (.50 flare)
|
||||
parent: BaseShellShotgun
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Cartridge
|
||||
- ShellShotgun
|
||||
- ShellShotgunLight
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: flare
|
||||
@@ -106,6 +116,11 @@
|
||||
name: shell (.50 tranquilizer)
|
||||
parent: BaseShellShotgun
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Cartridge
|
||||
- ShellShotgun
|
||||
- ShellShotgunLight
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: tranquilizer
|
||||
@@ -130,6 +145,11 @@
|
||||
description: A homemade shotgun shell that shoots painful glass shrapnel. The spread is so wide that it couldn't hit the broad side of a barn.
|
||||
parent: BaseShellShotgun
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Cartridge
|
||||
- ShellShotgun
|
||||
- ShellShotgunLight
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: improvised
|
||||
|
||||
@@ -1,17 +1,44 @@
|
||||
- type: entity
|
||||
name: flare gun
|
||||
parent: BaseWeaponLauncher
|
||||
parent: BaseItem
|
||||
id: WeaponFlareGun
|
||||
description: A compact, single-shot pistol that fires shotgun shells.
|
||||
description: A compact, single-shot pistol that fires shotgun shells. Comes with a safety feature that prevents the user from fitting lethal shells inside.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Weapons/Guns/Shotguns/flaregun.rsi
|
||||
layers:
|
||||
- state: icon
|
||||
- state: base
|
||||
map: ["enum.GunVisualLayers.Base"]
|
||||
- type: Item
|
||||
size: Small
|
||||
sprite: Objects/Weapons/Guns/Shotguns/flaregun.rsi
|
||||
- type: ItemSlots
|
||||
slots:
|
||||
gun_chamber:
|
||||
name: Chamber
|
||||
startingItem: ShellShotgunFlare
|
||||
priority: 1
|
||||
whitelist:
|
||||
tags: ## TODO: Add a risk of the gun blowing up if using non-light shotgun shells, and then re-enable them.
|
||||
## - ShellShotgun
|
||||
- ShellShotgunLight
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
gun_chamber: !type:ContainerSlot
|
||||
- type: ChamberMagazineAmmoProvider
|
||||
autoCycle: false
|
||||
boltClosed: true
|
||||
canRack: false
|
||||
soundBoltClosed: /Audio/Weapons/Guns/Cock/revolver_cock.ogg
|
||||
soundBoltOpened: /Audio/Weapons/Guns/Cock/revolver_cock.ogg
|
||||
soundRack: /Audio/Weapons/Guns/Cock/revolver_cock.ogg
|
||||
- type: Clothing
|
||||
sprite: Objects/Weapons/Guns/Shotguns/flaregun.rsi
|
||||
quickEquip: false
|
||||
slots:
|
||||
- Belt
|
||||
- suitStorage
|
||||
- type: Appearance
|
||||
- type: Gun
|
||||
fireRate: 8
|
||||
selectedMode: SemiAuto
|
||||
@@ -19,21 +46,30 @@
|
||||
- SemiAuto
|
||||
soundGunshot:
|
||||
path: /Audio/Weapons/Guns/Gunshots/flaregun.ogg
|
||||
- type: BallisticAmmoProvider
|
||||
whitelist:
|
||||
tags:
|
||||
- ShellShotgun
|
||||
proto: ShellShotgunFlare
|
||||
capacity: 1
|
||||
soundInsert:
|
||||
path: /Audio/Weapons/Guns/MagIn/shotgun_insert.ogg
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
ballistic-ammo: !type:Container
|
||||
ents: []
|
||||
- type: Clothing
|
||||
sprite: Objects/Weapons/Guns/Shotguns/flaregun.rsi
|
||||
quickEquip: false
|
||||
|
||||
|
||||
- type: entity
|
||||
name: security shell gun
|
||||
parent: [WeaponFlareGun, BaseSecurityContraband]
|
||||
id: WeaponFlareGunSecurity
|
||||
description: A modified flare gun originally designed to be used by security to launch non-lethal shotgun shells, however it can also fire lethal shells without risk.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Weapons/Guns/Shotguns/flaregun_security.rsi
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.GunVisualLayers.Base"]
|
||||
- type: Item
|
||||
size: Small
|
||||
sprite: Objects/Weapons/Guns/Shotguns/flaregun_security.rsi
|
||||
- type: ItemSlots
|
||||
slots:
|
||||
- Belt
|
||||
- suitStorage
|
||||
gun_chamber:
|
||||
name: Chamber
|
||||
priority: 1
|
||||
whitelist:
|
||||
tags:
|
||||
- ShellShotgun
|
||||
- type: Tag
|
||||
tags:
|
||||
- Sidearm
|
||||
|
||||
@@ -603,6 +603,15 @@
|
||||
Plastic: 320
|
||||
Uranium: 240
|
||||
|
||||
- type: latheRecipe
|
||||
parent: BaseWeaponRecipe
|
||||
id: WeaponFlareGunSecurity
|
||||
result: WeaponFlareGunSecurity
|
||||
completetime: 6
|
||||
materials:
|
||||
Plastic: 100
|
||||
Steel: 400
|
||||
|
||||
- type: latheRecipe
|
||||
parent: BaseWeaponRecipe
|
||||
id: WeaponDisabler
|
||||
|
||||
@@ -1198,6 +1198,9 @@
|
||||
- type: Tag
|
||||
id: ShellShotgun
|
||||
|
||||
- type: Tag
|
||||
id: ShellShotgunLight # shotgun shells that are compatible with the flare gun.
|
||||
|
||||
- type: Tag
|
||||
id: Shiv
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 564 B |
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "icon"
|
||||
"name": "base"
|
||||
},
|
||||
{
|
||||
"name": "bolt-open"
|
||||
|
||||
|
After Width: | Height: | Size: 549 B |
|
After Width: | Height: | Size: 574 B |
|
After Width: | Height: | Size: 222 B |
|
After Width: | Height: | Size: 222 B |
|
After Width: | Height: | Size: 419 B |
|
After Width: | Height: | Size: 413 B |
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/3f9ebb72931ff884427c3004a594ec61aaaa7041/icons/obj/guns/projectile/flaregun.dmi and edited",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "base"
|
||||
},
|
||||
{
|
||||
"name": "bolt-open"
|
||||
},
|
||||
{
|
||||
"name": "inhand-right",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-left",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "equipped-BELT",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "equipped-SUITSTORAGE",
|
||||
"directions": 4
|
||||
}
|
||||
]
|
||||
}
|
||||