Files
CHOMPStation2/code/modules/projectiles/guns/projectile/automatic.dm
SkyMarshal 0d8c7d5e51 Reworked the gun system to handle hostage scenarios better.
Ported and adjusted with permission from Lost Worlds.
2012-03-01 19:20:39 -07:00

71 lines
1.7 KiB
Plaintext

/obj/item/weapon/gun/projectile/automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
name = "\improper Submachine Gun"
desc = "A lightweight, fast firing gun. Uses 9mm rounds."
icon_state = "saber"
w_class = 3.0
max_shells = 18
caliber = "9mm"
origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/c9mm"
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper Mini-Uzi"
desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3.0
max_shells = 20
caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45"
/obj/item/weapon/gun/projectile/automatic/c20r
name = "\improper C-20r SMG"
desc = "A lightweight, fast firing gun, for when you REALLY need someone dead. Uses 12mm rounds. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp"
icon_state = "c20r"
item_state = "c20r"
w_class = 3.0
max_shells = 20
caliber = "12mm"
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/a12mm"
fire_sound = 'Gunshot_smg.ogg'
load_method = 2
New()
..()
empty_mag = new /obj/item/ammo_magazine/a12mm/empty(src)
update_icon()
return
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()
if(!loaded.len && empty_mag)
empty_mag.loc = get_turf(src.loc)
empty_mag = null
playsound(user, 'smg_empty_alarm.ogg', 40, 1)
update_icon()
return
update_icon()
..()
overlays = null
if(empty_mag)
overlays += "c20r-[round(loaded.len,4)]"
return