From e8d83c1acadd37b828bd74b310ed62939a33f015 Mon Sep 17 00:00:00 2001 From: datlo Date: Sun, 10 Feb 2019 13:42:07 +0000 Subject: [PATCH] Allow nuke ops to choose to play as a borg --- .../antagonists/_common/antag_spawner.dm | 49 ++++++++++++++----- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index d8851cb0cb8..9dbcde0431a 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -19,6 +19,7 @@ var/checking = FALSE var/TC_cost = 0 var/borg_to_spawn + var/upload_mind var/list/possible_types = list("Assault", "Medical", "Saboteur") /obj/item/antag_spawner/borg_tele/attack_self(mob/user) @@ -34,20 +35,42 @@ borg_to_spawn = input("What type of borg would you like to teleport?", "Cyborg Type", type) as null|anything in possible_types if(!borg_to_spawn || checking || used) return - checking = TRUE - to_chat(user, "The device is now checking for possible borgs.") - var/list/borg_candidates = pollCandidates("Do you want to play as a Syndicate [borg_to_spawn] borg?", ROLE_OPERATIVE, 1) - if(borg_candidates.len > 0 && !used) - checking = FALSE - used = TRUE - var/mob/M = pick(borg_candidates) - var/client/C = M.client - spawn_antag(C, get_turf(src.loc), "syndieborg") - qdel(src) - else - checking = FALSE - to_chat(user, "Unable to connect to Syndicate command. Please wait and try again later or refund your teleporter through your uplink.") + upload_mind = input("Would you like to continue playing as an operative or take over the cyborg? (Another player will control your old self)", "Play as") as null|anything in list("Nuclear Operative", "Syndicate Cyborg") + if(!upload_mind || checking || used) return + if(upload_mind == "Nuclear Operative") + checking = TRUE + to_chat(user, "The device is now checking for possible borgs.") + var/list/borg_candidates = pollCandidates("Do you want to play as a Syndicate [borg_to_spawn] borg?", ROLE_OPERATIVE, 1) + if(borg_candidates.len > 0 && !used) + checking = FALSE + used = TRUE + var/mob/M = pick(borg_candidates) + var/client/C = M.client + spawn_antag(C, get_turf(src.loc), "syndieborg") + qdel(src) + else + checking = FALSE + to_chat(user, "Unable to connect to Syndicate command. Please wait and try again later or refund your teleporter through your uplink.") + return + else if(upload_mind == "Syndicate Cyborg") + checking = TRUE + to_chat(user, "You attempt to upload your consciousness into a new syndicate cyborg.") + var/list/nuclear_candidates = pollCandidates("Do you want to play as the Syndicate Nuclear Operative [user.real_name]?", ROLE_OPERATIVE, 1) + if(nuclear_candidates.len > 0 && !used) + checking = FALSE + used = TRUE + var/mob/M = pick(nuclear_candidates) + var/client/nukeop_client = M.client + var/client/borg_client = user.client + spawn_antag(borg_client, get_turf(src.loc), "syndieborg") + user.key = nukeop_client.key + ticker.mode.greet_syndicate(user.mind) + qdel(src) + else + checking = FALSE + to_chat(user, "Unable to connect to Syndicate command. Please wait and try again later or refund your teleporter through your uplink.") + return /obj/item/antag_spawner/borg_tele/spawn_antag(client/C, turf/T, type = "") if(!borg_to_spawn) //If there's no type at all, let it still be used but don't do anything