Gun Code Modularization + Magazine Fed Shotgun (#751)
* Adds shotgun YAML files * Adds shotgu ammo and magazine enum value, modularizes some projectile weapon methods * Fixes guns consuming two bullets on fire * Finishes shotgun behavior in Projectile Weapon Components * Gun and ammo modularization * Updates BallisticMagazineWeapons to be compatible with new AmmoWeapon * Fixes shotgun spread angles, Fixes shogun YAML * Gun documentation and ViewVariable specifications * Removes todo messsage in gun code * Default gun evenspread fix * AmmoComponent Name fix * Fixes Component name * Projectile refactor code review fixes
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Empty mags
|
||||
- type: entity
|
||||
id: magazine_12g_empty
|
||||
name: "12g magazine - empty"
|
||||
parent: BaseItem
|
||||
abstract: true
|
||||
components:
|
||||
- type: BallisticMagazine
|
||||
caliber: A12g
|
||||
magazine: A12g
|
||||
capacity: 8
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
|
||||
#Magazines
|
||||
- type: entity
|
||||
id: magazine_12g_shotgun
|
||||
name: "12g Magazine"
|
||||
parent: magazine_12g_empty
|
||||
components:
|
||||
- type: BallisticMagazine
|
||||
fill: ammo_casing_12g
|
||||
caliber: A12g
|
||||
magazine: A12g
|
||||
capacity: 20
|
||||
- type: Icon
|
||||
sprite: Objects/Guns/Ammunition/Magazine/10mm/12mml.rsi
|
||||
state: 12mml-1
|
||||
- type: Sprite
|
||||
sprite: Objects/Guns/Ammunition/Magazine/10mm/12mml.rsi
|
||||
state: 12mml-1
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: BallisticMagazineVisualizer2D
|
||||
base_state: 12mml
|
||||
steps: 2
|
||||
|
||||
# Casings
|
||||
- type: entity
|
||||
id: ammo_casing_12g
|
||||
name: "12g casing"
|
||||
parent: BaseItem
|
||||
components:
|
||||
- type: BallisticBullet
|
||||
caliber: A12g
|
||||
projectile: pellet_12g
|
||||
projectilesfired : 6
|
||||
- type: Sprite
|
||||
sprite: Objects/Guns/Ammunition/ammo_casing.rsi
|
||||
state: s-casing
|
||||
drawdepth: FloorObjects
|
||||
- type: Icon
|
||||
sprite: Objects/Guns/Ammunition/ammo_casing.rsi
|
||||
state: s-casing
|
||||
@@ -0,0 +1,34 @@
|
||||
# Empty boxes
|
||||
- type: entity
|
||||
id: box_12g_empty
|
||||
name: "12g box - empty"
|
||||
parent: BaseItem
|
||||
abstract: true
|
||||
components:
|
||||
- type: AmmoBox
|
||||
caliber: A12g
|
||||
capacity: 30
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
|
||||
# Ammo boxes
|
||||
- type: entity
|
||||
id: box_12g
|
||||
name: "12g box"
|
||||
parent: box_12g_empty
|
||||
components:
|
||||
- type: AmmoBox
|
||||
fill: ammo_casing_12g
|
||||
caliber: A12g
|
||||
capacity: 30
|
||||
- type: Icon
|
||||
sprite: Objects/Guns/Ammunition/Boxes/10mm/box10mm.rsi
|
||||
state: box10mm-1
|
||||
- type: Sprite
|
||||
sprite: Objects/Guns/Ammunition/Boxes/10mm/box10mm.rsi
|
||||
state: box10mm-1
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: BallisticMagazineVisualizer2D
|
||||
base_state: box10mm
|
||||
steps: 2
|
||||
@@ -0,0 +1,10 @@
|
||||
- type: entity
|
||||
id: pellet_12g
|
||||
name: 12g Pellet
|
||||
parent: bullet_base
|
||||
description: If you can see this you're dead!
|
||||
components:
|
||||
- type: Projectile
|
||||
velocity: 20
|
||||
damages:
|
||||
Brute: 10
|
||||
47
Resources/Prototypes/Entities/Weapons/Shotguns/shotguns.yml
Normal file
47
Resources/Prototypes/Entities/Weapons/Shotguns/shotguns.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
- type: entity
|
||||
name: Shotgun
|
||||
parent: BaseItem
|
||||
id: BaseShotgun
|
||||
description: A rooty tooty point and shooty.
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sound
|
||||
- type: RangedWeapon
|
||||
automatic: false
|
||||
firerate: 20
|
||||
- type: BallisticMagazineWeapon
|
||||
caliber: A12g
|
||||
evenspread : 40
|
||||
magazines:
|
||||
- A12g
|
||||
default_magazine: magazine_12g_shotgun
|
||||
auto_eject_magazine: false
|
||||
sound_auto_eject: /Audio/Guns/EmptyAlarm/smg_empty_alarm.ogg
|
||||
sound_magazine_in: /Audio/Guns/MagIn/smg_magin.ogg
|
||||
sound_magazine_out: /Audio/Guns/MagOut/smg_magout.ogg
|
||||
sound_empty: /Audio/Guns/Empty/empty.ogg
|
||||
sound_gunshot: /Audio/Guns/Gunshots/smg.ogg
|
||||
|
||||
- type: entity
|
||||
name: Magazine Fed Shotgun
|
||||
parent: BaseShotgun
|
||||
id: MagazineFedShotgun
|
||||
components:
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Objects/Guns/SMGs/c20r.rsi
|
||||
state: c20r-5
|
||||
- type: Icon
|
||||
sprite: Objects/Guns/SMGs/c20r.rsi
|
||||
state: c20r-5
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: BallisticMagazineWeaponVisualizer2D
|
||||
base_state: c20r
|
||||
steps: 6
|
||||
- type: Item
|
||||
Size: 24
|
||||
sprite: Objects/Guns/SMGs/c20r.rsi
|
||||
- type: Item
|
||||
Size: 24
|
||||
sprite: Objects/Guns/SMGs/wt550.rsi
|
||||
Reference in New Issue
Block a user