/mob/Logout() SEND_SIGNAL(src, COMSIG_MOB_LOGOUT) log_message("[key_name(src)] is no longer owning mob [src]([src.type])", LOG_OWNERSHIP) SStgui.on_logout(src) unset_machine() remove_from_player_list() if(client?.movingmob) //In the case the client was transferred to another mob and not deleted. client.movingmob.client_mobs_in_contents -= src UNSETEMPTY(client.movingmob.client_mobs_in_contents) client.movingmob = null ..() if(loc) loc.on_log(FALSE) if(client) for(var/foo in client.player_details.post_logout_callbacks) var/datum/callback/CB = foo CB.Invoke() return TRUE