Files
Polaris/code/modules/projectiles/guns/projectile/shotgun.dm
mport2004@gmail.com 3c68098a08 Fixed a few runtimes.
Changed the shotgun pump proc a bit, should work better now and not teleport old shells around.
Added a config option for the jobs to be loaded from the jobs.txt rather than use the defaults.
Loyalty implanter removed.  The Limplanter was designed to be on the prison station as it took more time and was a pain to get people up there to implant them.  No prison station, no Limplanter.
Implanter lockbox moved to the armory from the HoS' locker.
Security room's table once again shrunk so people can walk around in there.
Brig lockers are now anchored to the inside of the cells and once again have their IDs set.
Warden's locker moved to his office.
Cell controls Names/IDs/Access fixed as well as once again working with the brig lockers.
Removed a few of the blast doors from the inside of the brig.
The three secure cells have blast doors controlled from a button outside of the cell.
The play admin midis toggle should be working properly now.
Morgue trays will no longer teleport anything from anywhere.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2413 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-22 11:32:08 +00:00

63 lines
1.4 KiB
Plaintext

/obj/item/weapon/gun/projectile/shotgun
name = "shotgun"
desc = "Useful for sweeping alleys."
icon_state = "shotgun"
max_shells = 2
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
var
recentpump = 0 // to prevent spammage
pumped = 0
obj/item/ammo_casing/current_shell = null
load_into_chamber()
if(in_chamber) return 1
return 0
attack_self(mob/living/user as mob)
if(recentpump) return
pump()
recentpump = 1
spawn(10)
recentpump = 0
return
proc/pump(mob/M)
playsound(M, 'shotgunpump.ogg', 60, 1)
pumped = 0
if(current_shell)//We have a shell in the chamber
current_shell.loc = get_turf(src)//Eject casing
current_shell = null
if(in_chamber)
in_chamber = null
if(!loaded.len) return 0
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
current_shell = AC
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
return 1
/obj/item/weapon/gun/projectile/shotgun/combat
name = "combat shotgun"
icon_state = "cshotgun"
max_shells = 8
ammo_type = "/obj/item/ammo_casing/shotgun"
/obj/item/weapon/gun/projectile/shotgun/combat2
name = "security combat shotgun"
icon_state = "cshotgun"
max_shells = 4