mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
Adds bolt-action rifle
Sprites from https://tgstation13.org/phpBB/viewtopic.php?f=9&t=2151 These have a bolt that needs to be worked after each shot, and they need it to be open in order to be reloaded. There is also a stripper clip. Their bullet does 60 brute damage, and the gun has a 5-shot internal magazine. They cannot be worn on the back slot as there are no back sprites provided in that file. Bayonets are not implemented for the same reason. The gun can be obtained as a 50% drop from ranged russian mobs (the other 50% still drop the mateba) and from summon guns.
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
projectilesound = 'sound/weapons/Gunshot.ogg'
|
||||
casingtype = /obj/item/ammo_casing/a357
|
||||
|
||||
/mob/living/simple_animal/hostile/russian/ranged/New()
|
||||
if(prob(50) && ispath(weapon1,/obj/item/weapon/gun/projectile/revolver/mateba)) //to preserve varedits
|
||||
weapon1 = /obj/item/weapon/gun/projectile/shotgun/boltaction
|
||||
casingtype = /obj/item/ammo_casing/a762
|
||||
|
||||
/mob/living/simple_animal/hostile/russian/Die()
|
||||
..()
|
||||
@@ -54,4 +58,4 @@
|
||||
if(weapon1)
|
||||
new weapon1 (src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
|
||||
/obj/item/ammo_casing/a762
|
||||
desc = "A 7.62mm bullet casing."
|
||||
icon_state = "762-casing"
|
||||
caliber = "a762"
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
|
||||
@@ -171,4 +172,4 @@
|
||||
projectile_type = /obj/item/projectile/energy/bolt
|
||||
caliber = "crossbow"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "cbbolt"
|
||||
icon_state = "cbbolt"
|
||||
|
||||
@@ -44,4 +44,12 @@
|
||||
name = "ammo box (crossbow bolts)"
|
||||
icon_state = "xbow"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/bolt
|
||||
max_ammo = 4
|
||||
max_ammo = 4
|
||||
|
||||
/obj/item/ammo_box/a762
|
||||
name = "stripper clip (7.62mm)"
|
||||
desc = "A stripper clip."
|
||||
icon_state = "762"
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
max_ammo = 5
|
||||
multiple_sprites = 1
|
||||
|
||||
@@ -99,6 +99,14 @@
|
||||
/obj/item/ammo_box/magazine/internal/cylinder/crossbow/large
|
||||
max_ammo = 15
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/boltaction
|
||||
name = "bolt action rifle internal magazine"
|
||||
desc = "Oh god, this shouldn't be here"
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
caliber = "a762"
|
||||
max_ammo = 5
|
||||
multiload = 1
|
||||
|
||||
///////////EXTERNAL MAGAZINES////////////////
|
||||
|
||||
/obj/item/ammo_box/magazine/m10mm
|
||||
@@ -211,4 +219,4 @@ obj/item/ammo_box/magazine/tommygunm45
|
||||
/obj/item/ammo_box/magazine/m12g/dragon
|
||||
name = "shotgun magazine (12g dragon's breath)"
|
||||
icon_state = "m12gf"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
origin_tech = "combat=4;materials=2"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
var/pumped = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
var/num_loaded = magazine.attackby(A, user, 1)
|
||||
@@ -41,22 +40,30 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/proc/pump(mob/M)
|
||||
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
|
||||
pumped = 0
|
||||
pump_unload(M)
|
||||
pump_reload(M)
|
||||
update_icon() //I.E. fix the desc
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/proc/pump_unload(mob/M)
|
||||
if(chambered)//We have a shell in the chamber
|
||||
chambered.loc = get_turf(src)//Eject casing
|
||||
chambered.SpinAnimation(5, 1)
|
||||
chambered = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/proc/pump_reload(mob/M)
|
||||
if(!magazine.ammo_count()) return 0
|
||||
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
|
||||
chambered = AC
|
||||
update_icon() //I.E. fix the desc
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/examine(mob/user)
|
||||
..()
|
||||
if (chambered)
|
||||
user << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
|
||||
|
||||
// COMBAT SHOTGUN //
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/combat
|
||||
name = "combat shotgun"
|
||||
desc = "A traditional shotgun with tactical furniture and an eight-shell capacity underneath."
|
||||
@@ -65,6 +72,8 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shotcom
|
||||
w_class = 5
|
||||
|
||||
// RIOT SHOTGUN //
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/riot //for spawn in the armory
|
||||
name = "riot shotgun"
|
||||
desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control."
|
||||
@@ -81,6 +90,43 @@
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
|
||||
///////////////////////
|
||||
// BOLT ACTION RIFLE //
|
||||
///////////////////////
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction
|
||||
name = "bolt action rifle"
|
||||
desc = "This piece of junk looks like something that could have been used 700 years ago."
|
||||
icon_state = "moistnugget"
|
||||
item_state = "moistnugget"
|
||||
slot_flags = 0 //no SLOT_BACK sprite, alas
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
|
||||
var/bolt_open = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/pump(mob/M)
|
||||
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
|
||||
if(bolt_open)
|
||||
pump_reload(M)
|
||||
else
|
||||
pump_unload(M)
|
||||
bolt_open = !bolt_open
|
||||
update_icon() //I.E. fix the desc
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
if(!bolt_open)
|
||||
user << "<span class='notice'>The bolt is closed!</span>"
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/examine(mob/user)
|
||||
..()
|
||||
user << "The bolt is [bolt_open ? "open" : "closed"]."
|
||||
|
||||
/////////////////////////////
|
||||
// DOUBLE BARRELED SHOTGUN //
|
||||
/////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel
|
||||
name = "double-barreled shotgun"
|
||||
desc = "A true classic."
|
||||
@@ -228,4 +274,4 @@
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack()
|
||||
..()
|
||||
empty_alarm()
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user