Files
vgstation13/code/modules/mob/logout.dm
gurfan 12b68b9546 Electric Boogaloo (Take Two) (#31892)
* wall and floor and overlay icons

* HOLY SHIT PLANEMASTERS ARE AMAZING <3 LUMMOX

* nevermind shit is fucked i hate byond

* apc hackin tweaks start now

* attack_ai is overridden almost everywhere for zero reason

* more attack_ai shit

* more shit

* FORCEDISABLE pt. 1

* FORCEDISABLE pt 2

* more forcedisable 3

* 3.1

* end of forcedisable

* remove all hackview shit, cleanup

* better apc hacking, lots of fixes, and UI!

* more machine ability, lots of cleanup, radial lock updating, modules and active modules

* movable ui elements

* ADVANCED hologrmas

* more SHIT

* SHUNTSHUNTSHUNT

* fig congflgighgsa

* more testing

* fuck

* commit 2

* holo fixes

* fake APC images!

* lots of stuff

* fixes and cleanup and vomit

* More abilities. AI Control fixes and cleanup

* fixes

* fix

* clear another warning

* remove comment fix numbers

* raise price

* raise price

* fix

* 1 autoborger limit

* remove undocumented change

* handle at bot level

* order of operations

* dont call ert

* decrease

* fix unit test

* icon check please work

* remove unused icons, comment out chem dispenser drain

* comment out firewall, add disable to turrets

* remove unused wall icons

* Sort mob list, humans appear at the top

* fix sorting, fix hologram bug

* hologram tweaks, stupid fucking alert APC name

* qdel

* raise ever so slightly

* revert

* Delete broken_hand_icons.txt

* Update setup.dm

* Create setup.dm

* attack_self

* fix filter icon, delete unused file, remove forcedisable from magtape deck

* accidental change

* mousedropfrom recharge station

* oh rite

* fixo

* remove useless code

* aaahhh

* remove rig meal, made obsolete by emag

* fffffshhhhhhwooooop

* typo!
2022-01-31 18:18:06 -06:00

63 lines
2.0 KiB
Plaintext

/mob/Logout()
SStgui.on_logout(src)
nanomanager.close_user_uis(src)
if (isobj(loc))
var/obj/location = loc
location.on_logout(src)
if((flags & HEAR) && !(flags & HEAR_ALWAYS))
if(virtualhearer)
qdel(virtualhearer)
virtualhearer = null
world.log << "[src] logout"
remove_spell_channeling() //remove spell channeling before we log out
nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
player_list -= src
log_access("Logout: [key_name(src)] ([formatLocation(loc)])")
clear_fullscreens(FALSE, 0)
RemoveAllUIs() // Removes mind UIs
if(client)
for(var/datum/radial_menu/R in client.radial_menus)
R.finish()
remove_screen_objs() //Used to remove hud elements
if (src in science_goggles_wearers)
science_goggles_wearers.Remove(src)
if (client)
for (var/obj/item/I in infected_items)
client.images -= I.pathogen
for (var/mob/living/L in infected_contact_mobs)
client.images -= L.pathogen
for (var/obj/effect/pathogen_cloud/C in pathogen_clouds)
client.images -= C.pathogen
for (var/obj/effect/decal/cleanable/C in infected_cleanables)
client.images -= C.pathogen
if(client && client.media)
client.media.stop_music()
if(admin_datums[src.ckey])
message_admins("Admin logout: [key_name(src)]")
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = admins.len
var/admin_number_afk = get_afk_admins()
var/available_admins = admins_number - admin_number_afk
if(available_admins == 0) // Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
send2adminirc("[key_name(src, showantag = FALSE)] logged out - no more non-AFK admins online. - [admin_number_afk] AFK.")
send2admindiscord("[key_name(src, showantag = FALSE)] logged out. **No more non-AFK admins online.** - **[admin_number_afk]** AFK", TRUE)
INVOKE_EVENT(src, /event/logout, "user" = src)
..()