From 6084f5cfefc490d1b76c706e0ab268302d75f579 Mon Sep 17 00:00:00 2001 From: Ansari Date: Thu, 10 May 2018 16:32:34 +0800 Subject: [PATCH 1/3] Log bot --- code/modules/mob/living/simple_animal/bot/construction.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 1ced2db841c..443a0f17070 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -33,6 +33,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") //Edbot Assembly @@ -56,6 +57,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") return switch(build_step) @@ -257,6 +259,7 @@ return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") /obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params) ..() @@ -276,6 +279,7 @@ return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") //Medbot Assembly /obj/item/firstaid_arm_assembly @@ -350,6 +354,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") else switch(build_step) if(0) @@ -460,6 +465,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") else if(istype(I, /obj/item/screwdriver)) if(!build_step) From de818d92ab116575d64a2d50e4023cce87b8c0b8 Mon Sep 17 00:00:00 2001 From: Ansari Date: Sat, 12 May 2018 10:14:14 +0800 Subject: [PATCH 2/3] user instead of usr --- .../mob/living/simple_animal/bot/construction.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 443a0f17070..fc2ca0c1f09 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -33,7 +33,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") //Edbot Assembly @@ -57,7 +57,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") return switch(build_step) @@ -259,7 +259,7 @@ return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") /obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params) ..() @@ -279,7 +279,7 @@ return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + ("[key_name(usr)] has renamed a robot to [t]") //Medbot Assembly /obj/item/firstaid_arm_assembly @@ -354,7 +354,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") else switch(build_step) if(0) @@ -465,7 +465,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") else if(istype(I, /obj/item/screwdriver)) if(!build_step) From 69cefb7f3c572b5522665f99c02f81b2d13bf44d Mon Sep 17 00:00:00 2001 From: Ansari Date: Sat, 12 May 2018 10:28:26 +0800 Subject: [PATCH 3/3] Actually fix usr to user and compile --- .../mob/living/simple_animal/bot/construction.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index fc2ca0c1f09..9e96a16fb0f 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -30,7 +30,7 @@ var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t log_game("[key_name(user)] has renamed a robot to [t]") @@ -54,7 +54,7 @@ var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t log_game("[key_name(user)] has renamed a robot to [t]") @@ -255,7 +255,7 @@ var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t @@ -275,11 +275,11 @@ var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t - ("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") //Medbot Assembly /obj/item/firstaid_arm_assembly @@ -351,7 +351,7 @@ var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t log_game("[key_name(user)] has renamed a robot to [t]") @@ -462,7 +462,7 @@ var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t log_game("[key_name(user)] has renamed a robot to [t]")