Moving the snowflake mob var to the component and finalizing.

This commit is contained in:
Ghommie
2019-07-04 02:03:51 +02:00
parent 8004165599
commit a3ab5f6d23
51 changed files with 92 additions and 93 deletions
@@ -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)
+3 -3
View File
@@ -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
-2
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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>")
+5 -4
View File
@@ -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"
-2
View File
@@ -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.
+1 -1
View File
@@ -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)
+8 -8
View File
@@ -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")