diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm
index bfcfd23f505..e019af213fb 100644
--- a/code/__HELPERS/names.dm
+++ b/code/__HELPERS/names.dm
@@ -121,10 +121,6 @@ GLOBAL_VAR(command_name)
return new_station_name
/proc/syndicate_name()
- var/static/syndicate_name
- if (syndicate_name)
- return syndicate_name
-
var/name = ""
// Prefix
@@ -147,7 +143,6 @@ GLOBAL_VAR(command_name)
name += pick("-", "*", "")
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
- syndicate_name = name
return name
diff --git a/code/datums/antagonists/nukeop.dm b/code/datums/antagonists/nukeop.dm
new file mode 100644
index 00000000000..46e1ac36027
--- /dev/null
+++ b/code/datums/antagonists/nukeop.dm
@@ -0,0 +1,320 @@
+#define NUKE_RESULT_FLUKE 0
+#define NUKE_RESULT_NUKE_WIN 1
+#define NUKE_RESULT_CREW_WIN 2
+#define NUKE_RESULT_CREW_WIN_SYNDIES_DEAD 3
+#define NUKE_RESULT_DISK_LOST 4
+#define NUKE_RESULT_DISK_STOLEN 5
+#define NUKE_RESULT_NOSURVIVORS 6
+#define NUKE_RESULT_WRONG_STATION 7
+#define NUKE_RESULT_WRONG_STATION_DEAD 8
+
+/datum/antagonist/nukeop
+ name = "Nuclear Operative"
+ job_rank = ROLE_OPERATIVE
+ var/datum/objective_team/nuclear/nuke_team
+ var/always_new_team = FALSE //If not assigned a team by default ops will try to join existing ones, set this to TRUE to always create new team.
+ var/send_to_spawnpoint = TRUE //Should the user be moved to default spawnpoint.
+ var/nukeop_outfit = /datum/outfit/syndicate
+
+/datum/antagonist/nukeop/proc/update_synd_icons_added(mob/living/M)
+ var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
+ opshud.join_hud(M)
+ set_antag_hud(M, "synd")
+
+/datum/antagonist/nukeop/proc/update_synd_icons_removed(mob/living/M)
+ var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
+ opshud.leave_hud(M)
+ set_antag_hud(M, null)
+
+/datum/antagonist/nukeop/apply_innate_effects(mob/living/mob_override)
+ var/mob/living/M = mob_override || owner.current
+ update_synd_icons_added(M)
+
+/datum/antagonist/nukeop/remove_innate_effects(mob/living/mob_override)
+ var/mob/living/M = mob_override || owner.current
+ update_synd_icons_removed(M)
+
+/datum/antagonist/nukeop/proc/equip_op()
+ if(!ishuman(owner.current))
+ return
+ var/mob/living/carbon/human/H = owner.current
+
+ H.set_species(/datum/species/human) //Plasamen burn up otherwise, and lizards are vulnerable to asimov AIs
+
+ H.equipOutfit(nukeop_outfit)
+ return TRUE
+
+/datum/antagonist/nukeop/greet()
+ owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0)
+ to_chat(owner, "You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!")
+ owner.announce_objectives()
+ return
+
+/datum/antagonist/nukeop/on_gain()
+ give_alias()
+ forge_objectives()
+ . = ..()
+ equip_op()
+ memorize_code()
+ if(send_to_spawnpoint)
+ move_to_spawnpoint()
+
+/datum/antagonist/nukeop/get_team()
+ return nuke_team
+
+/datum/antagonist/nukeop/proc/assign_nuke()
+ if(nuke_team && !nuke_team.tracked_nuke)
+ nuke_team.memorized_code = random_nukecode()
+ var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
+ if(nuke)
+ nuke_team.tracked_nuke = nuke
+ if(nuke.r_code == "ADMIN")
+ nuke.r_code = nuke_team.memorized_code
+ else //Already set by admins/something else?
+ nuke_team.memorized_code = nuke.r_code
+ else
+ stack_trace("Syndicate nuke not found during nuke team creation.")
+ nuke_team.memorized_code = null
+
+/datum/antagonist/nukeop/proc/give_alias()
+ if(nuke_team && nuke_team.syndicate_name)
+ var/number = 1
+ number = nuke_team.members.Find(owner)
+ owner.current.real_name = "[nuke_team.syndicate_name] Operative #[number]"
+
+/datum/antagonist/nukeop/proc/memorize_code()
+ if(nuke_team && nuke_team.tracked_nuke && nuke_team.memorized_code)
+ owner.store_memory("[nuke_team.tracked_nuke] Code: [nuke_team.memorized_code]", 0, 0)
+ to_chat(owner, "The nuclear authorization code is: [nuke_team.memorized_code]")
+ else
+ to_chat(owner, "Unfortunately the syndicate was unable to provide you with nuclear authorization code.")
+
+/datum/antagonist/nukeop/proc/forge_objectives()
+ if(nuke_team)
+ owner.objectives |= nuke_team.objectives
+
+/datum/antagonist/nukeop/proc/move_to_spawnpoint()
+ var/team_number = 1
+ if(nuke_team)
+ team_number = nuke_team.members.Find(owner)
+ owner.current.forceMove(GLOB.nukeop_start[((team_number - 1) % GLOB.nukeop_start.len) + 1])
+
+/datum/antagonist/nukeop/leader/move_to_spawnpoint()
+ owner.current.forceMove(pick(GLOB.nukeop_leader_start))
+
+/datum/antagonist/nukeop/create_team(datum/objective_team/nuclear/new_team)
+ if(!new_team)
+ if(!always_new_team)
+ for(var/datum/antagonist/nukeop/N in GLOB.antagonists)
+ if(N.nuke_team)
+ nuke_team = N.nuke_team
+ return
+ nuke_team = new /datum/objective_team/nuclear
+ nuke_team.update_objectives()
+ assign_nuke() //This is bit ugly
+ return
+ if(!istype(new_team))
+ stack_trace("Wrong team type passed to [type] initialization.")
+ nuke_team = new_team
+
+/datum/antagonist/nukeop/leader
+ name = "Nuclear Operative Leader"
+ nukeop_outfit = /datum/outfit/syndicate/leader
+ always_new_team = TRUE
+ var/title
+
+/datum/antagonist/nukeop/leader/memorize_code()
+ ..()
+ if(nuke_team && nuke_team.memorized_code)
+ var/obj/item/paper/P = new
+ P.info = "The nuclear authorization code is: [nuke_team.memorized_code]"
+ P.name = "nuclear bomb code"
+ var/mob/living/carbon/human/H = owner.current
+ if(!istype(H))
+ P.forceMove(get_turf(H))
+ else
+ H.put_in_hands(P, TRUE)
+ H.update_icons()
+
+/datum/antagonist/nukeop/leader/give_alias()
+ title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
+ if(nuke_team && nuke_team.syndicate_name)
+ owner.current.real_name = "[nuke_team.syndicate_name] [title]"
+ else
+ owner.current.real_name = "Syndicate [title]"
+
+/datum/antagonist/nukeop/leader/greet()
+ owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0)
+ to_chat(owner, "You are the Syndicate [title] for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.")
+ to_chat(owner, "If you feel you are not up to this task, give your ID to another operative.")
+ to_chat(owner, "In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.")
+ owner.announce_objectives()
+ addtimer(CALLBACK(src, .proc/nuketeam_name_assign), 1)
+
+
+/datum/antagonist/nukeop/leader/proc/nuketeam_name_assign()
+ if(!nuke_team)
+ return
+ nuke_team.rename_team(ask_name())
+
+/datum/objective_team/nuclear/proc/rename_team(new_name)
+ syndicate_name = new_name
+ name = "[syndicate_name] Team"
+ for(var/I in members)
+ var/datum/mind/synd_mind = I
+ var/mob/living/carbon/human/H = synd_mind.current
+ if(!istype(H))
+ continue
+ var/chosen_name = H.dna.species.random_name(H.gender,0,syndicate_name)
+ H.fully_replace_character_name(H.real_name,chosen_name)
+
+/datum/antagonist/nukeop/leader/proc/ask_name()
+ var/randomname = pick(GLOB.last_names)
+ var/newname = stripped_input(owner.current,"You are the nuke operative [title]. Please choose a last name for your family.", "Name change",randomname)
+ if (!newname)
+ newname = randomname
+ else
+ newname = reject_bad_name(newname)
+ if(!newname)
+ newname = randomname
+
+ return capitalize(newname)
+
+/datum/antagonist/nukeop/lone
+ name = "Lone Operative"
+ always_new_team = TRUE
+ send_to_spawnpoint = FALSE //Handled by event
+ nukeop_outfit = /datum/outfit/syndicate/full
+
+/datum/antagonist/nukeop/lone/assign_nuke()
+ if(nuke_team && !nuke_team.tracked_nuke)
+ nuke_team.memorized_code = random_nukecode()
+ var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list
+ if(nuke)
+ nuke_team.tracked_nuke = nuke
+ if(nuke.r_code == "ADMIN")
+ nuke.r_code = nuke_team.memorized_code
+ else //Already set by admins/something else?
+ nuke_team.memorized_code = nuke.r_code
+ else
+ stack_trace("Station self destruct ot found during lone op team creation.")
+ nuke_team.memorized_code = null
+
+/datum/objective_team/nuclear
+ var/list/objectives
+ var/syndicate_name
+ var/obj/machinery/nuclearbomb/tracked_nuke
+ var/core_objective = /datum/objective/nuclear
+ var/memorized_code
+
+/datum/objective_team/nuclear/New()
+ ..()
+ syndicate_name = syndicate_name()
+
+/datum/objective_team/nuclear/proc/update_objectives()
+ objectives = list()
+ if(core_objective)
+ var/datum/objective/O = new core_objective
+ O.team = src
+ objectives += O
+ return
+
+/datum/objective_team/nuclear/proc/disk_rescued()
+ for(var/obj/item/disk/nuclear/D in GLOB.poi_list)
+ if(!D.onCentCom())
+ return FALSE
+ return TRUE
+
+/datum/objective_team/nuclear/proc/operatives_dead()
+ for(var/I in members)
+ var/datum/mind/operative_mind = I
+ if(ishuman(operative_mind.current) && (operative_mind.current.stat != DEAD))
+ return FALSE
+ return TRUE
+
+/datum/objective_team/nuclear/proc/syndies_escaped()
+ var/obj/docking_port/mobile/S = SSshuttle.getShuttle("syndicate")
+ return (S && (S.z == ZLEVEL_CENTCOM || S.z == ZLEVEL_TRANSIT))
+
+/datum/objective_team/nuclear/proc/get_result()
+ var/evacuation = SSshuttle.emergency.mode == SHUTTLE_ENDGAME
+ var/disk_rescued = disk_rescued()
+ var/syndies_didnt_escape = !syndies_escaped()
+ var/station_was_nuked = SSticker.mode.station_was_nuked
+ var/nuke_off_station = SSticker.mode.nuke_off_station
+
+ if(nuke_off_station == NUKE_SYNDICATE_BASE)
+ return NUKE_RESULT_FLUKE
+ else if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
+ return NUKE_RESULT_NUKE_WIN
+ else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
+ return NUKE_RESULT_NOSURVIVORS
+ else if (!disk_rescued && !station_was_nuked && nuke_off_station && !syndies_didnt_escape)
+ return NUKE_RESULT_WRONG_STATION
+ else if (!disk_rescued && !station_was_nuked && nuke_off_station && syndies_didnt_escape)
+ return NUKE_RESULT_WRONG_STATION_DEAD
+ else if ((disk_rescued || evacuation) && operatives_dead())
+ return NUKE_RESULT_CREW_WIN_SYNDIES_DEAD
+ else if (disk_rescued)
+ return NUKE_RESULT_CREW_WIN
+ else if (!disk_rescued && operatives_dead())
+ return NUKE_RESULT_DISK_LOST
+ else if (!disk_rescued && evacuation)
+ return NUKE_RESULT_DISK_STOLEN
+ else
+ return //Undefined result
+
+/datum/objective_team/nuclear/proc/roundend_display()
+ to_chat(world,"[syndicate_name] Operatives:")
+
+ switch(get_result())
+ if(NUKE_RESULT_FLUKE)
+ to_chat(world, "Humiliating Syndicate Defeat")
+ to_chat(world, "The crew of [station_name()] gave [syndicate_name] operatives back their bomb! The syndicate base was destroyed! Next time, don't lose the nuke!")
+ if(NUKE_RESULT_NUKE_WIN)
+ to_chat(world, "Syndicate Major Victory!")
+ to_chat(world, "[syndicate_name] operatives have destroyed [station_name()]!")
+ if(NUKE_RESULT_NOSURVIVORS)
+ to_chat(world, "Total Annihilation")
+ to_chat(world, "[syndicate_name] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion. Next time, don't lose the disk!")
+ if(NUKE_RESULT_WRONG_STATION)
+ to_chat(world, "Crew Minor Victory")
+ to_chat(world, "[syndicate_name] operatives secured the authentication disk but blew up something that wasn't [station_name()]. Next time, don't do that!")
+ if(NUKE_RESULT_WRONG_STATION_DEAD)
+ to_chat(world, "[syndicate_name] operatives have earned Darwin Award!")
+ to_chat(world, "[syndicate_name] operatives blew up something that wasn't [station_name()] and got caught in the explosion. Next time, don't do that!")
+ if(NUKE_RESULT_CREW_WIN_SYNDIES_DEAD)
+ to_chat(world, "Crew Major Victory!")
+ to_chat(world, "The Research Staff has saved the disk and killed the [syndicate_name] Operatives")
+ if(NUKE_RESULT_CREW_WIN)
+ to_chat(world, "Crew Major Victory")
+ to_chat(world, "The Research Staff has saved the disk and stopped the [syndicate_name] Operatives!")
+ if(NUKE_RESULT_DISK_LOST)
+ to_chat(world, "Neutral Victory!")
+ to_chat(world, "The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name] Operatives!")
+ if(NUKE_RESULT_DISK_STOLEN)
+ to_chat(world, "Syndicate Minor Victory!")
+ to_chat(world, "[syndicate_name] operatives survived the assault but did not achieve the destruction of [station_name()]. Next time, don't lose the disk!")
+ else
+ to_chat(world, "Neutral Victory")
+ to_chat(world, "Mission aborted!")
+
+ var/text = "
The syndicate operatives were:"
+ var/purchases = ""
+ var/TC_uses = 0
+ for(var/I in members)
+ var/datum/mind/syndicate = I
+ text += SSticker.mode.printplayer(syndicate) //to be moved
+ for(var/U in GLOB.uplinks)
+ var/datum/component/uplink/H = U
+ if(H.owner == syndicate.key)
+ TC_uses += H.spent_telecrystals
+ if(H.purchase_log)
+ purchases += H.purchase_log.generate_render(show_key = FALSE)
+ else
+ stack_trace("WARNING: Nuke Op uplink with no purchase_log Owner: [H.owner]")
+ text += "
"
+ text += "(Syndicates used [TC_uses] TC) [purchases]"
+ if(TC_uses == 0 && SSticker.mode.station_was_nuked && !operatives_dead())
+ text += "[icon2html('icons/badass.dmi', world, "badass")]"
+ to_chat(world, text)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 58b901a198e..1cad48981a7 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -203,12 +203,10 @@
SSticker.mode.update_brother_icons_removed(src)
/datum/mind/proc/remove_nukeop()
- if(src in SSticker.mode.syndicates)
- SSticker.mode.syndicates -= src
- SSticker.mode.update_synd_icons_removed(src)
- special_role = null
- remove_objectives()
- remove_antag_equip()
+ var/datum/antagonist/nukeop/nuke = has_antag_datum(/datum/antagonist/nukeop,TRUE)
+ if(nuke)
+ remove_antag_datum(nuke.type)
+ special_role = null
/datum/mind/proc/remove_wizard()
remove_antag_datum(/datum/antagonist/wizard)
@@ -325,14 +323,19 @@
SSticker.mode.add_cultist(src)
else if(is_revolutionary(creator))
- var/datum/antagonist/rev/converter = creator.mind.has_antag_datum(/datum/antagonist/rev)
+ var/datum/antagonist/rev/converter = creator.mind.has_antag_datum(/datum/antagonist/rev,TRUE)
converter.add_revolutionary(src,FALSE)
else if(is_servant_of_ratvar(creator))
add_servant_of_ratvar(current)
else if(is_nuclear_operative(creator))
- make_Nuke(null, null, 0, FALSE)
+ var/datum/antagonist/nukeop/converter = creator.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE)
+ var/datum/antagonist/nukeop/N = new(src)
+ N.send_to_spawnpoint = FALSE
+ N.nukeop_outfit = null
+ add_antag_datum(N,converter.nuke_team)
+
enslaved_to = creator
@@ -489,7 +492,8 @@
if (SSticker.mode.config_tag=="nuclear")
text = uppertext(text)
text = "[text]: "
- if (src in SSticker.mode.syndicates)
+ var/datum/antagonist/nukeop/N = has_antag_datum(/datum/antagonist/nukeop,TRUE)
+ if(N)
text += "OPERATIVE | nanotrasen"
text += "
To shuttle, undress, dress up."
var/code
@@ -709,7 +713,7 @@
out += sections[i]+"
"
- if(((src in SSticker.mode.traitors) || (src in SSticker.mode.syndicates)) && ishuman(current))
+ if(((src in SSticker.mode.traitors) || is_nuclear_operative(current)) && ishuman(current))
text = "Uplink: give"
var/datum/component/uplink/U = find_syndicate_uplink()
if(U)
@@ -1061,36 +1065,14 @@
message_admins("[key_name_admin(usr)] has de-nuke op'ed [current].")
log_admin("[key_name(usr)] has de-nuke op'ed [current].")
if("nuclear")
- if(!(src in SSticker.mode.syndicates))
- SSticker.mode.syndicates += src
- SSticker.mode.update_synd_icons_added(src)
- if (SSticker.mode.syndicates.len==1)
- SSticker.mode.prepare_syndicate_leader(src)
- else
- current.real_name = "[syndicate_name()] Operative #[SSticker.mode.syndicates.len-1]"
+ if(!has_antag_datum(/datum/antagonist/nukeop,TRUE))
+ add_antag_datum(/datum/antagonist/nukeop)
special_role = "Syndicate"
assigned_role = "Syndicate"
- to_chat(current, "You are a [syndicate_name()] agent!")
- SSticker.mode.forge_syndicate_objectives(src)
- SSticker.mode.greet_syndicate(src)
message_admins("[key_name_admin(usr)] has nuke op'ed [current].")
log_admin("[key_name(usr)] has nuke op'ed [current].")
if("lair")
current.forceMove(pick(GLOB.nukeop_start))
- if("dressup")
- var/mob/living/carbon/human/H = current
- qdel(H.belt)
- qdel(H.back)
- qdel(H.ears)
- qdel(H.gloves)
- qdel(H.head)
- qdel(H.shoes)
- qdel(H.wear_id)
- qdel(H.wear_suit)
- qdel(H.w_uniform)
-
- if (!SSticker.mode.equip_syndicate(current))
- to_chat(usr, "Equipping a syndicate failed!")
if("tellcode")
var/code
for (var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
@@ -1338,50 +1320,6 @@
T.should_specialise = TRUE
add_antag_datum(T)
-
-/datum/mind/proc/make_Nuke(turf/spawnloc, nuke_code, leader=0, telecrystals = TRUE)
- if(!(src in SSticker.mode.syndicates))
- SSticker.mode.syndicates += src
- SSticker.mode.update_synd_icons_added(src)
- assigned_role = "Syndicate"
- special_role = "Syndicate"
- SSticker.mode.forge_syndicate_objectives(src)
- SSticker.mode.greet_syndicate(src)
- current.faction |= "syndicate"
-
- if(spawnloc)
- current.forceMove(spawnloc)
-
- if(ishuman(current))
- var/mob/living/carbon/human/H = current
- qdel(H.belt)
- qdel(H.back)
- qdel(H.ears)
- qdel(H.gloves)
- qdel(H.head)
- qdel(H.shoes)
- qdel(H.wear_id)
- qdel(H.wear_suit)
- qdel(H.w_uniform)
-
- SSticker.mode.equip_syndicate(current, telecrystals)
-
- if (nuke_code)
- store_memory("Syndicate Nuclear Bomb Code: [nuke_code]", 0, 0)
- to_chat(current, "The nuclear authorization code is: [nuke_code]")
- else
- var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
- if(nuke)
- store_memory("Syndicate Nuclear Bomb Code: [nuke.r_code]", 0, 0)
- to_chat(current, "The nuclear authorization code is: nuke.r_code")
- else
- to_chat(current, "You were not provided with a nuclear code. Trying asking your team leader or contacting syndicate command.")
-
- if (leader)
- SSticker.mode.prepare_syndicate_leader(src,nuke_code)
- else
- current.real_name = "[syndicate_name()] Operative #[SSticker.mode.syndicates.len-1]"
-
/datum/mind/proc/make_Changling()
var/datum/antagonist/changeling/C = has_antag_datum(/datum/antagonist/changeling)
if(!C)
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index 2a1a196b0ec..e62c91168bf 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -4,7 +4,7 @@
w_class = WEIGHT_CLASS_TINY
var/used = 0
-/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, type = "")
+/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
return
/obj/item/antag_spawner/proc/equip_antag(mob/target)
@@ -67,18 +67,16 @@
else
to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.")
-/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, school,datum/mind/user)
+/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, kind ,datum/mind/user)
new /obj/effect/particle_effect/smoke(T)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
var/datum/mind/app_mind = M.mind
-
-
var/datum/antagonist/wizard/apprentice/app = new(app_mind)
app.master = user
- app.school = school
+ app.school = kind
var/datum/antagonist/wizard/master_wizard = user.has_antag_datum(/datum/antagonist/wizard)
if(master_wizard)
@@ -107,7 +105,7 @@
if(used)
to_chat(user, "[src] is out of power!")
return FALSE
- if(!(user.mind in SSticker.mode.syndicates))
+ if(!user.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE))
to_chat(user, "AUTHENTICATION FAILURE. ACCESS DENIED.")
return FALSE
if(user.z != ZLEVEL_CENTCOM)
@@ -133,19 +131,19 @@
else
to_chat(user, "Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.")
-/obj/item/antag_spawner/nuke_ops/spawn_antag(client/C, turf/T)
+/obj/item/antag_spawner/nuke_ops/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
- var/code = "BOMB-NOT-FOUND"
- var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
- if(nuke)
- code = nuke.r_code
- M.mind.make_Nuke(null, code, 0, FALSE)
- var/newname = M.dna.species.random_name(M.gender,0,SSticker.mode.nukeops_lastname)
- M.mind.name = newname
- M.real_name = newname
- M.name = newname
+
+ var/datum/antagonist/nukeop/new_op = new(M.mind)
+ new_op.send_to_spawnpoint = FALSE
+ new_op.nukeop_outfit = /datum/outfit/syndicate/no_crystals
+
+ var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
+ if(creator_op)
+ M.mind.add_antag_datum(new_op,creator_op.nuke_team)
+ M.mind.special_role = "Nuclear Operative"
//////SYNDICATE BORG
/obj/item/antag_spawner/nuke_ops/borg_tele
@@ -162,8 +160,12 @@
name = "syndicate medical teleporter"
borg_to_spawn = "Medical"
-/obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T)
+/obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/silicon/robot/R
+ var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
+ if(!creator_op)
+ return
+
switch(borg_to_spawn)
if("Medical")
R = new /mob/living/silicon/robot/modules/syndicate/medical(T)
@@ -174,8 +176,8 @@
if(prob(50))
brainfirstname = pick(GLOB.first_names_female)
var/brainopslastname = pick(GLOB.last_names)
- if(SSticker.mode.nukeops_lastname) //the brain inside the syndiborg has the same last name as the other ops.
- brainopslastname = SSticker.mode.nukeops_lastname
+ if(creator_op.nuke_team.syndicate_name) //the brain inside the syndiborg has the same last name as the other ops.
+ brainopslastname = creator_op.nuke_team.syndicate_name
var/brainopsname = "[brainfirstname] [brainopslastname]"
R.mmi.name = "Man-Machine Interface: [brainopsname]"
@@ -185,7 +187,11 @@
R.real_name = R.name
R.key = C.key
- R.mind.make_Nuke(null, nuke_code = null,leader=0, telecrystals = TRUE)
+
+ var/datum/antagonist/nukeop/new_borg = new(R.mind)
+ new_borg.send_to_spawnpoint = FALSE
+ R.mind.add_antag_datum(new_borg,creator_op.nuke_team)
+ R.mind.special_role = "Syndicate Cyborg"
///////////SLAUGHTER DEMON
@@ -222,8 +228,7 @@
to_chat(user, "You can't seem to work up the nerve to shatter the bottle. Perhaps you should try again later.")
-/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, type = "")
-
+/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/mob/living/simple_animal/slaughter/S = new demon_type(holder)
S.holder = holder
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 803e73b9e04..d001f08a33c 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -19,6 +19,7 @@
var/probability = 0
var/false_report_weight = 0 //How often will this show up incorrectly in a centcom report?
var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
+ var/nuke_off_station = 0 //Used for tracking where the nuke hit
var/round_ends_with_antag_death = 0 //flags the "one verse the station" antags as such
var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here
var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
@@ -528,5 +529,6 @@
//By default nuke just ends the round
/datum/game_mode/proc/OnNukeExplosion(off_station)
+ nuke_off_station = off_station
if(off_station < 2)
- station_was_nuked = TRUE //Will end the round on next check.
+ station_was_nuked = TRUE //Will end the round on next check.
\ No newline at end of file
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index b7886d37318..6f6e8cfaa3b 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -1,7 +1,3 @@
-/datum/game_mode
- var/list/datum/mind/syndicates = list()
- var/nukeops_lastname = ""
-
/datum/game_mode/nuclear
name = "nuclear emergency"
config_tag = "nuclear"
@@ -18,12 +14,11 @@
Crew: Defend the nuclear authentication disk and ensure that it leaves with you on the emergency shuttle."
var/const/agents_possible = 5 //If we ever need more syndicate agents.
-
var/nukes_left = 1 // Call 3714-PRAY right now and order more nukes! Limited offer!
- var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
- var/syndies_didnt_escape = 0 //Used for tracking if the syndies got the shuttle off of the z-level
var/list/pre_nukeops = list()
+ var/datum/objective_team/nuclear/nuke_team
+
/datum/game_mode/nuclear/pre_setup()
var/n_agents = min(round(num_players() / 10), antag_candidates.len, agents_possible)
for(var/i = 0, i < n_agents, ++i)
@@ -33,120 +28,23 @@
new_op.special_role = "Nuclear Operative"
log_game("[new_op.key] (ckey) has been selected as a nuclear operative")
return TRUE
-
-////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////
-/datum/game_mode/proc/update_synd_icons_added(datum/mind/synd_mind)
- var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
- opshud.join_hud(synd_mind.current)
- set_antag_hud(synd_mind.current, "synd")
-
-/datum/game_mode/proc/update_synd_icons_removed(datum/mind/synd_mind)
- var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
- opshud.leave_hud(synd_mind.current)
- set_antag_hud(synd_mind.current, null)
-
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
/datum/game_mode/nuclear/post_setup()
- var/nuke_code = random_nukecode()
- var/agent_number = 1
- var/datum/mind/leader = pick(pre_nukeops)
- syndicates += pre_nukeops
- for(var/i = 1 to pre_nukeops.len)
- var/datum/mind/op = pre_nukeops[i]
-
- forge_syndicate_objectives(op)
- greet_syndicate(op)
- equip_syndicate(op.current)
-
- if(nuke_code)
- op.store_memory("Syndicate Nuclear Bomb Code: [nuke_code]", 0, 0)
- to_chat(op.current, "The nuclear authorization code is: [nuke_code]")
-
- if(op == leader)
- op.current.forceMove(pick(GLOB.nukeop_leader_start))
- prepare_syndicate_leader(op, nuke_code)
- else
- op.current.forceMove(GLOB.nukeop_start[((i - 1) % GLOB.nukeop_start.len) + 1])
- op.current.real_name = "[syndicate_name()] Operative #[agent_number++]"
-
- update_synd_icons_added(op)
- op.current.playsound_local(get_turf(op.current), 'sound/ambience/antag/ops.ogg',100,0)
-
- var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
- if(nuke)
- nuke.r_code = nuke_code
+ //Assign leader
+ var/datum/mind/leader_mind = pre_nukeops[1]
+ var/datum/antagonist/nukeop/L = leader_mind.add_antag_datum(/datum/antagonist/nukeop/leader)
+ nuke_team = L.nuke_team
+ //Assign the remaining operatives
+ for(var/i = 2 to pre_nukeops.len)
+ var/datum/mind/nuke_mind = pre_nukeops[i]
+ nuke_mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
return ..()
-/datum/game_mode/proc/prepare_syndicate_leader(datum/mind/synd_mind, nuke_code)
- var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
- addtimer(CALLBACK(src, .proc/nuketeam_name_assign, synd_mind), 1)
- synd_mind.current.real_name = "[syndicate_name()] [leader_title]"
- to_chat(synd_mind.current, "You are the Syndicate [leader_title] for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.")
- to_chat(synd_mind.current, "If you feel you are not up to this task, give your ID to another operative.")
- to_chat(synd_mind.current, "In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.")
-
- var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
- synd_mind.current.put_in_hands(challenge, TRUE)
-
- var/static/id_cache = typecacheof(/obj/item/card/id)
- var/list/foundIDs = typecache_filter_list(synd_mind.current.GetAllContents(), id_cache)
- if(foundIDs.len)
- for(var/i in 1 to foundIDs.len)
- var/obj/item/card/id/ID = foundIDs[i]
- ID.name = "lead agent card"
- ID.access += ACCESS_SYNDICATE_LEADER
- else
- message_admins("Warning: Nuke Ops spawned without access to leave their spawn area!")
-
- var/obj/item/device/radio/headset/syndicate/alt/A = locate() in synd_mind.current
- if(A)
- A.command = TRUE
-
- if(nuke_code)
- var/obj/item/paper/P = new
- P.info = "The nuclear authorization code is: [nuke_code]"
- P.name = "nuclear bomb code"
- var/mob/living/carbon/human/H = synd_mind.current
- H.put_in_hands(P, TRUE)
- H.update_icons()
- else
- nuke_code = "code will be provided later"
- return
-
-/datum/game_mode/proc/nuketeam_name_assign(datum/mind/synd_mind)
- nukeops_lastname = nukelastname(synd_mind.current)
- NukeNameAssign(nukeops_lastname, syndicates)
-
-
-/datum/game_mode/proc/forge_syndicate_objectives(datum/mind/syndicate)
- var/datum/objective/nuclear/syndobj = new
- syndobj.owner = syndicate
- syndicate.objectives += syndobj
-
-
-/datum/game_mode/proc/greet_syndicate(datum/mind/syndicate, you_are=1)
- if(you_are)
- to_chat(syndicate.current, "You are a [syndicate_name()] agent!")
- syndicate.announce_objectives()
-
-/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob, telecrystals = TRUE)
- synd_mob.set_species(/datum/species/human) //Plasamen burn up otherwise, and lizards are vulnerable to asimov AIs
-
- if(telecrystals)
- synd_mob.equipOutfit(/datum/outfit/syndicate)
- else
- synd_mob.equipOutfit(/datum/outfit/syndicate/no_crystals)
- return TRUE
-
/datum/game_mode/nuclear/OnNukeExplosion(off_station)
..()
nukes_left--
- var/obj/docking_port/mobile/Shuttle = SSshuttle.getShuttle("syndicate")
- syndies_didnt_escape = (Shuttle && (Shuttle.z == ZLEVEL_CENTCOM || Shuttle.z == ZLEVEL_TRANSIT)) ? 0 : 1
- nuke_off_station = off_station
/datum/game_mode/nuclear/check_win()
if (nukes_left == 0)
@@ -154,8 +52,8 @@
return ..()
/datum/game_mode/proc/are_operatives_dead()
- for(var/datum/mind/operative_mind in syndicates)
- if(ishuman(operative_mind.current) && (operative_mind.current.stat!=2))
+ for(var/datum/mind/operative_mind in get_antagonists(/datum/antagonist/nukeop))
+ if(ishuman(operative_mind.current) && (operative_mind.current.stat != DEAD))
return FALSE
return TRUE
@@ -164,7 +62,7 @@
return replacementmode.check_finished()
if((SSshuttle.emergency.mode == SHUTTLE_ENDGAME) || station_was_nuked)
return TRUE
- if(are_operatives_dead())
+ if(nuke_team.operatives_dead())
var/obj/machinery/nuclearbomb/N
pass(N) //suppress unused warning
if(N.bomb_set) //snaaaaaaaaaake! It's not over yet!
@@ -172,85 +70,39 @@
..()
/datum/game_mode/nuclear/declare_completion()
- var/disk_rescued = 1
- for(var/obj/item/disk/nuclear/D in GLOB.poi_list)
- if(!D.onCentCom())
- disk_rescued = 0
- break
- var/crew_evacuated = (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)
-
- if(nuke_off_station == NUKE_SYNDICATE_BASE)
- SSticker.mode_result = "loss - syndicate nuked - disk secured"
- to_chat(world, "Humiliating Syndicate Defeat")
- to_chat(world, "The crew of [station_name()] gave [syndicate_name()] operatives back their bomb! The syndicate base was destroyed! Next time, don't lose the nuke!")
-
- SSticker.news_report = NUKE_SYNDICATE_BASE
-
- else if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
- SSticker.mode_result = "win - syndicate nuke"
- to_chat(world, "Syndicate Major Victory!")
- to_chat(world, "[syndicate_name()] operatives have destroyed [station_name()]!")
-
- SSticker.news_report = STATION_NUKED
-
- else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
- SSticker.mode_result = "halfwin - syndicate nuke - did not evacuate in time"
- to_chat(world, "Total Annihilation")
- to_chat(world, "[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion. Next time, don't lose the disk!")
-
- SSticker.news_report = STATION_NUKED
-
- else if (!disk_rescued && !station_was_nuked && nuke_off_station && !syndies_didnt_escape)
- SSticker.mode_result = "halfwin - blew wrong station"
- to_chat(world, "Crew Minor Victory")
- to_chat(world, "[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()]. Next time, don't do that!")
-
- SSticker.news_report = NUKE_MISS
-
- else if (!disk_rescued && !station_was_nuked && nuke_off_station && syndies_didnt_escape)
- SSticker.mode_result = "halfwin - blew wrong station - did not evacuate in time"
- to_chat(world, "[syndicate_name()] operatives have earned Darwin Award!")
- to_chat(world, "[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion. Next time, don't do that!")
-
- SSticker.news_report = NUKE_MISS
-
- else if ((disk_rescued || SSshuttle.emergency.mode != SHUTTLE_ENDGAME) && are_operatives_dead())
- SSticker.mode_result = "loss - evacuation - disk secured - syndi team dead"
- to_chat(world, "Crew Major Victory!")
- to_chat(world, "The Research Staff has saved the disk and killed the [syndicate_name()] Operatives")
-
- SSticker.news_report = OPERATIVES_KILLED
-
- else if (disk_rescued)
- SSticker.mode_result = "loss - evacuation - disk secured"
- to_chat(world, "Crew Major Victory")
- to_chat(world, "The Research Staff has saved the disk and stopped the [syndicate_name()] Operatives!")
-
- SSticker.news_report = OPERATIVES_KILLED
-
- else if (!disk_rescued && are_operatives_dead())
- SSticker.mode_result = "halfwin - evacuation - disk not secured"
- to_chat(world, "Neutral Victory!")
- to_chat(world, "The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!")
-
- SSticker.news_report = OPERATIVE_SKIRMISH
-
- else if (!disk_rescued && crew_evacuated)
- SSticker.mode_result = "halfwin - detonation averted"
- to_chat(world, "Syndicate Minor Victory!")
- to_chat(world, "[syndicate_name()] operatives survived the assault but did not achieve the destruction of [station_name()]. Next time, don't lose the disk!")
-
- SSticker.news_report = OPERATIVE_SKIRMISH
-
- else if (!disk_rescued && !crew_evacuated)
- SSticker.mode_result = "halfwin - interrupted"
- to_chat(world, "Neutral Victory")
- to_chat(world, "Round was mysteriously interrupted!")
-
- SSticker.news_report = OPERATIVE_SKIRMISH
-
- ..()
- return
+ var result = nuke_team.get_result()
+ switch(result)
+ if(NUKE_RESULT_FLUKE)
+ SSticker.mode_result = "loss - syndicate nuked - disk secured"
+ SSticker.news_report = NUKE_SYNDICATE_BASE
+ if(NUKE_RESULT_NUKE_WIN)
+ SSticker.mode_result = "win - syndicate nuke"
+ SSticker.news_report = STATION_NUKED
+ if(NUKE_RESULT_NOSURVIVORS)
+ SSticker.mode_result = "halfwin - syndicate nuke - did not evacuate in time"
+ SSticker.news_report = STATION_NUKED
+ if(NUKE_RESULT_WRONG_STATION)
+ SSticker.mode_result = "halfwin - blew wrong station"
+ SSticker.news_report = NUKE_MISS
+ if(NUKE_RESULT_WRONG_STATION_DEAD)
+ SSticker.mode_result = "halfwin - blew wrong station - did not evacuate in time"
+ SSticker.news_report = NUKE_MISS
+ if(NUKE_RESULT_CREW_WIN_SYNDIES_DEAD)
+ SSticker.mode_result = "loss - evacuation - disk secured - syndi team dead"
+ SSticker.news_report = OPERATIVES_KILLED
+ if(NUKE_RESULT_CREW_WIN)
+ SSticker.mode_result = "loss - evacuation - disk secured"
+ SSticker.news_report = OPERATIVES_KILLED
+ if(NUKE_RESULT_DISK_LOST)
+ SSticker.mode_result = "halfwin - evacuation - disk not secured"
+ SSticker.news_report = OPERATIVE_SKIRMISH
+ if(NUKE_RESULT_DISK_STOLEN)
+ SSticker.mode_result = "halfwin - detonation averted"
+ SSticker.news_report = OPERATIVE_SKIRMISH
+ else
+ SSticker.mode_result = "halfwin - interrupted"
+ SSticker.news_report = OPERATIVE_SKIRMISH
+ return ..()
/datum/game_mode/nuclear/generate_report()
return "One of Central Command's trading routes was recently disrupted by a raid carried out by the Gorlex Marauders. They seemed to only be after one ship - a highly-sensitive \
@@ -258,48 +110,16 @@
can activate this explosive is on your station. Ensure that it is protected at all times, and remain alert for possible intruders."
/datum/game_mode/proc/auto_declare_completion_nuclear()
- if( syndicates.len || (SSticker && istype(SSticker.mode, /datum/game_mode/nuclear)) )
- var/text = "
The syndicate operatives were:"
- var/purchases = ""
- var/TC_uses = 0
- for(var/datum/mind/syndicate in syndicates)
- text += printplayer(syndicate)
- for(var/datum/component/uplink/H in GLOB.uplinks)
- if(H.purchase_log)
- purchases += H.purchase_log.generate_render()
- else
- stack_trace("WARNING: Uplink with no purchase_log in nuclear mode! Owner: [H.owner]")
- text += "
"
- text += "(Syndicates used [TC_uses] TC) [purchases]"
- if(TC_uses == 0 && station_was_nuked && !are_operatives_dead())
- text += "[icon2html('icons/badass.dmi', world, "badass")]"
- to_chat(world, text)
+ var/list/nuke_teams = list()
+ for(var/datum/antagonist/nukeop/N in GLOB.antagonists) //collect all nuke teams
+ nuke_teams |= N.nuke_team
+ for(var/datum/objective_team/nuclear/nuke_team in nuke_teams)
+ nuke_team.roundend_display()
return TRUE
-/proc/nukelastname(mob/M) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
- var/randomname = pick(GLOB.last_names)
- var/newname = copytext(sanitize(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN)
-
- if (!newname)
- newname = randomname
-
- else
- if (newname == "Unknown" || newname == "floor" || newname == "wall" || newname == "rwall" || newname == "_")
- to_chat(M, "That name is reserved.")
- return nukelastname(M)
-
- return capitalize(newname)
-
-/proc/NukeNameAssign(lastname,list/syndicates)
- for(var/datum/mind/synd_mind in syndicates)
- var/mob/living/carbon/human/H = synd_mind.current
- synd_mind.name = H.dna.species.random_name(H.gender,0,lastname)
- synd_mind.current.real_name = synd_mind.name
- return
-
/proc/is_nuclear_operative(mob/M)
- return M && istype(M) && M.mind && SSticker && SSticker.mode && M.mind in SSticker.mode.syndicates
+ return M && istype(M) && M.mind && M.mind.has_antag_datum(/datum/antagonist/nukeop)
/datum/outfit/syndicate
name = "Syndicate Operative - Basic"
@@ -316,15 +136,24 @@
/obj/item/kitchen/knife/combat/survival)
var/tc = 25
+ var/command_radio = FALSE
+
+
+/datum/outfit/syndicate/leader
+ name = "Syndicate Leader - Basic"
+ id = /obj/item/card/id/syndicate/nuke_leader
+ r_hand = /obj/item/device/nuclear_challenge
+ command_radio = TRUE
/datum/outfit/syndicate/no_crystals
tc = 0
-
/datum/outfit/syndicate/post_equip(mob/living/carbon/human/H)
var/obj/item/device/radio/R = H.ears
R.set_frequency(GLOB.SYND_FREQ)
R.freqlock = 1
+ if(command_radio)
+ R.command = TRUE
if(tc)
var/obj/item/device/radio/uplink/nuclear/U = new(H, H.key, tc)
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index a36503e7c44..325b0a6a716 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -77,16 +77,16 @@
icon = 'icons/obj/machines/nuke_terminal.dmi'
icon_state = "nuclearbomb_base"
anchored = TRUE //stops it being moved
- use_tag = TRUE
/obj/machinery/nuclearbomb/syndicate
+ use_tag = TRUE
//ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb
/obj/machinery/nuclearbomb/syndicate/get_cinematic_type(off_station)
var/datum/game_mode/nuclear/NM = SSticker.mode
switch(off_station)
if(0)
- if(istype(NM) && NM.syndies_didnt_escape)
+ if(istype(NM) && !NM.nuke_team.syndies_escaped())
return CINEMATIC_ANNIHILATION
else
return CINEMATIC_NUKE_WIN
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index 2df573dc6d2..70477292947 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -71,9 +71,9 @@
target = null
var/list/possible_targets = list()
var/turf/here = get_turf(src)
- for(var/V in SSticker.mode.syndicates)
+ for(var/V in get_antagonists(/datum/antagonist/nukeop))
var/datum/mind/M = V
- if(M.current && M.current.stat != DEAD)
+ if(ishuman(M.current) && M.current.stat != DEAD)
possible_targets |= M.current
var/mob/living/closest_operative = get_closest_atom(/mob/living/carbon/human, possible_targets, here)
if(closest_operative)
diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm
index b0714217f9e..538960a1c6f 100644
--- a/code/game/machinery/computer/telecrystalconsoles.dm
+++ b/code/game/machinery/computer/telecrystalconsoles.dm
@@ -154,7 +154,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
/obj/machinery/computer/telecrystals/boss/proc/getDangerous()//This scales the TC assigned with the round population.
..()
- var/danger = GLOB.joined_player_list.len - SSticker.mode.syndicates.len
+ var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
+ var/danger = GLOB.joined_player_list.len - nukeops.len
danger = Ceiling(danger, 10)
scaleTC(danger)
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index 6b2caf4d4db..79262f8172e 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -197,6 +197,10 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/syndicate/anyone
anyone = TRUE
+/obj/item/card/id/syndicate/nuke_leader
+ name = "lead agent card"
+ access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
+
/obj/item/card/id/syndicate_command
name = "syndicate ID card"
desc = "An ID straight from the Syndicate."
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index bb9e4def782..af31f471da2 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -384,9 +384,10 @@
dat += "
[other_players] players in invalid state or the statistics code is bugged!"
dat += "
"
- if(SSticker.mode.syndicates.len)
+ var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
+ if(nukeops.len)
dat += "
| Syndicates | |
| [M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""] | " diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 8a18dc9ac5f..5ceef95469e 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -238,26 +238,17 @@ if(agentcount < 3) return 0 - var/nuke_code = random_nukecode() - - var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list - if(nuke) - nuke.r_code = nuke_code - //Let's find the spawn locations var/leader_chosen = FALSE - var/spawnpos = 1 //Decides where they'll spawn. 1=leader. - + var/datum/objective_team/nuclear/nuke_team for(var/mob/c in chosen) - if(spawnpos > GLOB.nukeop_start.len) - spawnpos = 1 //Ran out of spawns. Let's loop back to the first non-leader position var/mob/living/carbon/human/new_character=makeBody(c) if(!leader_chosen) leader_chosen = TRUE - new_character.mind.make_Nuke(pick(GLOB.nukeop_leader_start), nuke_code, TRUE) + var/datum/antagonist/nukeop/N = new_character.mind.add_antag_datum(/datum/antagonist/nukeop/leader) + nuke_team = N.nuke_team else - new_character.mind.make_Nuke(GLOB.nukeop_start[spawnpos], nuke_code) - spawnpos++ + new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team) return 1 else return 0 diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index bf12b3eb66f..a464cd1cbd6 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -386,7 +386,8 @@ Traitors and the like can also be revived with the previous role mostly intact. A.equip_wizard() if("Syndicate") new_character.forceMove(pick(GLOB.nukeop_start)) - call(/datum/game_mode/proc/equip_syndicate)(new_character) + var/datum/antagonist/nukeop/N = new_character.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE) + N.equip_op() if("Space Ninja") var/list/ninja_spawn = list() for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list) diff --git a/code/modules/events/operative.dm b/code/modules/events/operative.dm index 47130ff9242..e0e3b987762 100644 --- a/code/modules/events/operative.dm +++ b/code/modules/events/operative.dm @@ -26,32 +26,12 @@ var/datum/preferences/A = new A.copy_to(operative) operative.dna.update_dna_identity() - - operative.equipOutfit(/datum/outfit/syndicate/full) - var/datum/mind/Mind = new /datum/mind(selected.key) Mind.assigned_role = "Lone Operative" Mind.special_role = "Lone Operative" - SSticker.mode.traitors |= Mind Mind.active = 1 - - var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.machines - if(nuke) - var/nuke_code - if(!nuke.r_code || nuke.r_code == "ADMIN") - nuke_code = random_nukecode() - nuke.r_code = nuke_code - else - nuke_code = nuke.r_code - - Mind.store_memory("Station Self-Destruct Device Code: [nuke_code]", 0, 0) - to_chat(Mind.current, "The nuclear authorization code is: [nuke_code]") - - var/datum/objective/nuclear/O = new() - O.owner = Mind - Mind.objectives += O - Mind.transfer_to(operative) + Mind.add_antag_datum(/datum/antagonist/nukeop/lone) message_admins("[key_name_admin(operative)] has been made into lone operative by an event.") log_game("[key_name(operative)] was spawned as a lone operative by an event.") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 3dc56c936b8..747d589c052 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -363,7 +363,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(M.mind in SSticker.mode.cult) return 2 if("nuclear") - if(M.mind in SSticker.mode.syndicates) + if(M.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE)) return 2 if("changeling") if(M.mind.has_antag_datum(/datum/antagonist/changeling,TRUE)) diff --git a/tgstation.dme b/tgstation.dme index bf1f4036a13..69bd4b80485 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -287,6 +287,7 @@ #include "code\datums\antagonists\devil.dm" #include "code\datums\antagonists\internal_affairs.dm" #include "code\datums\antagonists\ninja.dm" +#include "code\datums\antagonists\nukeop.dm" #include "code\datums\antagonists\pirate.dm" #include "code\datums\antagonists\revolution.dm" #include "code\datums\antagonists\wizard.dm"