Ports SNPCs

This commit is contained in:
Tastyfish
2016-04-09 00:10:01 -04:00
parent ea9489db70
commit 7d259d35c7
31 changed files with 3447 additions and 208 deletions
+1 -1
View File
@@ -62,7 +62,7 @@
proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
if(!usr.IsAdvancedToolUser())
if(!M.IsAdvancedToolUser())
return 0
return 1
+2 -2
View File
@@ -48,12 +48,12 @@
if(ismob(A) && isliving(A) && !(A in target))
Aim(A) //Clicked a mob, aim at them
else //Didn't click someone, check if there is anyone along that guntrace
var/mob/living/M = GunTrace(usr.x,usr.y,A.x,A.y,usr.z,usr) //Find dat mob.
var/mob/living/M = GunTrace(user.x,user.y,A.x,A.y,user.z,user) //Find dat mob.
if(M && isliving(M) && M in view(user) && !(M in target))
Aim(M) //Aha! Aim at them!
else if(!ismob(M) || (ismob(M) && !(M in view(user)))) //Nope! They weren't there!
Fire(A,user,params) //Fire like normal, then.
usr.dir = get_cardinal_dir(src, A)
user.dir = get_cardinal_dir(src, A)
//Aiming at the target mob.
/obj/item/weapon/gun/proc/Aim(var/mob/living/M)