From b265b3285ca8c8e92b2a5ee7697889f7ba5dd127 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 13 Aug 2015 17:15:51 +0930 Subject: [PATCH] Cleaned up some errors, added logging for AI module use. --- code/_onclick/ai.dm | 3 ++- code/modules/clothing/spacesuits/rig/rig.dm | 7 +------ code/modules/mob/living/carbon/human/human_movement.dm | 4 ---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index e57ab01338..232a864c0b 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -107,7 +107,7 @@ return A.AIMiddleClick(src) return ..() -/mob/living/cabon/bran/MiddleClickOn(var/atom/A) +/mob/living/carbon/brain/MiddleClickOn(var/atom/A) if(istype(src.loc, /obj/item/device/mmi)) return A.AIMiddleClick(src) return ..() @@ -169,6 +169,7 @@ var/obj/item/weapon/rig/rig = user.get_rig() if(rig && rig.wearer && rig.ai_can_move_suit(user, check_user_module = 1)) if(rig.wearer.HardsuitClickOn(src, alert_ai = 1)) + message_admins("\The [user] ([user.ckey ? user.ckey : "*no key*"]) forced \the [rig.wearer] ([rig.wearer.ckey ? rig.wearer.ckey : "*no key*"]) to use hardsuit module on \the [src].") return 1 return 0 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index e949cee66d..40d36b9590 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -781,12 +781,7 @@ return 0 if(check_user_module) - world << "Checking user module" - if(!user) - world << "No user" - return 0 - if(!user.loc || !user.loc.loc) - world << "No user loc" + if(!user || !user.loc || !user.loc.loc) return 0 var/obj/item/rig_module/ai_container/module = user.loc.loc if(!istype(module) || module.damage >= 2) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 17d125d488..f4b28d2b6b 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -1,9 +1,5 @@ /mob/living/carbon/human/movement_delay() - // Used by the AI suit control proc. - if(stat) - return 20 - var/tally = 0 if(species.slowdown)