Gun update (#387)

This pull adds bolt actions rifles, they are like pump shotguns, with the capacity for 5 7.62mm bullets.
Also adds a 7.62mm clip in the hacked autolathe. Raiders have a chance to spawn with one.
This commit is contained in:
Alberyk
2016-06-23 02:16:57 +03:00
committed by skull132
parent 27ff6d3e4c
commit 36cacd28a4
17 changed files with 185 additions and 12 deletions
@@ -205,6 +205,50 @@
/obj/item/ammo_magazine/chameleon/empty
initial_ammo = 0
/obj/item/ammo_magazine/boltaction
name = "ammo clip (7.62mm)"
icon_state = "762"
ammo_type = /obj/item/ammo_casing/a762
caliber = "a762"
matter = list(DEFAULT_WALL_MATERIAL = 1800)
max_ammo = 5
multiple_sprites = 1
/obj/item/ammo_magazine/c45uzi
name = "stick magazine (.45)"
icon_state = "uzi45"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = ".45"
max_ammo = 16
multiple_sprites = 1
/obj/item/ammo_magazine/c45uzi/empty
initial_ammo = 0
/obj/item/ammo_magazine/tommymag
name = "tommygun magazine (.45)"
icon_state = "tommy-mag"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1500)
caliber = ".45"
max_ammo = 20
/obj/item/ammo_magazine/tommymag/empty
initial_ammo = 0
/obj/item/ammo_magazine/tommydrum
name = "tommygun drum magazine (.45)"
icon_state = "tommy-drum"
w_class = 3 // Bulky ammo doesn't fit in your pockets!
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 3750)
caliber = ".45"
max_ammo = 50
/*
//unused garbage
@@ -81,7 +81,7 @@ obj/item/weapon/gun/energy/retro
name = "\improper L.W.A.P. sniper rifle"
desc = "A high-power laser rifle fitted with a SMART aiming-system scope."
icon_state = "sniper"
item_state = "laser"
item_state = "sniper"
fire_sound = 'sound/weapons/marauder.ogg'
origin_tech = "combat=6;materials=5;powerstorage=4"
projectile_type = /obj/item/projectile/beam/sniper
@@ -24,8 +24,9 @@
desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3
load_method = SPEEDLOADER //yup. until someone sprites a magazine for it.
max_shells = 15
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c45uzi
max_shells = 16
caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = /obj/item/ammo_casing/c45
@@ -264,3 +265,20 @@
user << "<span class='warning'>You need to open the cover to unload [src].</span>"
return
..()
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "\improper Tommygun"
desc = "A classic among criminals. Uses .45 rounds."
icon_state = "tommygun"
w_class = 3
max_shells = 50
caliber = ".45"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
slot_flags = SLOT_BELT
ammo_type = /obj/item/ammo_casing/c45
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/tommymag
/obj/item/weapon/gun/projectile/automatic/tommygun/update_icon()
..()
icon_state = (ammo_magazine)? "tommygun" : "tommygun-empty"
@@ -62,4 +62,14 @@
flick("deckard-reload",src)
..()
/obj/item/weapon/gun/projectile/derringer
name = "derringer"
desc = "A small pocket pistol, easily concealed. Uses .357 rounds."
icon_state = "derringer"
item_state = "concealed"
w_class = 2
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 3)
handle_casings = CYCLE_CASINGS
load_method = SINGLE_CASING
max_shells = 2
ammo_type = /obj/item/ammo_casing/a357
@@ -135,3 +135,47 @@
ammo_type = /obj/item/ammo_casing/shotgun/pellet
w_class = 3
force = 5
/obj/item/weapon/gun/projectile/shotgun/pump/boltaction
name = "\improper bolt action rifle"
desc = "A cheap ballistic rifle often found in the hands of crooks and frontiersmen."
icon_state = "moistnugget"
item_state = "moistnugget"
origin_tech = "combat=4;materials=2"
slot_flags = SLOT_BACK
load_method = SINGLE_CASING|SPEEDLOADER
caliber = "a762"
ammo_type = /obj/item/ammo_casing/a762
max_shells = 5
/obj/item/weapon/gun/projectile/shotgun/pump/boltaction/attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != 3)
user << "<span class='notice'>You begin to shorten the barrel and stock of \the [src].</span>"
if(loaded.len)
afterattack(user, user)
playsound(user, fire_sound, 50, 1)
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='danger'>The rifle goes off in your face!</span>")
return
if(do_after(user, 30))
icon_state = "obrez"
w_class = 3
recoil = 2
accuracy = -2
item_state = "gun"
slot_flags &= ~SLOT_BACK
slot_flags |= (SLOT_BELT|SLOT_HOLSTER)
name = "\improper obrez"
desc = "A shortened bolt action rifle, not really acurate. Uses 7.62mm rounds."
user << "<span class='warning'>You shorten the barrel and stock of the rifle!</span>"
else
..()
/obj/item/weapon/gun/projectile/shotgun/pump/boltaction/obrez
name = "obrez"
desc = "A shortened bolt action rifle, not really accurate. Uses 7.62mm rounds."
icon_state = "obrez"
item_state = "gun"
w_class = 3
recoil = 2
accuracy = -2
slot_flags = SLOT_BELT|SLOT_HOLSTER
@@ -2,7 +2,7 @@
name = "\improper PTR-7 rifle"
desc = "A portable anti-armour rifle fitted with a scope. Originally designed to used against armoured exosuits, it is capable of punching through windows and non-reinforced walls with ease. Fires armor piercing 14.5mm shells."
icon_state = "heavysniper"
item_state = "l6closednomag" //placeholder
item_state = "heavysniper"
w_class = 4
force = 10
slot_flags = SLOT_BACK
@@ -87,4 +87,4 @@
if(wielded)
toggle_scope(2.0)
else
usr << "<span class='warning'>You can't look through the scope without stabilizing the rifle!</span>"
usr << "<span class='warning'>You can't look through the scope without stabilizing the rifle!</span>"