[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");
return;
args.Handled = true;
- UseChambered(uid, component, args.User);
+ if (component.CanRack)
+ UseChambered(uid, component, args.User);
+ else
+ ToggleBolt(uid, component, args.User);
}
/// <summary>
/// </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()
- 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: Gun
- fireRate: 8
- selectedMode: SemiAuto
- availableModes:
- - 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: 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:
- ballistic-ammo: !type:Container
- ents: []
+ 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
+ availableModes:
+ - SemiAuto
+ soundGunshot:
+ path: /Audio/Weapons/Guns/Gunshots/flaregun.ogg
+
+
+- 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:
+ gun_chamber:
+ name: Chamber
+ priority: 1
+ whitelist:
+ tags:
+ - ShellShotgun
+ - type: Tag
+ tags:
+ - Sidearm
--- /dev/null
+{
+ "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
+ }
+ ]
+}