mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
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:
@@ -15,7 +15,7 @@
|
||||
var/quick_create_object_html = null
|
||||
var/pathtext = null
|
||||
|
||||
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/machinery")
|
||||
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/item/weapon","/obj/machinery")
|
||||
|
||||
var path = text2path(pathtext)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ emp_act
|
||||
if(check_shields(P.damage, "the [P.name]"))
|
||||
P.on_hit(src, 2)
|
||||
return 2
|
||||
return (..())
|
||||
return (..(P , def_zone))
|
||||
|
||||
|
||||
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
|
||||
|
||||
@@ -48,6 +48,6 @@
|
||||
P.on_hit(src,2)
|
||||
return 2
|
||||
if(!P.nodamage)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
|
||||
P.on_hit(src, absorb)
|
||||
return absorb
|
||||
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
|
||||
Reference in New Issue
Block a user