mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-19 20:07:05 +01:00
Login loss prevention v1
This commit is contained in:
@@ -116,6 +116,8 @@ INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
|
||||
/mob/dead/Login()
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
if (isturf(T))
|
||||
update_z(T.z)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/dead/new_player/Login()
|
||||
if(!client)
|
||||
return
|
||||
if(CONFIG_GET(flag/use_exp_tracking))
|
||||
client.set_exp_from_db()
|
||||
client.set_db_player_flags()
|
||||
@@ -7,7 +9,9 @@
|
||||
mind.active = 1
|
||||
mind.current = src
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
|
||||
var/motd = global.config.motd
|
||||
if(motd)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/mob/dead/observer/Login()
|
||||
..()
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
|
||||
ghost_accs = client.prefs.ghost_accs
|
||||
ghost_others = client.prefs.ghost_others
|
||||
|
||||
@@ -360,6 +360,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(mind.current.key && mind.current.key[1] != "@") //makes sure we don't accidentally kick any clients
|
||||
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
|
||||
return
|
||||
if(mind.reEnterCooldown > world.time - 20) //cooldown to avoid body deletion. The server can be slower than players clicking this too fast.
|
||||
to_chat(src, "<span class='warning'>You are doing this too fast. Stay still and try this again in a few seconds.</span>")
|
||||
return
|
||||
mind.reEnterCooldown = world.time
|
||||
client.change_view(CONFIG_GET(string/default_view))
|
||||
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
|
||||
mind.current.key = key
|
||||
|
||||
Reference in New Issue
Block a user