This commit is contained in:
AnturK
2015-12-02 21:51:33 +01:00
parent a9caf9b140
commit d45c2a7787
6 changed files with 39 additions and 44 deletions
@@ -709,12 +709,12 @@ Pass a positive integer as an argument to override a bot's default speed.
//No ..() to prevent strip panel showing up - Todo: make that saner
if(topic_denied(usr))
usr << "<span class='warning'>[src]'s interface is not responding!</span>"
return
return 1
add_fingerprint(usr)
if(href_list["close"])// HUE HUE
if(usr in users)
users.Remove(usr)
return
return 1
if((href_list["power"]) && (bot_core.allowed(usr) || !locked))
if (on)
turn_off()
@@ -231,7 +231,8 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
return dat
/mob/living/simple_animal/bot/cleanbot/Topic(href, href_list)
..()
if(..())
return 1
switch(href_list["operation"])
if("blood")
blood =!blood
@@ -130,7 +130,8 @@ Auto Patrol[]"},
return
else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
return
..()
if(..())
return 1
switch(href_list["operation"])
if ("idcheck")
@@ -149,13 +150,16 @@ Auto Patrol[]"},
declare_arrests = !declare_arrests
update_controls()
/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/M)
if(M.a_intent == "harm")
threatlevel = M.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = M
mode = BOT_HUNT
/mob/living/simple_animal/bot/ed209/proc/retaliate(mob/living/carbon/human/H)
threatlevel = H.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = H
mode = BOT_HUNT
/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "harm")
retaliate(H)
return ..()
/mob/living/simple_animal/bot/ed209/attackby(obj/item/weapon/W, mob/user, params)
@@ -164,13 +168,9 @@ Auto Patrol[]"},
return
if (!istype(W, /obj/item/weapon/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina.
threatlevel = user.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = user
if(lasercolor)//To make up for the fact that lasertag bots don't hunt
shootAt(user)
mode = BOT_HUNT
retaliate(user)
if(lasercolor)//To make up for the fact that lasertag bots don't hunt
shootAt(user)
/mob/living/simple_animal/bot/ed209/Emag(mob/user)
..()
@@ -187,11 +187,7 @@ Auto Patrol[]"},
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if (!Proj.nodamage && Proj.damage < src.health)
threatlevel = Proj.firer.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = Proj.firer
mode = BOT_HUNT
retaliate(Proj.firer)
..()
/mob/living/simple_animal/bot/ed209/handle_automated_action()
@@ -118,7 +118,9 @@
user << "<span class='danger'>[src] buzzes and beeps.</span>"
/mob/living/simple_animal/bot/floorbot/Topic(href, href_list)
..()
if(..())
return 1
switch(href_list["operation"])
if("replace")
replacetiles = !replacetiles
@@ -157,7 +157,8 @@
return dat
/mob/living/simple_animal/bot/medbot/Topic(href, href_list)
..()
if(..())
return 1
if(href_list["adj_threshold"])
var/adjust_num = text2num(href_list["adj_threshold"])
@@ -106,8 +106,8 @@ Auto Patrol: []"},
return dat
/mob/living/simple_animal/bot/secbot/Topic(href, href_list)
..()
if(..())
return 1
switch(href_list["operation"])
if("idcheck")
@@ -126,13 +126,16 @@ Auto Patrol: []"},
declare_arrests = !declare_arrests
update_controls()
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/M)
if(M.a_intent == "harm")
threatlevel = M.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = M
mode = BOT_HUNT
/mob/living/simple_animal/bot/secbot/proc/retaliate(mob/living/carbon/human/H)
threatlevel = H.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = H
mode = BOT_HUNT
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "harm")
retaliate(H)
return ..()
/mob/living/simple_animal/bot/secbot/attackby(obj/item/weapon/W, mob/user, params)
@@ -140,11 +143,7 @@ Auto Patrol: []"},
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
threatlevel = user.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = user
mode = BOT_HUNT
retaliate(user)
/mob/living/simple_animal/bot/secbot/Emag(mob/user)
..()
@@ -161,11 +160,7 @@ Auto Patrol: []"},
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if (!Proj.nodamage && Proj.damage < src.health)
threatlevel = Proj.firer.assess_threat(src)
threatlevel += 6
if(threatlevel >= 4)
target = Proj.firer
mode = BOT_HUNT
retaliate(Proj.firer)
..()