diff --git a/code/modules/mob/dead/observer/login.dm b/code/modules/mob/dead/observer/login.dm index 4abb92aa80c..444cae89444 100644 --- a/code/modules/mob/dead/observer/login.dm +++ b/code/modules/mob/dead/observer/login.dm @@ -1,10 +1,2 @@ /mob/dead/observer/Login() - ..() - - src.client.screen = null - - if (!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - - return \ No newline at end of file + return ..() \ No newline at end of file diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index be94de03038..9f71ee13c6d 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -31,9 +31,6 @@ Works together with spawning an observer, noted above. /mob/proc/ghostize(var/transfer_mind = 0) if(key) var/mob/dead/observer/ghost = new(src,transfer_mind) //Transfer safety to observer spawning proc. - if(client) - client.images.len = null //remove the images such as AIs being unable to see runes - client.screen.len = null //remove hud items just in case ghost.attack_log = attack_log //preserve our attack logs by copying them to our ghost if(transfer_mind && mind) //When a body is destroyed attempt to transfer their mind mind.transfer_to(ghost) diff --git a/code/modules/mob/living/carbon/alien/larva/login.dm b/code/modules/mob/living/carbon/alien/larva/login.dm index 5c2d6817cfc..33808a4d966 100644 --- a/code/modules/mob/living/carbon/alien/larva/login.dm +++ b/code/modules/mob/living/carbon/alien/larva/login.dm @@ -1,6 +1,3 @@ /mob/living/carbon/alien/larva/Login() - ..() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE - return + return ..() + diff --git a/code/modules/mob/living/carbon/brain/login.dm b/code/modules/mob/living/carbon/brain/login.dm index 4b1749add26..84bccdfe964 100644 --- a/code/modules/mob/living/carbon/brain/login.dm +++ b/code/modules/mob/living/carbon/brain/login.dm @@ -1,6 +1,2 @@ /mob/living/carbon/brain/Login() - ..() - if (!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE - return \ No newline at end of file + return ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index eb027d309c8..7877b6f6072 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -1,7 +1,4 @@ /mob/living/carbon/human/Login() ..() update_hud() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE return diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 876f130f6db..a2d931e5836 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -356,15 +356,14 @@ Please contact me on #coderbus IRC. ~Carn x var/image/lying = image("icon_state" = "[t_color]_l") var/image/standing = image("icon_state" = "[t_color]_s") - if( (FAT in mutations) ) + if(FAT in mutations) if(w_uniform.flags&ONESIZEFITSALL) lying.icon = 'uniform_fat.dmi' standing.icon = 'uniform_fat.dmi' else src << "\red You burst out of \the [w_uniform]!" drop_from_inventory(w_uniform) - lying = null - standing = null + return else lying.icon = 'uniform.dmi' standing.icon = 'uniform.dmi' diff --git a/code/modules/mob/living/carbon/metroid/login.dm b/code/modules/mob/living/carbon/metroid/login.dm index fc88bb4e082..7e996f15c6b 100644 --- a/code/modules/mob/living/carbon/metroid/login.dm +++ b/code/modules/mob/living/carbon/metroid/login.dm @@ -1,7 +1,4 @@ /mob/living/carbon/metroid/Login() ..() update_hud() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE return diff --git a/code/modules/mob/living/carbon/monkey/login.dm b/code/modules/mob/living/carbon/monkey/login.dm index 8c5e05c439a..3b7e5dcb971 100644 --- a/code/modules/mob/living/carbon/monkey/login.dm +++ b/code/modules/mob/living/carbon/monkey/login.dm @@ -1,7 +1,4 @@ /mob/living/carbon/monkey/Login() ..() update_hud() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE return diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm index 0a176cf1a2a..25456781936 100644 --- a/code/modules/mob/living/silicon/ai/login.dm +++ b/code/modules/mob/living/silicon/ai/login.dm @@ -1,11 +1,9 @@ /mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up ¬_¬ ~Carn - client.screen.len = 0 - client.images.len = 0 + ..() for(var/obj/effect/rune/rune in world) var/image/blood = image(loc = rune) blood.override = 1 client.images += blood - ..() regenerate_icons() flash = new /obj/screen( null ) flash.icon_state = "blank" @@ -18,9 +16,7 @@ blind.screen_loc = "1,1 to 15,15" blind.layer = 0 client.screen += list( blind, flash ) - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE + if(stat != DEAD) for(var/obj/machinery/ai_status_display/O in world) //change status if(O) diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index 60a76574663..c43eaa6ecda 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -12,6 +12,6 @@ //New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here. //Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak - del(mind) - if(key) ghostize(0) + if(mind) del(mind) + ghostize(0) del(src) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 23a019099b3..218e843708b 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -2,9 +2,6 @@ ..() regenerate_icons() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE if(real_name == "Cyborg") ident = rand(1, 999) real_name += " " diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ecaf788eeff..578903c8b5b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -58,25 +58,27 @@ //Improved /N /mob/living/silicon/robot/Del() if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. - mmi.loc = get_turf(loc)//To hopefully prevent run time errors. + var/turf/T = get_turf(loc)//To hopefully prevent run time errors. + if(T) + mmi.loc = T - if(!key) - for(var/mob/dead/observer/ghost in world) - if(ghost.corpse == src && ghost.client) - ghost.client.mob = ghost.corpse + if(!key) //if we don't have an associated key, try to find the ghost of this body + for(var/mob/dead/observer/ghost in world) + if(ghost.corpse == src && ghost.client) + ghost.client.mob = ghost.corpse - if(key)//If there is a client attached to host. - if(client) - client.screen.len = null - if(mind)//If the cyborg has a mind. It should if it's a player. May not. - mind.transfer_to(mmi.brainmob) - else if(!mmi.brainmob.mind)//If the brainmob has no mind and neither does the cyborg. Shouldn't happen but can due to admun canspiraucy. - mmi.brainmob.mind = new()//Quick mind initialize - mmi.brainmob.mind.current = mmi.brainmob - mmi.brainmob.mind.assigned_role = "Assistant"//Default to an assistant. - mmi.brainmob.key = key - else//If the brain does have a mind. Also shouldn't happen but who knows. - mmi.brainmob.key = key + if(key)//If there is a client attached to host. + if(client) + client.screen.len = null + if(mind)//If the cyborg has a mind. It should if it's a player. May not. + mind.transfer_to(mmi.brainmob) + else if(!mmi.brainmob.mind)//If the brainmob has no mind and neither does the cyborg. Shouldn't happen but can due to admun canspiraucy. + mmi.brainmob.mind = new()//Quick mind initialize + mmi.brainmob.mind.current = mmi.brainmob + mmi.brainmob.mind.assigned_role = "Assistant"//Default to an assistant. + mmi.brainmob.key = key + else//If the brain does have a mind. Also shouldn't happen but who knows. + mmi.brainmob.key = key mmi = null ..() diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 5d55ee62c7f..22921fa7e12 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -24,14 +24,22 @@ /mob/Login() update_Login_details() - if(!src.dna) src.dna = new /datum/dna(null) world.update_status() - if(!src.hud_used) - src.hud_used = new/obj/hud( src ) - else - del(src.hud_used) - src.hud_used = new/obj/hud( src ) + client.images = null //remove the images such as AIs being unable to see runes + client.screen = null //remove hud items just in case + if(!dna) dna = new /datum/dna(null) + if(hud_used) del(hud_used) + hud_used = new/obj/hud( src ) - src.next_move = 1 - src.sight |= SEE_SELF + next_move = 1 + sight |= SEE_SELF ..() + + if(loc && !isturf(loc)) + client.eye = loc + client.perspective = EYE_PERSPECTIVE + else + client.eye = src + client.perspective = MOB_PERSPECTIVE + + diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index be8439952f4..aaa33602c61 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -28,19 +28,20 @@ if(watch_locations.len>0) loc = pick(watch_locations) - if(!preferences.savefile_load(src, 0)) - preferences.ShowChoices(src) - if(!client.changes) - changes() - else - var/lastchangelog = length('changelog.html') - if(!client.changes && preferences.lastchangelog!=lastchangelog) - changes() - preferences.lastchangelog = lastchangelog - preferences.savefile_save(src) - spawn(10) + + spawn(60) if(client) + if(!preferences.savefile_load(src, 0)) + preferences.ShowChoices(src) + if(!client.changes) + changes() + else + var/lastchangelog = length('changelog.html') + if(!client.changes && preferences.lastchangelog!=lastchangelog) + changes() + preferences.lastchangelog = lastchangelog + preferences.savefile_save(src) handle_privacy_poll() new_player_panel() //PDA Resource Initialisation =======================================================> diff --git a/tgstation.dme b/tgstation.dme index 1f0fbaa15a8..0f0a428bd53 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -926,7 +926,6 @@ #include "code\modules\mob\update_icons.dm" #include "code\modules\mob\dead\death.dm" #include "code\modules\mob\dead\observer\hud.dm" -#include "code\modules\mob\dead\observer\login.dm" #include "code\modules\mob\dead\observer\observer.dm" #include "code\modules\mob\dead\observer\say.dm" #include "code\modules\mob\living\damage_procs.dm" @@ -960,14 +959,12 @@ #include "code\modules\mob\living\carbon\alien\larva\inventory.dm" #include "code\modules\mob\living\carbon\alien\larva\larva.dm" #include "code\modules\mob\living\carbon\alien\larva\life.dm" -#include "code\modules\mob\living\carbon\alien\larva\login.dm" #include "code\modules\mob\living\carbon\alien\larva\powers.dm" #include "code\modules\mob\living\carbon\alien\larva\update_icons.dm" #include "code\modules\mob\living\carbon\brain\brain.dm" #include "code\modules\mob\living\carbon\brain\death.dm" #include "code\modules\mob\living\carbon\brain\hud.dm" #include "code\modules\mob\living\carbon\brain\life.dm" -#include "code\modules\mob\living\carbon\brain\login.dm" #include "code\modules\mob\living\carbon\brain\MMI.dm" #include "code\modules\mob\living\carbon\brain\say.dm" #include "code\modules\mob\living\carbon\human\death.dm"