From 99ca2e8c3d2837801bebf87c777a34031d0a9f2b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 17 Apr 2022 17:49:55 +0200 Subject: [PATCH] [MIRROR] Fixes AIize (Player panel Make AI button) killing the client of whoever it was used on [MDB IGNORE] (#12847) * Fixes AIize (Player panel Make AI button) killing the client of whoever it was used on (#66168) * Fixes AIize (somehow) * Why does this even exist it's never false * Someone please explain why this is a bad idea * Fixes AIize (Player panel Make AI button) killing the client of whoever it was used on Co-authored-by: GoblinBackwards <22856555+GoblinBackwards@users.noreply.github.com> --- code/modules/admin/topic.dm | 2 +- code/modules/mob/transform_procs.dm | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index ca1abe87729..438100a4855 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -770,7 +770,7 @@ return message_admins(span_danger("Admin [key_name_admin(usr)] AIized [key_name_admin(our_mob)]!")) log_admin("[key_name(usr)] AIized [key_name(our_mob)].") - our_mob.AIize(TRUE, our_mob.client, move) + our_mob.AIize(our_mob.client, move) else if(href_list["makerobot"]) if(!check_rights(R_SPAWN)) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index efbc1a0a2b3..2fb1f40f9aa 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -59,7 +59,7 @@ SEND_SIGNAL(src, COMSIG_MONKEY_HUMANIZE) return src -/mob/proc/AIize(transfer_after = TRUE, client/preference_source, move = TRUE) +/mob/proc/AIize(client/preference_source, move = TRUE) var/list/turf/landmark_loc = list() if(!move) @@ -88,13 +88,6 @@ var/mob/living/silicon/ai/our_AI = new /mob/living/silicon/ai(pick(landmark_loc), null, src) . = our_AI - if(mind) - if(!transfer_after) - mind.active = FALSE - mind.transfer_to(our_AI) - else if(transfer_after) - our_AI.key = key - if(preference_source) apply_pref_name(/datum/preference/name/ai, preference_source)