Runtime fix for secbots and ED 209 bots trying to handcuff all mob types.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5456 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
aranclanos@hotmail.com
2013-01-03 09:25:34 +00:00
parent a2c1c935de
commit 5febd8103a
2 changed files with 52 additions and 38 deletions
+26 -19
View File
@@ -318,29 +318,36 @@ Auto Patrol: []"},
mode = SECBOT_HUNT
return
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
if(istype(src.target,/mob/living/carbon))
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if (get_dist(src, src.target) <= 1)
if (src.target.handcuffed)
return
spawn(60)
if (get_dist(src, src.target) <= 1)
if (src.target.handcuffed)
return
if(istype(src.target,/mob/living/carbon))
src.target.handcuffed = new /obj/item/weapon/handcuffs(src.target)
target.update_inv_handcuffed() //update handcuff overlays
if(istype(src.target,/mob/living/carbon))
src.target.handcuffed = new /obj/item/weapon/handcuffs(src.target)
target.update_inv_handcuffed() //update handcuff overlays
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
// playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
// playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
else
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
if(SECBOT_ARREST) // arresting
if(src.lasercolor)
+26 -19
View File
@@ -259,29 +259,36 @@ Auto Patrol: []"},
mode = SECBOT_HUNT
return
if(!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
if(istype(src.target,/mob/living/carbon))
if(!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if(get_dist(src, src.target) <= 1)
if(src.target.handcuffed)
return
spawn(60)
if(get_dist(src, src.target) <= 1)
if(src.target.handcuffed)
return
if(istype(src.target,/mob/living/carbon))
target.handcuffed = new /obj/item/weapon/handcuffs(target)
target.update_inv_handcuffed() //update the handcuffs overlay
if(istype(src.target,/mob/living/carbon))
target.handcuffed = new /obj/item/weapon/handcuffs(target)
target.update_inv_handcuffed() //update the handcuffs overlay
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
else
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
if(SECBOT_ARREST) // arresting