diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index 3b67625191..2aa3939f72 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -135,7 +135,7 @@
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params)
#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target)
-#define COMSIG_MOB_KEY_CHANGE "mob_key_change" //from base of /mob/transfer_key()
+#define COMSIG_MOB_KEY_CHANGE "mob_key_change" //from base of /mob/transfer_ckey()
#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): ()
// /mob/living signals
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 8f206f6765..93e3e553b2 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -473,7 +473,7 @@
G_found.client.prefs.copy_to(new_character)
new_character.dna.update_dna_identity()
- G_found.transfer_key(new_character, FALSE)
+ G_found.transfer_ckey(new_character, FALSE)
return new_character
diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm
index 37fbc243d2..5bbc5de4a5 100644
--- a/code/datums/brain_damage/imaginary_friend.dm
+++ b/code/datums/brain_damage/imaginary_friend.dm
@@ -46,7 +46,7 @@
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s imaginary friend?", ROLE_PAI, null, null, 75, friend)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(friend, FALSE)
+ C.transfer_ckey(friend, FALSE)
friend_initialized = TRUE
else
qdel(src)
diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm
index 59893e1cf4..6ac4ad8e20 100644
--- a/code/datums/brain_damage/split_personality.dm
+++ b/code/datums/brain_damage/split_personality.dm
@@ -26,7 +26,7 @@
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s split personality?", ROLE_PAI, null, null, 75, stranger_backseat)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(stranger_backseat, FALSE)
+ C.transfer_ckey(stranger_backseat, FALSE)
log_game("[key_name(stranger_backseat)] became [key_name(owner)]'s split personality.")
message_admins("[ADMIN_LOOKUPFLW(stranger_backseat)] became [ADMIN_LOOKUPFLW(owner)]'s split personality.")
else
@@ -184,7 +184,7 @@
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s brainwashed mind?", null, null, null, 75, stranger_backseat)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(stranger_backseat, FALSE)
+ C.transfer_ckey(stranger_backseat, FALSE)
else
qdel(src)
diff --git a/code/datums/components/virtual_reality.dm b/code/datums/components/virtual_reality.dm
index 36fae8313d..b6597b9a9c 100644
--- a/code/datums/components/virtual_reality.dm
+++ b/code/datums/components/virtual_reality.dm
@@ -5,22 +5,26 @@
var/obj/machinery/vr_sleeper/vr_sleeper
var/datum/action/quit_vr/quit_action
var/you_die_in_the_game_you_die_for_real = FALSE
+ var/datum/component/virtual_reality/inception //The component works on a very fragile link betwixt mind, ckey and death.
/datum/component/virtual_reality/Initialize(mob/M, obj/machinery/vr_sleeper/gaming_pod, yolo = FALSE, new_char = TRUE)
if(!ismob(parent) || !istype(M))
return COMPONENT_INCOMPATIBLE
var/mob/vr_M = parent
mastermind = M.mind
+ RegisterSignal(M, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETED), .proc/game_over)
+ RegisterSignal(M, COMSIG_MOB_KEY_CHANGE, .proc/switch_player)
RegisterSignal(mastermind, COMSIG_MIND_TRANSFER, .proc/switch_player)
- RegisterSignal(mastermind, COMSIG_MOB_KEY_CHANGE, .proc/switch_player)
you_die_in_the_game_you_die_for_real = yolo
quit_action = new()
if(gaming_pod)
vr_sleeper = gaming_pod
RegisterSignal(vr_sleeper, COMSIG_ATOM_EMAG_ACT, .proc/you_only_live_once)
- RegisterSignal(vr_sleeper, COMSIG_MACHINE_EJECT_OCCUPANT, .proc/virtual_reality_in_a_virtual_reality)
+ RegisterSignal(vr_sleeper, COMSIG_MACHINE_EJECT_OCCUPANT, .proc/revert_to_reality)
vr_M.ckey = M.ckey
- M.inception = src
+ var/datum/component/virtual_reality/clusterfk = M.GetComponent(/datum/component/virtual_reality)
+ if(clusterfk && !clusterfk.inception)
+ clusterfk.inception = src
SStgui.close_user_uis(M, src)
/datum/component/virtual_reality/RegisterWithParent()
@@ -46,13 +50,11 @@
/datum/component/virtual_reality/proc/switch_player(datum/source, mob/new_mob, mob/old_mob)
if(vr_sleeper || !new_mob.mind)
- // Machineries currently don't deal up with the occupant being polymorphed or the such. Or something (An admin, I hope) dared to use fuck this up.
- virtual_reality_in_a_virtual_reality(source, new_mob, FALSE, TRUE)
+ // Machineries currently don't deal up with the occupant being polymorphed et similar... Or did something fuck up?
+ revert_to_reality()
return
old_mob.audiovisual_redirect = null
- old_mob.inception = null
new_mob.audiovisual_redirect = parent
- new_mob.inception = src
/datum/component/virtual_reality/proc/action_trigger(datum/signal_source, datum/action/source)
if(source != quit_action)
@@ -86,27 +88,27 @@
quit_it()
return COMPONENT_BLOCK_GHOSTING
-/datum/component/virtual_reality/proc/virtual_reality_in_a_virtual_reality(datum/source, mob/occupant, killme = FALSE)
+/datum/component/virtual_reality/proc/virtual_reality_in_a_virtual_reality(mob/player, killme = FALSE, datum/component/virtual_reality/yo_dawg)
var/mob/M = parent
- var/ckey_transfer = FALSE
- if(!QDELETED(M.inception) && M.inception.parent)
- M.inception.virtual_reality_in_a_virtual_reality(source, occupant, killme)
- else
- ckey_transfer = TRUE
- quit_it(FALSE, killme, ckey_transfer, occupant)
+ quit_it(FALSE, killme, player, yo_dawg)
+ yo_dawg.inception = null
if(killme)
M.death(FALSE)
-/datum/component/virtual_reality/proc/quit_it(deathcheck = FALSE, cleanup = FALSE, ckey_transfer = TRUE, mob/override)
+/datum/component/virtual_reality/proc/quit_it(deathcheck = FALSE, cleanup = FALSE, mob/override)
var/mob/M = parent
var/mob/dreamer = override ? override : mastermind.current
if(!mastermind)
- to_chat(M, "You feel like something terrible happened. You try to wake up from this dream, but you can't...")
+ to_chat(M, "You feel a dreadful sensation, something terrible happened. You try to wake up, but you find yourself unable to...")
else
- if(ckey_transfer)
- M.transfer_key(dreamer, FALSE)
+ var/key_transfer = FALSE
+ if(inception?.parent)
+ inception.virtual_reality_in_a_virtual_reality(dreamer, cleanup, src)
+ else
+ key_transfer = TRUE
+ if(key_transfer)
+ M.transfer_ckey(dreamer, FALSE)
dreamer.stop_sound_channel(CHANNEL_HEARTBEAT)
- dreamer.inception = null
dreamer.audiovisual_redirect = null
if(deathcheck && you_die_in_the_game_you_die_for_real)
to_chat(mastermind, "You feel everything fading away...")
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index 4485d7a5d8..083a1f9c6c 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -67,7 +67,7 @@
if(affected_mob.mind)
affected_mob.mind.transfer_to(new_mob)
else
- affected_mob.transfer_key(new_mob)
+ affected_mob.transfer_ckey(new_mob)
new_mob.name = affected_mob.real_name
new_mob.real_name = new_mob.name
@@ -82,7 +82,7 @@
to_chat(affected_mob, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(affected_mob)]) to replace a jobbaned player.")
affected_mob.ghostize(0)
- C.transfer_key(affected_mob)
+ C.transfer_ckey(affected_mob)
else
to_chat(new_mob, "Your mob has been claimed by death! Appeal your job ban if you want to avoid this in the future!")
new_mob.death()
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 07414a3362..bf429efa9a 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -21,7 +21,7 @@
- When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting
a ghost to become a xeno during an event), use this mob proc.
- mob.transfer_key(new_mob)
+ mob.transfer_ckey(new_mob)
The Login proc will handle making a new mind for that mobtype (including setting up stuff like mind.name). Simple!
However if you want that mind to have any special properties like being a traitor etc you will have to do that
diff --git a/code/game/machinery/exp_cloner.dm b/code/game/machinery/exp_cloner.dm
index 2bcbd02cf2..4116e18f59 100644
--- a/code/game/machinery/exp_cloner.dm
+++ b/code/game/machinery/exp_cloner.dm
@@ -52,7 +52,7 @@
var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone?", null, null, null, 100, H)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(H)
+ C.transfer_ckey(H)
if(grab_ghost_when == CLONER_FRESH_CLONE)
H.grab_ghost()
diff --git a/code/modules/admin/fun_balloon.dm b/code/modules/admin/fun_balloon.dm
index 281fb49f05..81050e6eae 100644
--- a/code/modules/admin/fun_balloon.dm
+++ b/code/modules/admin/fun_balloon.dm
@@ -61,7 +61,7 @@
to_chat(body, "Your mob has been taken over by a ghost!")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(body)])")
body.ghostize(0)
- C.transfer_key(body)
+ C.transfer_ckey(body)
new /obj/effect/temp_visual/gravpush(get_turf(body))
/obj/effect/fun_balloon/sentience/emergency_shuttle
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index db6a5b9e88..af709da34d 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -744,7 +744,7 @@
var/mob/chosen = players[1]
if (chosen.client)
chosen.client.prefs.copy_to(spawnedMob)
- chosen.transfer_key(spawnedMob)
+ chosen.transfer_ckey(spawnedMob)
players -= chosen
if (ishuman(spawnedMob) && ispath(humanoutfit, /datum/outfit))
var/mob/living/carbon/human/H = spawnedMob
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 5409934abf..09a8f692d8 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -412,7 +412,7 @@
//Spawn the body
var/mob/living/carbon/human/ERTOperative = new ertemplate.mobtype(spawnloc)
chosen_candidate.client.prefs.copy_to(ERTOperative)
- chosen_candidate.transfer_key(ERTOperative)
+ chosen_candidate.transfer_ckey(ERTOperative)
if(ertemplate.enforce_human || ERTOperative.dna.species.dangerous_existence) // Don't want any exploding plasmemes
ERTOperative.set_species(/datum/species/human)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index bbeb6a963e..3f46e88920 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -384,7 +384,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Now to give them their mind back.
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
- G_found.transfer_key(new_xeno, FALSE)
+ G_found.transfer_ckey(new_xeno, FALSE)
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.")
var/msg = "[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno."
message_admins(msg)
@@ -397,7 +397,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/mob/living/carbon/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
- G_found.transfer_key(new_monkey, FALSE)
+ G_found.transfer_ckey(new_monkey, FALSE)
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
var/msg = "[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno."
message_admins(msg)
@@ -437,7 +437,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!new_character.mind.assigned_role)
new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role.
- G_found.transfer_key(new_character, FALSE)
+ G_found.transfer_ckey(new_character, FALSE)
/*
The code below functions with the assumption that the mob is already a traitor if they have a special role.
diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm
index 8d7d5395a4..42719e28bd 100644
--- a/code/modules/antagonists/_common/antag_datum.dm
+++ b/code/modules/antagonists/_common/antag_datum.dm
@@ -87,7 +87,7 @@ GLOBAL_LIST_EMPTY(antagonists)
to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
owner.current.ghostize(0)
- C.transfer_key(owner.current, FALSE)
+ C.transfer_ckey(owner.current, FALSE)
/datum/antagonist/proc/on_removal()
remove_innate_effects()
diff --git a/code/modules/antagonists/blob/blob/powers.dm b/code/modules/antagonists/blob/blob/powers.dm
index b4affefb29..e49d186362 100644
--- a/code/modules/antagonists/blob/blob/powers.dm
+++ b/code/modules/antagonists/blob/blob/powers.dm
@@ -172,7 +172,7 @@
blobber.adjustHealth(blobber.maxHealth * 0.5)
blob_mobs += blobber
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(blobber)
+ C.transfer_ckey(blobber)
SEND_SOUND(blobber, sound('sound/effects/blobattack.ogg'))
SEND_SOUND(blobber, sound('sound/effects/attackblob.ogg'))
to_chat(blobber, "You are a blobbernaut!")
diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
index efcc8089ef..2018067b77 100644
--- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
@@ -349,7 +349,7 @@
to_chat(L, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
L.ghostize(0)
- C.transfer_key(L, FALSE)
+ C.transfer_ckey(L, FALSE)
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
animate(V, alpha = 0, transform = matrix()*2, time = 8)
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
diff --git a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm
index aac545c366..2553b555e1 100644
--- a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm
+++ b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm
@@ -54,7 +54,7 @@
pre_spawn()
visible_message(creation_message)
var/mob/living/construct = new construct_type(get_turf(src))
- user.transfer_key(construct, FALSE)
+ user.transfer_ckey(construct, FALSE)
post_spawn(construct)
qdel(user)
qdel(src)
diff --git a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
index bb17254931..e3669bdcf9 100644
--- a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
@@ -64,7 +64,7 @@
message_admins("Admin [key_name_admin(user)] directly became the Eminence of the cult!")
log_admin("Admin [key_name(user)] made themselves the Eminence.")
var/mob/camera/eminence/eminence = new(get_turf(src))
- eminence.key = user.transfer_key(eminence, FALSE)
+ eminence.key = user.transfer_ckey(eminence, FALSE)
hierophant_message("Ratvar has directly assigned the Eminence!")
for(var/mob/M in servants_and_ghosts())
M.playsound_local(M, 'sound/machines/clockcult/eminence_selected.ogg', 50, FALSE)
@@ -138,7 +138,7 @@
playsound(src, 'sound/machines/clockcult/ark_damage.ogg', 50, FALSE)
var/mob/camera/eminence/eminence = new(get_turf(src))
eminence_nominee = pick(candidates)
- eminence_nominee.transfer_key(eminence)
+ eminence_nominee.transfer_ckey(eminence)
hierophant_message("A ghost has ascended into the Eminence!")
for(var/mob/M in servants_and_ghosts())
M.playsound_local(M, 'sound/machines/clockcult/eminence_selected.ogg', 50, FALSE)
diff --git a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
index 21ece44212..c17885315f 100644
--- a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
@@ -45,7 +45,7 @@
return FALSE
var/mob/living/simple_animal/drone/cogscarab/ratvar/R = new/mob/living/simple_animal/drone/cogscarab/ratvar(get_turf(src))
R.visible_message("[R] forms, and its eyes blink open, glowing bright red!")
- O.transfer_key(R, FALSE)
+ O.transfer_ckey(R, FALSE)
/obj/structure/destructible/clockwork/massive/ratvar/Bump(atom/A)
var/turf/T = get_turf(A)
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index c48257a54e..7619f489ce 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -595,7 +595,7 @@ structure_check() searches for nearby cultist structures required for the invoca
to_chat(mob_to_revive.mind, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form.")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.")
mob_to_revive.ghostize(0)
- C.transfer_key(mob_to_revive, FALSE)
+ C.transfer_ckey(mob_to_revive, FALSE)
else
fail_invoke()
return
@@ -890,7 +890,7 @@ structure_check() searches for nearby cultist structures required for the invoca
visible_message("A cloud of red mist forms above [src], and from within steps... a [new_human.gender == FEMALE ? "wo":""]man.")
to_chat(user, "Your blood begins flowing into [src]. You must remain in place and conscious to maintain the forms of those summoned. This will hurt you slowly but surely...")
var/obj/structure/emergency_shield/invoker/N = new(T)
- ghost_to_spawn.transfer_key(new_human, FALSE)
+ ghost_to_spawn.transfer_ckey(new_human, FALSE)
SSticker.mode.add_cultist(new_human.mind, 0)
to_chat(new_human, "You are a servant of the Geometer. You have been made semi-corporeal by the cult of Nar'Sie, and you are to serve them at all costs.")
diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm
index 8d938439de..afe439f02c 100644
--- a/code/modules/antagonists/devil/true_devil/_true_devil.dm
+++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm
@@ -146,7 +146,7 @@
/mob/living/carbon/true_devil/attack_ghost(mob/dead/observer/user as mob)
if(ascended || user.mind.soulOwner == src.mind)
var/mob/living/simple_animal/imp/S = new(get_turf(loc))
- user.transfer_key(S, FALSE)
+ user.transfer_ckey(S, FALSE)
S.mind.assigned_role = "Imp"
S.mind.special_role = "Imp"
var/datum/objective/newobjective = new
diff --git a/code/modules/antagonists/disease/disease_event.dm b/code/modules/antagonists/disease/disease_event.dm
index da58787fe9..385cee998b 100644
--- a/code/modules/antagonists/disease/disease_event.dm
+++ b/code/modules/antagonists/disease/disease_event.dm
@@ -18,7 +18,7 @@
var/mob/dead/observer/selected = pick_n_take(candidates)
var/mob/camera/disease/virus = new /mob/camera/disease(SSmapping.get_station_center())
- selected.transfer_key(virus, FALSE)
+ selected.transfer_ckey(virus, FALSE)
INVOKE_ASYNC(virus, /mob/camera/disease/proc/pick_name)
message_admins("[ADMIN_LOOKUPFLW(virus)] has been made into a sentient disease by an event.")
log_game("[key_name(virus)] was spawned as a sentient disease by an event.")
diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm
index 50b8851d3d..f380fa68e9 100644
--- a/code/modules/antagonists/revenant/revenant.dm
+++ b/code/modules/antagonists/revenant/revenant.dm
@@ -384,7 +384,7 @@
if(old_key)
for(var/mob/M in GLOB.dead_mob_list)
if(M.client && M.client.key == old_key) //Only recreates the mob if the mob the client is in is dead
- M.transfer_key(revenant.key, FALSE)
+ M.transfer_ckey(revenant.key, FALSE)
key_of_revenant = TRUE
break
if(!key_of_revenant)
@@ -397,7 +397,7 @@
visible_message("[src] settles down and seems lifeless.")
return
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(revenant.key, FALSE)
+ C.transfer_ckey(revenant.key, FALSE)
if(!revenant.key)
qdel(revenant)
message_admins("No ckey was found for the new revenant. Oh well!")
diff --git a/code/modules/antagonists/revenant/revenant_spawn_event.dm b/code/modules/antagonists/revenant/revenant_spawn_event.dm
index 4ab2bcb30a..cb534b6613 100644
--- a/code/modules/antagonists/revenant/revenant_spawn_event.dm
+++ b/code/modules/antagonists/revenant/revenant_spawn_event.dm
@@ -52,7 +52,7 @@
return MAP_ERROR
var/mob/living/simple_animal/revenant/revvie = new(pick(spawn_locs))
- selected.transfer_key(revvie, FALSE)
+ selected.transfer_ckey(revvie, FALSE)
message_admins("[ADMIN_LOOKUPFLW(revvie)] has been made into a revenant by an event.")
log_game("[key_name(revvie)] was spawned as a revenant by an event.")
spawned_mobs += revvie
diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm
index 3df561799e..1df8e43316 100644
--- a/code/modules/antagonists/wizard/equipment/soulstone.dm
+++ b/code/modules/antagonists/wizard/equipment/soulstone.dm
@@ -218,7 +218,7 @@
newstruct.master = stoner
var/datum/action/innate/seek_master/SM = new()
SM.Grant(newstruct)
- target.transfer_key(newstruct)
+ target.transfer_ckey(newstruct)
var/obj/screen/alert/bloodsense/BS
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker && SSticker.mode)
SSticker.mode.add_cultist(newstruct.mind, 0)
@@ -243,7 +243,7 @@
S.canmove = FALSE//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
- T.transfer_key(S)
+ T.transfer_ckey(S)
S.language_holder = U.language_holder.copy(S)
if(U)
S.faction |= "[REF(U)]" //Add the master as a faction, allowing inter-mob cooperation
diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm
index 310699576c..f5b5ff9c8f 100644
--- a/code/modules/awaymissions/mission_code/Academy.dm
+++ b/code/modules/awaymissions/mission_code/Academy.dm
@@ -133,7 +133,7 @@
var/mob/dead/observer/C = pick(candidates)
message_admins("[ADMIN_LOOKUPFLW(C)] was spawned as Wizard Academy Defender")
current_wizard.ghostize() // on the off chance braindead defender gets back in
- C.transfer_key(current_wizard, FALSE)
+ C.transfer_ckey(current_wizard, FALSE)
/obj/structure/academy_wizard_spawner/proc/summon_wizard()
var/turf/T = src.loc
@@ -274,7 +274,7 @@
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
message_admins("[ADMIN_LOOKUPFLW(C)] was spawned as Dice Servant")
- C.transfer_key(H, FALSE)
+ C.transfer_ckey(H, FALSE)
var/obj/effect/proc_holder/spell/targeted/summonmob/S = new
S.target_mob = H
diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm
index 261d1fc774..5f9873c387 100644
--- a/code/modules/events/holiday/xmas.dm
+++ b/code/modules/events/holiday/xmas.dm
@@ -77,7 +77,7 @@
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
santa = new /mob/living/carbon/human(pick(GLOB.blobstart))
- C.transfer_key(santa, FALSE)
+ C.transfer_ckey(santa, FALSE)
santa.equipOutfit(/datum/outfit/santa)
santa.update_icons()
diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm
index 49ca828d35..96b6cded58 100644
--- a/code/modules/events/sentience.dm
+++ b/code/modules/events/sentience.dm
@@ -48,7 +48,7 @@
spawned_animals++
- SG.transfer_key(SA, FALSE)
+ SG.transfer_ckey(SA, FALSE)
SA.grant_all_languages(TRUE)
diff --git a/code/modules/events/wizard/imposter.dm b/code/modules/events/wizard/imposter.dm
index 550cce0217..29704168e9 100644
--- a/code/modules/events/wizard/imposter.dm
+++ b/code/modules/events/wizard/imposter.dm
@@ -23,7 +23,7 @@
I.name = I.dna.real_name
I.updateappearance(mutcolor_update=1)
I.domutcheck()
- C.transfer_key(I, FALSE)
+ C.transfer_ckey(I, FALSE)
var/datum/antagonist/wizard/master = M.has_antag_datum(/datum/antagonist/wizard)
if(!master.wiz_team)
master.create_wiz_team()
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index 463fb6f8ac..9e67cea61e 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -285,7 +285,7 @@
else
to_chat(src, "Teleporting failed. Ahelp an admin please")
stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised")
- transfer_key(observer, FALSE)
+ transfer_ckey(observer, FALSE)
observer.client = client
observer.set_ghost_appearance()
if(observer.client && observer.client.prefs)
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 21c97e33c5..d599d55886 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -268,7 +268,7 @@ Works together with spawning an observer, noted above.
SStgui.on_transfer(src, ghost) // Transfer NanoUIs.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.can_reenter_round = (can_reenter_corpse && !suiciding)
- transfer_key(ghost, FALSE)
+ transfer_ckey(ghost, FALSE)
return ghost
/*
@@ -354,7 +354,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
client.change_view(CONFIG_GET(string/default_view))
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
- transfer_key(mind.current, FALSE)
+ transfer_ckey(mind.current, FALSE)
return 1
/mob/dead/observer/proc/notify_cloning(var/message, var/sound, var/atom/source, flashwindow = TRUE)
@@ -634,7 +634,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, "Someone has taken this body while you were choosing!")
return 0
- transfer_key(target, FALSE)
+ transfer_ckey(target, FALSE)
target.faction = list("neutral")
return 1
diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm
index 99f2f40b04..8c335a9e8c 100644
--- a/code/modules/mob/death.dm
+++ b/code/modules/mob/death.dm
@@ -11,6 +11,4 @@
/mob/proc/death(gibbed)
SEND_SIGNAL(src, COMSIG_MOB_DEATH, gibbed)
- if(!QDELETED(inception) && inception.parent)
- inception.virtual_reality_in_a_virtual_reality(null, src, TRUE)
return
\ No newline at end of file
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index 1ca6b2fed9..baacc68d1b 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -34,7 +34,7 @@
if(brainmob.mind)
brainmob.mind.transfer_to(C)
else
- brainmob.transfer_key(C)
+ brainmob.transfer_ckey(C)
QDEL_NULL(brainmob)
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index 2bdbf2515b..86f1c85d8a 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -86,7 +86,7 @@
var/atom/xeno_loc = get_turf(owner)
var/mob/living/carbon/alien/larva/new_xeno = new(xeno_loc)
- ghost.transfer_key(new_xeno, FALSE)
+ ghost.transfer_ckey(new_xeno, FALSE)
SEND_SOUND(new_xeno, sound('sound/voice/hiss5.ogg',0,0,0,100)) //To get the player's attention
new_xeno.canmove = 0 //so we don't move during the bursting animation
new_xeno.notransform = 1
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index fad29d5146..30b085fa61 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -281,7 +281,7 @@
var/datum/disease/D = thing
if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)
ContactContractDisease(D)
-
+
if(iscarbon(L))
var/mob/living/carbon/C = L
if(HAS_TRAIT(src, TRAIT_STRONG_GRABBER))
@@ -883,7 +883,7 @@
if(mind)
mind.transfer_to(new_mob)
else
- transfer_key(new_mob)
+ transfer_ckey(new_mob)
for(var/para in hasparasites())
var/mob/living/simple_animal/hostile/guardian/G = para
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 0f1e65dc33..0f8687397d 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -192,7 +192,7 @@
/mob/proc/makePAI(delold)
var/obj/item/paicard/card = new /obj/item/paicard(get_turf(src))
var/mob/living/silicon/pai/pai = new /mob/living/silicon/pai(card)
- transfer_key(pai)
+ transfer_ckey(pai)
pai.name = name
card.setPersonality(pai)
if(delold)
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 5fbd92c11a..d0495d704a 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -916,7 +916,7 @@ Pass a positive integer as an argument to override a bot's default speed.
if(mind && paicard.pai)
mind.transfer_to(paicard.pai)
else if(paicard.pai)
- transfer_key(paicard.pai)
+ transfer_ckey(paicard.pai)
else
ghostize(0) // The pAI card that just got ejected was dead.
key = null
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index 71d4eddb27..5b7b40f290 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -159,7 +159,7 @@
if(mind)
mind.transfer_to(R, 1)
else
- transfer_key(R)
+ transfer_ckey(R)
qdel(src)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm
index 3717d6538e..e54b21724d 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm
@@ -61,5 +61,5 @@
var/obj/item/new_hat = new hat_type(D)
D.equip_to_slot_or_del(new_hat, SLOT_HEAD)
D.flags_1 |= (flags_1 & ADMIN_SPAWNED_1)
- user.transfer_key(D, FALSE)
+ user.transfer_ckey(D, FALSE)
qdel(src)
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index 5e604cb92e..21bbabbaa0 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -428,7 +428,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(G)])")
G.ghostize(FALSE)
G.setthemename(G.namedatum.theme) //give it a new color, to show it's a new person
- C.transfer_key(G)
+ C.transfer_ckey(G)
G.reset = 1
switch(G.namedatum.theme)
if("tech")
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index bc644ba9ec..f5b1706f87 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -90,7 +90,7 @@
if(key)
to_chat(user, "Someone else already took this spider.")
return 1
- user.transfer_key(src, FALSE)
+ user.transfer_ckey(src, FALSE)
return 1
//nursemaids - these create webs and eggs
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index d3be3a0fbf..487e44966d 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -585,7 +585,7 @@ Difficulty: Very Hard
var/be_helper = alert("Become a Lightgeist? (Warning, You can no longer be cloned!)",,"Yes","No")
if(be_helper == "Yes" && !QDELETED(src) && isobserver(user))
var/mob/living/simple_animal/hostile/lightgeist/W = new /mob/living/simple_animal/hostile/lightgeist(get_turf(loc))
- user.transfer_key(W, FALSE)
+ user.transfer_ckey(W, FALSE)
/obj/machinery/anomalous_crystal/helpers/Topic(href, href_list)
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 25b9314fb1..de5403254b 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -920,7 +920,7 @@
if(mind)
mind.transfer_to(G)
else
- transfer_key(G)
+ transfer_ckey(G)
..(gibbed)
/mob/living/simple_animal/parrot/Poly/proc/Read_Memory()
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index 48d9e65717..f1e45f4827 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -174,7 +174,7 @@
if(src.mind)
src.mind.transfer_to(new_slime)
else
- transfer_key(new_slime)
+ transfer_ckey(new_slime)
qdel(src)
else
to_chat(src, "I am not ready to reproduce yet...")
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 9207e6f26d..7667d9bbff 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -12,8 +12,6 @@
var/mob/dead/observe = M
observe.reset_perspective(null)
qdel(hud_used)
- if(!QDELETED(inception) && inception.parent)
- inception.virtual_reality_in_a_virtual_reality(null, src, TRUE)
for(var/cc in client_colours)
qdel(cc)
client_colours = null
@@ -438,10 +436,13 @@
// M.Login() //wat
return
-/mob/proc/transfer_key(mob/new_mob, send_signal = TRUE)
+/mob/proc/transfer_ckey(mob/new_mob, send_signal = TRUE)
+ if(!ckey)
+ return FALSE
if(send_signal)
SEND_SIGNAL(src, COMSIG_MOB_KEY_CHANGE, new_mob, src)
- new_mob.key = key
+ new_mob.ckey = ckey
+ return TRUE
/mob/verb/cancel_camera()
set name = "Cancel Camera View"
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 357ca6bbaf..a0126f5fdd 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -112,5 +112,3 @@
var/registered_z
var/mob/audiovisual_redirect //Mob to redirect messages, speech, and sounds to
-
- var/datum/component/virtual_reality/inception //The component works on a very fragile link betwixt mind, ckey and death. Apologises for this snowflake mind game.
\ No newline at end of file
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 8b26660cbb..5519c9be95 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -430,7 +430,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
to_chat(M, "Your mob has been taken over by a ghost!")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(M)])")
M.ghostize(FALSE, TRUE)
- C.transfer_key(M, FALSE)
+ C.transfer_ckey(M, FALSE)
return TRUE
else
to_chat(M, "There were no ghosts willing to take control.")
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index 11ff21b28a..a11e7a228e 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -53,7 +53,7 @@
if(mind && isliving(M))
mind.transfer_to(M, 1) // second argument to force key move to new mob
else
- transfer_key(M)
+ transfer_ckey(M)
if(delete_old_mob)
QDEL_IN(src, 1)
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index c46e383cbf..5ce5ed8e04 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -382,7 +382,7 @@
mind.active = FALSE
mind.transfer_to(R)
else if(transfer_after)
- transfer_key(R)
+ transfer_ckey(R)
R.apply_pref_name("cyborg")
@@ -428,7 +428,7 @@
if(mind && mind_transfer)
mind.transfer_to(new_xeno)
else
- transfer_key(new_xeno)
+ transfer_ckey(new_xeno)
to_chat(new_xeno, "You are now an alien.")
. = new_xeno
@@ -463,7 +463,7 @@
if(mind && mind_transfer)
mind.transfer_to(new_slime)
else
- transfer_key(new_slime)
+ transfer_ckey(new_slime)
to_chat(new_slime, "You are now a slime. Skreee!")
. = new_slime
@@ -474,7 +474,7 @@
if(mind && mind_transfer)
mind.transfer_to(B)
else
- transfer_key(B)
+ transfer_ckey(B)
. = B
qdel(src)
@@ -497,7 +497,7 @@
if(mind && mind_transfer)
mind.transfer_to(new_corgi)
else
- transfer_key(new_corgi)
+ transfer_ckey(new_corgi)
to_chat(new_corgi, "You are now a Corgi. Yap Yap!")
. = new_corgi
@@ -524,7 +524,7 @@
if(mind && mind_transfer)
mind.transfer_to(new_gorilla)
else
- transfer_key(new_gorilla)
+ transfer_ckey(new_gorilla)
to_chat(new_gorilla, "You are now a gorilla. Ooga ooga!")
. = new_gorilla
qdel(src)
@@ -556,7 +556,7 @@
if(mind && mind_transfer)
mind.transfer_to(new_mob)
else
- transfer_key(new_mob)
+ transfer_ckey(new_mob)
new_mob.a_intent = INTENT_HARM
@@ -578,7 +578,7 @@
if(mind && mind_transfer)
mind.transfer_to(new_mob)
else
- transfer_key(new_mob)
+ transfer_ckey(new_mob)
new_mob.a_intent = INTENT_HARM
to_chat(new_mob, "You feel more... animalistic")
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index db460ad72b..ae64c367a9 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -674,7 +674,7 @@
var/list/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_SENTIENCE, null, ROLE_SENTIENCE, 50, SM, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
- C.transfer_key(SM, FALSE)
+ C.transfer_ckey(SM, FALSE)
SM.mind.enslave_mind_to_creator(user)
SM.sentience_act()
to_chat(SM, "All at once it makes sense: you know what you are and who you are! Self awareness is yours!")
diff --git a/code/modules/spells/spell_types/mind_transfer.dm b/code/modules/spells/spell_types/mind_transfer.dm
index a5e6ed202a..107f303049 100644
--- a/code/modules/spells/spell_types/mind_transfer.dm
+++ b/code/modules/spells/spell_types/mind_transfer.dm
@@ -75,7 +75,7 @@ Also, you never added distance checking after target is selected. I've went ahea
ghost.mind.transfer_to(caster)
if(ghost.key)
- ghost.transfer_key(caster) //have to transfer the key since the mind was not active
+ ghost.transfer_ckey(caster) //have to transfer the key since the mind was not active
qdel(ghost)
//MIND TRANSFER END
diff --git a/modular_citadel/code/modules/mob/living/simple_animal/banana_spider.dm b/modular_citadel/code/modules/mob/living/simple_animal/banana_spider.dm
index 6b15065095..fdc271a158 100644
--- a/modular_citadel/code/modules/mob/living/simple_animal/banana_spider.dm
+++ b/modular_citadel/code/modules/mob/living/simple_animal/banana_spider.dm
@@ -98,7 +98,7 @@
if(be_spider == "No" || QDELETED(src) || !isobserver(user))
return
sentience_act()
- user.transfer_key(src, FALSE)
+ user.transfer_ckey(src, FALSE)
density = TRUE
/mob/living/simple_animal/banana_spider/ComponentInitialize()