mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Merge pull request #19851 from KorPhaeron/mind
Refactors slaving summoned mobs to their creators/sentience potions now convert to users antag team
This commit is contained in:
+54
-13
@@ -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)](<A HREF='?_src_=holder;adminmoreinfo=\ref[current]'>?</A>) has been created by [key_name_admin(creator)](<A HREF='?_src_=holder;adminmoreinfo=\ref[creator]'>?</A>), an antagonist.")
|
||||
current << "<span class='userdanger'>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.</span>"
|
||||
|
||||
/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("<B>Syndicate Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
|
||||
current << "The nuclear authorization code is: <B>[nuke_code]</B>"
|
||||
else
|
||||
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list
|
||||
if(nuke)
|
||||
store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke.r_code]", 0, 0)
|
||||
current << "The nuclear authorization code is: <B>nuke.r_code</B>"
|
||||
else
|
||||
current << "You were not provided with a nuclear code. Trying asking your team leader or contacting syndicate command.</B>"
|
||||
|
||||
if (leader)
|
||||
ticker.mode.prepare_syndicate_leader(src,nuke_code)
|
||||
|
||||
@@ -162,14 +162,10 @@
|
||||
user << "<span class='warning'>Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>"
|
||||
|
||||
/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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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]"
|
||||
|
||||
@@ -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 << "<span class='warning'>All at once it makes sense: you know what you are and who you are! Self awareness is yours!</span>"
|
||||
SM << "<span class='userdanger'>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.</span>"
|
||||
@@ -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("<b>Serve [user.real_name], your creator.</b>")
|
||||
|
||||
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 << "<span class='userdanger'>Despite your servitude to another cause, your true master remains [user.real_name]. This will never change unless your master's body is destroyed.</span>"
|
||||
if(user.mind.special_role)
|
||||
message_admins("[key_name_admin(G)](<A HREF='?_src_=holder;adminmoreinfo=\ref[G]'>?</A>) has been summoned by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>), 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)
|
||||
|
||||
Reference in New Issue
Block a user