From 41b0dbe36fbf2dcc07458c7e8c2eab8f72d9f54d Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Sun, 10 Dec 2017 10:54:47 -0800 Subject: [PATCH] Fix MULEbot id numbers showing nowhere but the alt-click menu (#33413) --- .../mob/living/simple_animal/bot/mulebot.dm | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 828ce6a88b..e7116db53e 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -29,7 +29,7 @@ model = "MULE" bot_core_type = /obj/machinery/bot_core/mulebot - suffix = "" + var/id path_image_color = "#7F5200" @@ -60,8 +60,8 @@ var/static/mulebot_count = 0 mulebot_count += 1 - if(!suffix) - set_suffix("#[mulebot_count]") + set_id(suffix || id || "#[mulebot_count]") + suffix = null /mob/living/simple_animal/bot/mulebot/Destroy() unload(0) @@ -69,12 +69,12 @@ wires = null return ..() -/mob/living/simple_animal/bot/mulebot/proc/set_suffix(suffix) - src.suffix = suffix +/mob/living/simple_animal/bot/mulebot/proc/set_id(new_id) + id = new_id if(paicard) - bot_name = "\improper MULEbot ([suffix])" + bot_name = "\improper MULEbot ([new_id])" else - name = "\improper MULEbot ([suffix])" + name = "\improper MULEbot ([new_id])" /mob/living/simple_animal/bot/mulebot/bot_reset() ..() @@ -233,9 +233,9 @@ if(new_dest) set_destination(new_dest) if("setid") - var/new_id = stripped_input(user, "Enter ID:", name, suffix, MAX_NAME_LEN) + var/new_id = stripped_input(user, "Enter ID:", name, id, MAX_NAME_LEN) if(new_id) - set_suffix(new_id) + set_id(new_id) if("sethome") var/new_home = input(user, "Enter Home:", name, home_destination) as null|anything in GLOB.deliverybeacontags if(new_home) @@ -260,7 +260,7 @@ var/ai = issilicon(user) var/dat dat += "

Multiple Utility Load Effector Mk. V

" - dat += "ID: [suffix]
" + dat += "ID: [id]
" dat += "Power: [on ? "On" : "Off"]
" dat += "

Status

" dat += "
"