diff --git a/code/datums/mind.dm b/code/datums/mind.dm index a5b7b4dfdc9..045b87e3eb3 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -211,6 +211,38 @@ gang_datum.remove_gang_hud(src) +//Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does. + +/datum/mind/proc/enslave_mind_to_creator(mob/living/creator) + if(iscultist(creator)) + ticker.mode.add_cultist(src) + + else if(is_gangster(creator)) + ticker.mode.add_gangster(src, creator.mind.gang_datum, TRUE) + + else if(is_handofgod_redcultist(creator) || is_handofgod_redprophet(creator)) + ticker.mode.add_hog_follower(src, "Red") + + else if(is_handofgod_bluecultist(creator) || is_handofgod_blueprophet(creator)) + ticker.mode.add_hog_follower(src, "Blue") + + else if(is_revolutionary_in_general(creator)) + ticker.mode.add_revolutionary(src) + + else if(is_servant_of_ratvar(creator)) + add_servant_of_ratvar(src) + + else if(is_nuclear_operative(creator)) + make_Nuke(null, null, 0, FALSE) + + enslaved_to = creator + + current.faction = creator.faction + + if(special_role) + message_admins("[key_name_admin(current)](?) has been created by [key_name_admin(creator)](?), an antagonist.") + current << "Despite your creators current allegiances, your true master remains [creator.real_name]. If their loyalities change, so do yours. This will never change unless your creator's body is destroyed." + /datum/mind/proc/show_memory(mob/recipient, window=1) if(!recipient) recipient = current @@ -1356,7 +1388,7 @@ ticker.mode.finalize_traitor(src) ticker.mode.greet_traitor(src) -/datum/mind/proc/make_Nuke(turf/spawnloc,nuke_code,leader=0, telecrystals = TRUE) +/datum/mind/proc/make_Nuke(turf/spawnloc, nuke_code, leader=0, telecrystals = TRUE) if(!(src in ticker.mode.syndicates)) ticker.mode.syndicates += src ticker.mode.update_synd_icons_added(src) @@ -1364,24 +1396,33 @@ ticker.mode.forge_syndicate_objectives(src) ticker.mode.greet_syndicate(src) - current.loc = spawnloc + if(spawnloc) + current.loc = spawnloc - 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(istype(current, /mob/living/carbon/human)) + 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) - ticker.mode.equip_syndicate(current, telecrystals) + ticker.mode.equip_syndicate(current, telecrystals) if (nuke_code) store_memory("Syndicate Nuclear Bomb Code: [nuke_code]", 0, 0) current << "The nuclear authorization code is: [nuke_code]" + else + var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list + if(nuke) + store_memory("Syndicate Nuclear Bomb Code: [nuke.r_code]", 0, 0) + current << "The nuclear authorization code is: nuke.r_code" + else + current << "You were not provided with a nuclear code. Trying asking your team leader or contacting syndicate command." if (leader) ticker.mode.prepare_syndicate_leader(src,nuke_code) diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index cbc03db8e52..614664ddcde 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -162,14 +162,10 @@ 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/weapon/antag_spawner/nuke_ops/spawn_antag(client/C, turf/T) - var/new_op_code = "Ask your leader!" var/mob/living/carbon/human/M = new/mob/living/carbon/human(T) C.prefs.copy_to(M) M.key = C.key - var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list - if(nuke) - new_op_code = nuke.r_code - M.mind.make_Nuke(T, new_op_code, 0, FALSE) + M.mind.make_Nuke(T, nuke_code = null, 0, FALSE) var/newname = M.dna.species.random_name(M.gender,0,ticker.mode.nukeops_lastname) M.mind.name = newname M.real_name = newname @@ -213,12 +209,7 @@ R.mmi.brainmob.name = brainopsname R.key = C.key - ticker.mode.syndicates += R.mind - ticker.mode.update_synd_icons_added(R.mind) - R.mind.special_role = "syndicate" - R.faction = list("syndicate") - - + R.mind.make_Nuke(T, nuke_code = null,leader=0, telecrystals = TRUE) ///////////SLAUGHTER DEMON diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 66af9e8e8e7..6847906410c 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -23,10 +23,6 @@ return 0 if(issilicon(mind.current) || isbot(mind.current) || isdrone(mind.current)) return 0 //can't convert machines, that's ratvar's thing - if(isguardian(mind.current)) - var/mob/living/simple_animal/hostile/guardian/G = mind.current - if(!iscultist(G.summoner)) - return 0 //can't convert it unless the owner is converted if(is_sacrifice_target(mind)) return 0 if(mind.enslaved_to && !iscultist(mind.enslaved_to)) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index ccb03c9055d..1aded1d6205 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -284,6 +284,9 @@ synd_mind.current.real_name = synd_mind.name return +/proc/is_nuclear_operative(mob/M) + return M && istype(M) && M.mind && ticker && ticker.mode && M.mind in ticker.mode.syndicates + /datum/outfit/syndicate name = "Syndicate Operative - Basic" diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index bef0d66a218..c4253391ec3 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -554,7 +554,7 @@ var/global/list/parasites = list() //all currently existing/living guardians var/mob/living/simple_animal/hostile/guardian/G = new pickedtype(user, theme) G.summoner = user G.key = key - G.faction |= user.faction + G.mind.enslave_mind_to_creator(user) switch(theme) if("tech") user << "[G.tech_fluff_string]" diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 6d254521789..66b18bd7ce5 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -191,7 +191,7 @@ SM.key = theghost.key SM.languages_spoken |= HUMAN SM.languages_understood |= HUMAN - SM.faction = user.faction + SM.mind.enslave_mind_to_creator(user) SM.sentience_act() SM << "All at once it makes sense: you know what you are and who you are! Self awareness is yours!" SM << "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist them in completing their goals at any cost." @@ -499,31 +499,8 @@ G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost." G.mind.store_memory("Serve [user.real_name], your creator.") - var/golem_becomes_antag = FALSE - if(iscultist(user)) //If the golem's master is a part of a team antagonist, immediately make the golem one, too - ticker.mode.add_cultist(G.mind) - golem_becomes_antag = TRUE - else if(is_gangster(user)) - ticker.mode.add_gangster(G.mind, user.mind.gang_datum, TRUE) - golem_becomes_antag = TRUE - else if(is_handofgod_redcultist(user) || is_handofgod_redprophet(user)) - ticker.mode.add_hog_follower(G.mind, "Red") - golem_becomes_antag = TRUE - else if(is_handofgod_bluecultist(user) || is_handofgod_blueprophet(user)) - ticker.mode.add_hog_follower(G.mind, "Blue") - golem_becomes_antag = TRUE - else if(is_revolutionary_in_general(user)) - ticker.mode.add_revolutionary(G.mind) - golem_becomes_antag = TRUE - else if(is_servant_of_ratvar(user)) - add_servant_of_ratvar(G) - golem_becomes_antag = TRUE + G.mind.enslave_mind_to_creator(user) - G.mind.enslaved_to = user - if(golem_becomes_antag) - G << "Despite your servitude to another cause, your true master remains [user.real_name]. This will never change unless your master's body is destroyed." - if(user.mind.special_role) - message_admins("[key_name_admin(G)](?) has been summoned by [key_name_admin(user)](?), an antagonist.") log_game("[key_name(G)] was made a golem by [key_name(user)].") log_admin("[key_name(G)] was made a golem by [key_name(user)].") qdel(src)