Login loss prevention v1

This commit is contained in:
Archie
2021-09-23 19:37:06 -03:00
parent d0070cdab2
commit d20013cfe4
26 changed files with 92 additions and 29 deletions
@@ -163,7 +163,9 @@ GLOBAL_LIST_EMPTY(blob_nodes)
return ..()
/mob/camera/blob/Login()
..()
. = ..()
if(!. || !client)
return FALSE
to_chat(src, "<span class='notice'>You are the overmind!</span>")
blob_help()
update_health_hud()
@@ -28,7 +28,9 @@
update_values()
/mob/living/simple_animal/hostile/clockwork/Login()
..()
. = ..()
if(!. || !client)
return FALSE
add_servant_of_ratvar(src, TRUE)
to_chat(src, playstyle_string)
if(GLOB.ratvar_approaches)
@@ -53,7 +53,9 @@
return TRUE
/mob/camera/eminence/Login()
..()
. = ..()
if(!. || !client)
return FALSE
add_servant_of_ratvar(src, TRUE)
var/datum/antagonist/clockcult/C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE)
if(C && C.clock_team)
@@ -51,7 +51,9 @@
real_name = name
/mob/living/carbon/true_devil/Login()
..()
. = ..()
if(!. || !client)
return FALSE
var/datum/antagonist/devil/devilinfo = mind.has_antag_datum(/datum/antagonist/devil)
devilinfo.greet()
mind.announce_objectives()
@@ -78,7 +78,9 @@ the new instance inside the host to be updated to the template's stats.
S.overmind = null
/mob/camera/disease/Login()
..()
. = ..()
if(!. || !client)
return FALSE
if(freemove)
to_chat(src, "<span class='warning'>You have [DisplayTimeText(freemove_end - world.time)] to select your first host. Click on a human to select your host.</span>")
@@ -86,7 +86,9 @@
name = built_name
/mob/living/simple_animal/revenant/Login()
..()
. = ..()
if(!. || !client)
return FALSE
to_chat(src, "<span class='deadsay'><span class='big bold'>You are a revenant.</span></span>")
to_chat(src, "<b>Your formerly mundane spirit has been infused with alien energies and empowered into a revenant.</b>")
to_chat(src, "<b>You are not dead, not alive, but somewhere in between. You are capable of limited interaction with both worlds.</b>")
+2
View File
@@ -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)
+5 -1
View File
@@ -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)
+3 -1
View File
@@ -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
@@ -1,4 +1,6 @@
/mob/living/carbon/alien/Login()
..()
. = ..()
if(!. || !client)
return FALSE
AddInfectionImages()
return
@@ -1,5 +1,7 @@
/mob/living/carbon/human/Login()
..()
. = ..()
if(!. || !client)
return FALSE
if(src.martial_art == default_martial_art && mind.stored_martial_art) //If the mind has a martial art stored and the body has the default one.
src.mind.stored_martial_art.teach(src) //Running teach so that it deals with help verbs.
else if(src.martial_art != default_martial_art && src.martial_art != mind.stored_martial_art) //If the body has a martial art which is not the default one and is not stored in the mind.
+3 -1
View File
@@ -1,5 +1,7 @@
/mob/living/Login()
..()
. = ..()
if(!. || !client)
return FALSE
//Mind updates
sync_mind()
mind.show_memory(src, 0)
+3 -1
View File
@@ -1,5 +1,7 @@
/mob/living/silicon/ai/Login()
..()
. = ..()
if(!. || !client)
return FALSE
if(stat != DEAD)
for(var/each in GLOB.ai_status_displays) //change status
var/obj/machinery/status_display/ai/O = each
+1 -1
View File
@@ -7,4 +7,4 @@
var/datum/antagonist/bloodsucker/V = mind.has_antag_datum(/datum/antagonist/bloodsucker)
if(V)
mind.remove_antag_datum(V)
..()
return ..()
+8 -7
View File
@@ -163,14 +163,15 @@
return TRUE
/mob/living/silicon/pai/Login()
..()
. = ..()
if(!. || !client)
return FALSE
usr << browse_rsc('html/paigrid.png') // Go ahead and cache the interface resources as early as possible
if(client)
client.perspective = EYE_PERSPECTIVE
if(holoform)
client.eye = src
else
client.eye = card
client.perspective = EYE_PERSPECTIVE
if(holoform)
client.eye = src
else
client.eye = card
/mob/living/silicon/pai/get_status_tab_items()
. += ..()
@@ -1,5 +1,7 @@
/mob/living/silicon/robot/Login()
..()
. = ..()
if(!. || !client)
return FALSE
regenerate_icons()
show_laws(0)
@@ -957,6 +957,8 @@ Pass a positive integer as an argument to override a bot's default speed.
/mob/living/simple_animal/bot/Login()
. = ..()
if(!. || !client)
return FALSE
access_card.access += player_access
diag_hud_set_botmode()
@@ -64,7 +64,9 @@
CR.button.moved = "6:[pos],4:-2"
/mob/living/simple_animal/hostile/construct/Login()
..()
. = ..()
if(!. || !client)
return FALSE
to_chat(src, playstyle_string)
/mob/living/simple_animal/hostile/construct/examine(mob/user)
@@ -130,7 +130,9 @@
return ..()
/mob/living/simple_animal/drone/Login()
..()
. = ..()
if(!. || !client)
return FALSE
check_laws()
if(flavortext)
@@ -37,7 +37,9 @@
hidden_uplink.telecrystals = 10
/mob/living/simple_animal/drone/syndrone/Login()
..()
. = ..()
if(!. || !client)
return FALSE
to_chat(src, "<span class='notice'>You can kill and eat other drones to increase your health!</span>" )
/mob/living/simple_animal/drone/syndrone/badass
@@ -149,7 +151,9 @@
verbs -= /mob/living/simple_animal/drone/verb/drone_ping
/mob/living/simple_animal/drone/cogscarab/Login()
..()
. = ..()
if(!. || !client)
return FALSE
add_servant_of_ratvar(src, TRUE, GLOB.servants_active)
to_chat(src,"<b>You yourself are one of these servants, and will be able to utilize almost anything they can[GLOB.ratvar_awakens ? "":", <i>excluding a clockwork slab</i>"].</b>") // this can't go with flavortext because i'm assuming it requires them to be ratvar'd
@@ -70,7 +70,9 @@
humanize_spider(ghost)
/mob/living/simple_animal/hostile/poison/giant_spider/Login()
..()
. = ..()
if(!. || !client)
return FALSE
if(directive)
to_chat(src, "<span class='notice'>Your mother left you a directive! Follow it at all costs.</span>")
to_chat(src, "<span class='spider'><b>[directive]</b></span>")
@@ -490,6 +492,8 @@
/mob/living/simple_animal/hostile/poison/giant_spider/Login()
. = ..()
if(!. || !client)
return FALSE
GLOB.spidermobs[src] = TRUE
/mob/living/simple_animal/hostile/poison/giant_spider/Destroy()
+6
View File
@@ -1,4 +1,6 @@
/mob/Login()
if(!client)
return FALSE
GLOB.player_list |= src
lastKnownIP = client.address
computer_id = client.computer_id
@@ -17,6 +19,9 @@
..()
if(!client)
return FALSE
reset_perspective(loc)
if(loc)
@@ -56,3 +61,4 @@
log_message("Client [key_name(src)] has taken ownership of mob [src]([src.type])", LOG_OWNERSHIP)
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_LOGIN, client)
return TRUE