Fix MULEbot id numbers showing nowhere but the alt-click menu (#33413)

This commit is contained in:
Tad Hardesty
2017-12-10 10:54:47 -08:00
committed by CitadelStationBot
parent e18457f92e
commit 41b0dbe36f

View File

@@ -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 += "<h3>Multiple Utility Load Effector Mk. V</h3>"
dat += "<b>ID:</b> [suffix]<BR>"
dat += "<b>ID:</b> [id]<BR>"
dat += "<b>Power:</b> [on ? "On" : "Off"]<BR>"
dat += "<h3>Status</h3>"
dat += "<div class='statusDisplay'>"