Skip to content

Commit

Permalink
Bbgun (#580)
Browse files Browse the repository at this point in the history
* Add BB gun

* Clean up back sprite

* Replace old code

* Case?

* Guess I didn't need that

* Proper attribution

---------

Co-authored-by: Jeff <>
  • Loading branch information
IamVelcroboy authored and dvir001 committed Feb 7, 2024
1 parent 8afdad7 commit a7cb48b
Show file tree
Hide file tree
Showing 18 changed files with 230 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/deltav/catalog/cargo/cargo-fun.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ent-CrateFunBBGun = { ent-CrateFunBBGun }
.desc = { ent-CrateFunBBGun.desc }
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ent-CrateFunBBGun = BB gun crate
.desc = Contains 1 BB gun and 2 boxes of BBs.
9 changes: 9 additions & 0 deletions Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_fun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# - type: cargoProduct
# id: CrateFunBBGun
# icon:
# sprite: Objects/Weapons/Guns/Pistols/water_pistol.rsi
# state: display
# product: CrateFunBBGun
# cost: 1000
# category: Fun
# group: market
10 changes: 10 additions & 0 deletions Resources/Prototypes/DeltaV/Catalog/Fills/Crates/fun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- type: entity
id: CrateFunBBGun
parent: CrateGenericSteel
components:
- type: StorageFill
contents:
- id: WeaponRifleBB
amount: 1
- id: BoxCartridgeBB
amount: 2
42 changes: 42 additions & 0 deletions Resources/Prototypes/DeltaV/Entities/Objects/Fun/toy_guns.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
- type: entity
name: BB Gun
parent: BaseItem
id: WeaponRifleBB
description: The classic Red Ryder BB gun. Don't shoot your eye out.
components:
- type: Sprite
netsync: false
size: 50
sprite: DeltaV/Objects/Weapons/Guns/Rifles/bbgun.rsi
layers:
- state: base
map: ["enum.GunVisualLayers.Base"]
- type: Clothing
sprite: DeltaV/Objects/Weapons/Guns/Rifles/bbgun.rsi ##
quickEquip: false
slots:
- Back
- suitStorage
- type: AmmoCounter
- type: Gun
selectedMode: SemiAuto
availableModes:
- SemiAuto
fireRate: 2
soundGunshot:
path: /Audio/Weapons/click.ogg
- type: BallisticAmmoProvider
cycleable: false
proto: BulletBB
whitelist:
tags:
- BulletBB
soundInsert:
path: /Audio/Weapons/drawbow2.ogg #here
- type: ContainerContainer
containers:
ballistic-ammo: !type:Container
ents: []
- type: Appearance
- type: StaticPrice
price: 275
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- type: entity
parent: BoxDonkSoftBase
id: BoxCartridgeBB
name: box of BBs
components:
- type: SpeedLoader
- type: BallisticAmmoProvider
whitelist:
tags:
- BulletBB
proto: BulletBB
- type: Sprite
sprite: DeltaV/Objects/Weapons/Guns/Ammunition/Boxes/bbgun.rsi
layers:
- state: bbbox
- type: StaticPrice
price: 25
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
- type: entity
id: BulletBB
description: Don't shoot your eye out.
name: BB
parent: BaseItem
components:
- type: Item
size: 1
- type: Reflective
- type: Appearance
- type: FlyBySound
- type: Sprite
sprite: DeltaV/Objects/Weapons/Guns/Ammunition/Boxes/bbgun.rsi
layers:
- state: bbbullet
- type: Tag
tags:
- BulletBB
- Trash
- type: Physics
bodyType: Dynamic
linearDamping: 0.1
angularDamping: 0.1
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.01
density: 1
mask:
- ItemMask
restitution: 0.3 #bounce
friction: 0.2
projectile:
shape:
!type:PhysShapeAabb
bounds: "-0.15,-0.15,0.15,0.15"
hard: false
mask:
- Impassable
- BulletImpassable
fly-by: &flybyfixture
shape: !type:PhysShapeCircle
radius: 1.5
layer:
- Impassable
- MidImpassable
- HighImpassable
- LowImpassable
hard: False
- type: TileFrictionModifier
modifier: 0.01
- type: Projectile
impactEffect: BulletImpactEffect
deleteOnCollide: false
onlyCollideWhenShot: true
damage:
types:
Blunt: 1
soundHit:
path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
- type: Ammo
muzzleFlash: null
- type: PhysicalComposition
materialComposition:
Steel: 1
- type: SpaceGarbage
#- type: StaticPrice
# price: 0.05
29 changes: 29 additions & 0 deletions Resources/Prototypes/DeltaV/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
## This is for Nyano and Delta V tags

- type: Tag
id: BeltSlotNotBelt #not a 'belt'

- type: Tag
id: BulletBB

- type: Tag
id: CartridgeSpecial # For the .38 special ammo and revolver

- type: Tag
id: Directional

- type: Tag
id: ForensicBeltEquip

- type: Tag
id: HandLabeler

- type: Tag
id: MagazinePistolSpecial # For the .38 special ammo and pistol

- type: Tag
id: SecDogWearable # allows Laika to wear meson goggles (and more later?)

- type: Tag
id: SpeedLoaderSpecial

- type: Tag
id: PreventLabel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
id: LessLethalVendInventory
startingInventory:
WeaponDisabler: 10
Kardashev-MosinNonlethal: 20
WeaponPistolMk58Nonlethal: 10
Kardashev-MosinNonlethal: 10
WeaponRevolverArgentiNonlethal: 10
WeaponShotgunDoubleBarreledRubber: 10
WeaponFlareGun: 20
BoxDonkSoftBox: 10
Expand All @@ -14,12 +14,9 @@
MagazineBoxRifleRubber: 8
MagazineBoxLightRifleRubber: 4
MagazineBoxCaselessRifleRubber: 4

contrabandInventory:
DartYellow: 20
DartPurple: 20
DartBlue: 20

WeaponRifleBB: 2
BoxCartridgeBB: 10
emaggedInventory:
WeaponLaserCarbinePractice: 4
WeaponDisablerPractice: 4
Expand All @@ -28,4 +25,3 @@
MagazineBoxLightRiflePractice: 10
MagazineBoxCaselessRiflePractice: 10
BoxShotgunPractice: 10

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Velcroboy",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "bbbullet"
},
{
"name": "bbbox"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Base by ∆∆Molotovthief, equipped sprites by Velcroboy",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "base"
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
},
{
"name": "equipped-BACKPACK",
"directions": 4
}
]
}

0 comments on commit a7cb48b

Please sign in to comment.