diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 297dc4ff323..4f2ac8ef1ed 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -12,10 +12,10 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) var/datum/uplink_item/I = new path if(!I.item) continue - // if(I.gamemodes.len && ticker && !(ticker.mode.type in I.gamemodes)) - // continue - // if(I.excludefrom.len && ticker && (ticker.mode.type in I.excludefrom)) - // continue + if(I.gamemodes.len && ticker && !(ticker.mode.type in I.gamemodes)) + continue + if(I.excludefrom.len && ticker && (ticker.mode.type in I.excludefrom)) + continue if(I.last) last += I continue @@ -945,6 +945,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/explosives/c4bag name = "Bag of C-4 explosives" desc = "Because sometimes quantity is quality. Contains 10 C-4 plastic explosives." + reference = "C4B" item = /obj/item/storage/backpack/duffel/syndie/c4 cost = 8 //20% discount! cant_discount = TRUE @@ -963,6 +964,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Contains 3 X-4 shaped plastic explosives. Similar to C4, but with a stronger blast that is directional instead of circular. \ X-4 can be placed on a solid surface, such as a wall or window, and it will blast through the wall, injuring anything on the opposite side, while being safer to the user. \ For when you want a controlled explosion that leaves a wider, deeper, hole." + reference = "X4B" item = /obj/item/storage/backpack/duffel/syndie/x4 cost = 4 cant_discount = TRUE diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index a72f8f10433..de94b27b425 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -19,6 +19,9 @@ var/borg_to_spawn var/checking = FALSE +/obj/item/antag_spawner/nuke_ops/proc/before_candidate_search(user) + return + /obj/item/antag_spawner/nuke_ops/proc/check_usability(mob/user) if(used) to_chat(user, "[src] is out of power!") @@ -35,7 +38,12 @@ if(!(check_usability(user))) return + var/continue_proc = before_candidate_search(user) + if(!continue_proc) + return + checking = TRUE + to_chat(user, "You activate [src] and wait for confirmation.") var/list/nuke_candidates = pollCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg" : "operative"]?", ROLE_OPERATIVE, TRUE, 150) if(LAZYLEN(nuke_candidates)) @@ -77,6 +85,7 @@ /obj/item/antag_spawner/nuke_ops/borg_tele name = "syndicate cyborg teleporter" desc = "A single-use teleporter designed to quickly reinforce operatives in the field." + var/switch_roles = FALSE /obj/item/antag_spawner/nuke_ops/borg_tele/assault name = "syndicate assault cyborg teleporter" @@ -90,6 +99,18 @@ name = "syndicate saboteur teleporter" borg_to_spawn = "Saboteur" +/obj/item/antag_spawner/nuke_ops/borg_tele/before_candidate_search(mob/user) + var/switch_roles_choice = input("Would you like to continue playing as an operative or take over as the cyborg? If you play as the cyborg, another player will control your old self.", "Play As") as null|anything in list("Nuclear Operative", "Syndicate Cyborg") + if(!switch_roles_choice || !(check_usability(user))) + return FALSE + + if(switch_roles_choice == "Syndicate Cyborg") + switch_roles = TRUE + else + switch_roles = FALSE + + return TRUE + /obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T, datum/mind/user) if(!(user in ticker.mode.syndicates)) used = FALSE @@ -116,7 +137,14 @@ R.mmi.brainmob.real_name = brainopsname R.mmi.brainmob.name = brainopsname - set_syndicate_values(C, R) + if (!switch_roles) + set_syndicate_values(C, R) + else + var/mob/living/L = user.current + set_syndicate_values(user.current.client, R) + + L.key = C.key + ticker.mode.greet_syndicate(L.mind) ///////////SLAUGHTER DEMON