Moving the snowflake mob var to the component and finalizing.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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, "<span class='warning'>You feel like something terrible happened. You try to wake up from this dream, but you can't...</span>")
|
||||
to_chat(M, "<span class='warning'>You feel a dreadful sensation, something terrible happened. You try to wake up, but you find yourself unable to...</span>")
|
||||
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, "<span class='warning'>You feel everything fading away...</span>")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.</span>"
|
||||
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 = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.</span>"
|
||||
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.
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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, "<b>You are a blobbernaut!</b>")
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
to_chat(L, "<span class='userdanger'>Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!</span>")
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
message_admins("<span class='danger'>Admin [key_name_admin(user)] directly became the Eminence of the cult!</span>")
|
||||
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("<span class='bold large_brass'>Ratvar has directly assigned the Eminence!</span>")
|
||||
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("<span class='bold large_brass'>A ghost has ascended into the Eminence!</span>")
|
||||
for(var/mob/M in servants_and_ghosts())
|
||||
M.playsound_local(M, 'sound/machines/clockcult/eminence_selected.ogg', 50, FALSE)
|
||||
|
||||
@@ -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("<span class='heavy_brass'>[R] forms, and its eyes blink open, glowing bright red!</span>")
|
||||
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)
|
||||
|
||||
@@ -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("<span class='warning'>A cloud of red mist forms above [src], and from within steps... a [new_human.gender == FEMALE ? "wo":""]man.</span>")
|
||||
to_chat(user, "<span class='cultitalic'>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...</span>")
|
||||
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, "<span class='cultitalic'><b>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.</b></span>")
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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("<span class='revenwarning'>[src] settles down and seems lifeless.</span>")
|
||||
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!")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
spawned_animals++
|
||||
|
||||
SG.transfer_key(SA, FALSE)
|
||||
SG.transfer_ckey(SA, FALSE)
|
||||
|
||||
SA.grant_all_languages(TRUE)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Teleporting failed. Ahelp an admin please</span>")
|
||||
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)
|
||||
|
||||
@@ -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, "<span class='warning'>Someone has taken this body while you were choosing!</span>")
|
||||
return 0
|
||||
|
||||
transfer_key(target, FALSE)
|
||||
transfer_ckey(target, FALSE)
|
||||
target.faction = list("neutral")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -34,7 +34,7 @@
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.transfer_to(C)
|
||||
else
|
||||
brainmob.transfer_key(C)
|
||||
brainmob.transfer_ckey(C)
|
||||
|
||||
QDEL_NULL(brainmob)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if(mind)
|
||||
mind.transfer_to(R, 1)
|
||||
else
|
||||
transfer_key(R)
|
||||
transfer_ckey(R)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(key)
|
||||
to_chat(user, "<span class='notice'>Someone else already took this spider.</span>")
|
||||
return 1
|
||||
user.transfer_key(src, FALSE)
|
||||
user.transfer_ckey(src, FALSE)
|
||||
return 1
|
||||
|
||||
//nursemaids - these create webs and eggs
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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>I am not ready to reproduce yet...</i>")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
@@ -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.")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<B>You are now an alien.</B>")
|
||||
. = 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, "<B>You are now a slime. Skreee!</B>")
|
||||
. = 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, "<B>You are now a Corgi. Yap Yap!</B>")
|
||||
. = 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, "<B>You are now a gorilla. Ooga ooga!</B>")
|
||||
. = 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")
|
||||
|
||||
|
||||
@@ -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, "<span class='warning'>All at once it makes sense: you know what you are and who you are! Self awareness is yours!</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user