From a76b794737305bfa73a28dd071e356c608c007bf Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Sat, 1 Apr 2017 11:15:48 -0400 Subject: [PATCH] Cleans up telecrystal consoles a bit (#25721) --- code/game/machinery/computer/telecrystalconsoles.dm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index ba6d63d98e5..a6ce12e30de 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -21,16 +21,13 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F var/obj/item/uplinkholder = null var/obj/machinery/computer/telecrystals/boss/linkedboss = null -/obj/machinery/computer/telecrystals/uplinker/New() +/obj/machinery/computer/telecrystals/uplinker/Initialize() ..() - var/ID - if(possible_uplinker_IDs.len) - ID = pick(possible_uplinker_IDs) - possible_uplinker_IDs -= ID - name = "[name] [ID]" - else - name = "[name] [rand(1,999)]" + var/ID = pick_n_take(possible_uplinker_IDs) + if(!ID) + ID = rand(1,999) + name = "[name] [ID]" /obj/machinery/computer/telecrystals/uplinker/attackby(obj/item/O, mob/user, params) if(uplinkholder)