mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Ok, part 1 of this huge mind datum fix. I need to run over the next part again because I've made a lot inconsistencies in it. This is sort of all the misc stuff that got tidied up whilst I was trying to get my head around how everything related to eachother.
This part focuses on: -structuring the way silicon mobs initialise upon login (there was some hideous copypasta in Login() and New() which used spawn() to change the order of the calls so it was all jumbled up. I think I've got it sorted now. -Borgs var/real_name was not initialising as "Cyborg". Meaning the name checks were kind of borked. -Ghosts are now deleted at logout if they no longer have a key. This will stop unneeded ghosts being left lying around. It will not delete ghosts with keys assigned (so people can't respawn or anything). Removed all the del(ghost_ref) stuff I could find. Generally movign the key from a ghost should be the last thing you do as the ghost will be deleted by Logout. However I've put it in a spawn() to hopefully avoid coders accisentally using it in a way which causes runtimes. -Fixed clone-plants spawning dud potato-people left, right and centre. They'll now dump seeds if it fails for whatever reason. -Cultist and Rev status are removed at mob/living/silicon/Login() rather than having to be called on a special-case basis everywhere. This may not be necessary when this stuff is finished. -Removed a bunch of : -Commented mob/living/Login() with the rest of the antag-indicator code from cloning.dm and hydroponics.dm for any coders whom feel brave/suicidal to fix the related issues Next on the agenda, replacing mob/var/original_name with datum/mind/var/name to fix the ticker runtimes Then, fixing mind/proc/transfer_to(mob) once and for all. (There are issues with duplicate minds, role updates, inconsistent initialisation etc etc *yawn* There's probably a few obscure bugs in there somewhere. Might want to hold off on the updates for a bit. Coderbus will likely spot them all by the end of the week. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4322 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
/mob/dead/observer/Logout()
|
||||
..()
|
||||
spawn(0)
|
||||
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
|
||||
del(src)
|
||||
@@ -8,28 +8,28 @@
|
||||
|
||||
dead_mob_list += src
|
||||
add_to_mob_list(src)
|
||||
if(body)
|
||||
var/turf/T = get_turf(body) //Where is the body located?
|
||||
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
|
||||
loc = T
|
||||
if(ismob(body))
|
||||
if(body.original_name)
|
||||
original_name = body.original_name
|
||||
else
|
||||
if(body.real_name)
|
||||
original_name = body.real_name
|
||||
else
|
||||
original_name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
var/turf/T
|
||||
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
|
||||
|
||||
if(body.original_name)
|
||||
original_name = body.original_name
|
||||
else
|
||||
if(body.real_name)
|
||||
real_name = body.real_name
|
||||
original_name = body.real_name
|
||||
else
|
||||
real_name = original_name
|
||||
original_name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
|
||||
name = original_name
|
||||
name = original_name
|
||||
|
||||
if(can_reenter_corpse)
|
||||
corpse = body
|
||||
|
||||
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
|
||||
loc = T
|
||||
|
||||
if(can_reenter_corpse)
|
||||
corpse = body
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
@@ -46,7 +46,6 @@ Works together with spawning an observer, noted above.
|
||||
/mob/proc/ghostize(var/can_reenter_corpse = 1)
|
||||
if(key)
|
||||
var/mob/dead/observer/ghost = new(src,can_reenter_corpse) //Transfer safety to observer spawning proc.
|
||||
ghost.attack_log = attack_log //preserve our attack logs by copying them to our ghost
|
||||
ghost.key = key
|
||||
return
|
||||
|
||||
@@ -137,11 +136,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
corpse.ajourn=0
|
||||
if(corpse.key) //makes sure we don't accidentally kick any clients
|
||||
usr << "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>"
|
||||
return
|
||||
return
|
||||
corpse.key = key
|
||||
remove_from_mob_list(src)
|
||||
dead_mob_list -= src
|
||||
del(src)
|
||||
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Ghost"
|
||||
|
||||
Reference in New Issue
Block a user