Merge pull request #8385 from Atermonera/bb

Adds caseless BB rounds for common gun types
This commit is contained in:
Atermonera
2022-01-27 20:08:40 -08:00
committed by GitHub
4 changed files with 82 additions and 10 deletions
+54 -2
View File
@@ -43,6 +43,12 @@
projectile_type = /obj/item/projectile/bullet/pistol/strong
matter = list(MAT_STEEL = 210)
/obj/item/ammo_casing/a357/bb
desc = "A .357 BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* .38
*/
@@ -65,6 +71,12 @@
projectile_type = /obj/item/projectile/ion/small
matter = list(MAT_STEEL = 130, "uranium" = 100)
/obj/item/ammo_casing/a38/bb
desc = "A .38 BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* .44
*/
@@ -86,6 +98,12 @@
projectile_type = /obj/item/projectile/bullet/rifle/a44rifle
matter = list(MAT_STEEL = 210)
/obj/item/ammo_casing/a44/bb
desc = "A .44 BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* .75 (aka Gyrojet Rockets, aka admin abuse)
*/
@@ -115,7 +133,6 @@
desc = "A 9mm hollow-point bullet casing."
projectile_type = /obj/item/projectile/bullet/pistol/hp
/obj/item/ammo_casing/a9mm/flash
desc = "A 9mm flash shell casing."
icon_state = "r-casing"
@@ -131,6 +148,12 @@
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/practice
/obj/item/ammo_casing/a9mm/bb
desc = "A 9mm BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* .45
*/
@@ -177,6 +200,12 @@
projectile_type = /obj/item/projectile/bullet/pistol/medium/hp
matter = list(MAT_STEEL = 60, MAT_PLASTIC = 15)
/obj/item/ammo_casing/a45/bb
desc = "A .45 BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* 10mm
*/
@@ -194,6 +223,12 @@
icon_state = "empcasing"
matter = list(MAT_STEEL = 130, "uranium" = 100)
/obj/item/ammo_casing/a10mm/bb
desc = "A 10mm BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* 12g (aka shotgun ammo)
*/
@@ -270,6 +305,11 @@
projectile_type = /obj/item/projectile/scatter/flechette
matter = list(MAT_STEEL = 360, MAT_PLASTEEL = 100)
/obj/item/ammo_casing/a12g/bb
desc = "A shotgun BB shell."
projectile_type = /obj/item/projectile/bullet/pellet/shotgun/bb // Shotgun
matter = list(MAT_PLASTIC = 120) // 6 pellets
/*
* 7.62mm
*/
@@ -305,6 +345,12 @@
desc = "A 7.62mm hunting bullet casing."
projectile_type = /obj/item/projectile/bullet/rifle/a762/hunter
/obj/item/ammo_casing/a762/bb
desc = "A 7.62mm BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* 14.5mm (anti-materiel rifle round)
*/
@@ -359,6 +405,12 @@
desc = "A 5.45mm hunting bullet casing."
projectile_type = /obj/item/projectile/bullet/rifle/a545/hunter
/obj/item/ammo_casing/a545/bb
desc = "A 5.45mm BB."
projectile_type = /obj/item/projectile/bullet/bb
matter = list(MAT_PLASTIC = 20)
caseless = TRUE
/*
* 5mm Caseless
*/
@@ -399,4 +451,4 @@
/obj/item/ammo_casing/spent // For simple hostile mobs only, so they don't cough up usable bullets when firing. This is for literally nothing else.
icon_state = "s-casing-spent"
BB = null
projectile_type = null
projectile_type = null
+1 -1
View File
@@ -430,7 +430,7 @@
P.dispersion = disp
P.shot_from = src.name
P.silenced = silenced
P.silenced |= silenced // A silent bullet (e.g., BBs) can be fired quietly from any gun.
P.old_style_target(target)
P.fire()
+5 -5
View File
@@ -79,10 +79,10 @@
//Misc/Polaris variables
var/def_zone = "" //Aiming at
var/mob/firer = null//Who shot it
var/silenced = 0 //Attack message
var/shot_from = "" // name of the object which shot us
var/def_zone = "" //Aiming at
var/mob/firer = null //Who shot it
var/silenced = FALSE //Attack message
var/shot_from = "" // name of the object which shot us
var/accuracy = 0
var/dispersion = 0.0
@@ -744,7 +744,7 @@
/obj/item/projectile/proc/launch_from_gun(atom/target, target_zone, mob/user, params, angle_override, forced_spread, obj/item/weapon/gun/launcher)
shot_from = launcher.name
silenced = launcher.silenced
silenced |= launcher.silenced // Silent bullets (e.g., BBs) are always silent
if(user)
firer = user
+22 -2
View File
@@ -234,7 +234,7 @@
SA_bonus_damage = 35 // 50 total on animals.
SA_vulnerability = SA_ANIMAL
/obj/item/projectile/bullet/rifle/a145 // 14.5×114mm is bigger than a .50 BMG round.
/obj/item/projectile/bullet/rifle/a145 // 14.5114mm is bigger than a .50 BMG round.
fire_sound = 'sound/weapons/Gunshot_cannon.ogg' // This is literally an anti-tank rifle caliber. It better sound like a fucking cannon.
damage = 80
stun = 3
@@ -349,4 +349,24 @@
/obj/item/projectile/bullet/blank/cap/process()
loc = null
qdel(src)
qdel(src)
/* BB Rounds */
/obj/item/projectile/bullet/bb // Generic single BB
name = "BB"
damage = 0
agony = 0
embed_chance = 0
sharp = FALSE
silenced = TRUE
/obj/item/projectile/bullet/pellet/shotgun/bb // Shotgun
name = "BB"
damage = 0
agony = 0
embed_chance = 0
sharp = FALSE
pellets = 6
range_step = 1
spread_step = 10
silenced = TRUE