Fixes guns some. Can't shoot yourself as easily anymore. You can now aim at body parts with your gun. I think the reason you couldn't before was just the failure to pass the def_zone up to the parent, not sure if that was intensional or not.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3554 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
VivianFoxfoot@gmail.com
2012-05-04 05:10:00 +00:00
parent ef28337a8c
commit a657fa5e9b
6 changed files with 41 additions and 9 deletions
+32 -3
View File
@@ -20,6 +20,7 @@
silenced = 0
recoil = 0
ejectshell = 1
determination = 0
proc
load_into_chamber()
@@ -93,14 +94,42 @@
in_chamber.firer = user
in_chamber.def_zone = user.zone_sel.selecting
if(targloc == curloc)
if(user == target) // What the FUCK was this code? If shoot anything on the same tile, you're shooting yourself? What?
if(!determination)
user << "Are you really sure you want to shoot yourself? You put the gun against your head."
determination = 1
spawn(30)
if(determination == 2)
return
determination = 0
user << "You don't have the guts."
return
determination = 2
if(silenced)
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
user.visible_message("\red [user.name] fires the [src.name] at themselves!", "\red You fire the [src.name] at yourself!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
user.visible_message("\red [user.name] fires the [src.name] at their own head!", "\red You fire the [src.name] at yourself!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
in_chamber.def_zone = "head"
in_chamber.damage *= 5
user.bullet_act(in_chamber, in_chamber.def_zone)
del(in_chamber)
update_icon()
return
user.bullet_act(in_chamber)
if(inrange)
if(silenced)
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(ismob(target))
user.visible_message("\red [user.name] shoots [target] point-blank in the [in_chamber.def_zone] with the [src.name]!", "\red You fire the [src.name] point-blank at [target]'s [in_chamber.def_zone]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
else
user.visible_message("\red [user.name] fires the [src.name] point-blank at [target]!", "\red You fire the [src.name] point-blank at [target]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
in_chamber.damage *= 1.25
target.bullet_act(in_chamber, in_chamber.def_zone)
del(in_chamber)
update_icon()
return
+2 -2
View File
@@ -72,9 +72,9 @@
return // nope.avi
if(!silenced)
visible_message("\red [A.name] is hit by the [src.name]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
visible_message("\red [A.name] is hit by the [src.name] in the [def_zone]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
else
M << "\red You've been shot!"
M << "\red You've been shot in the [def_zone] by the [src.name]!"
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"