mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #13747 from Fox-McCloud/new-player-gc
Makes New Players GC
This commit is contained in:
@@ -146,7 +146,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
|
||||
if(kickbannedckey)
|
||||
if(banned_mob && banned_mob.client && banned_mob.client.ckey == banckey)
|
||||
del(banned_mob.client)
|
||||
qdel(banned_mob.client)
|
||||
|
||||
if(isjobban)
|
||||
jobban_client_fullban(ckey, job)
|
||||
|
||||
@@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
body += "\[<A href='?_src_=holder;editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\] "
|
||||
body += "\[<A href='?_src_=holder;getplaytimewindow=[M.UID()]'>" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]</a>\]"
|
||||
|
||||
if(istype(M, /mob/new_player))
|
||||
if(isnewplayer(M))
|
||||
body += " <B>Hasn't Entered Game</B> "
|
||||
else
|
||||
body += " \[<A href='?_src_=holder;revive=[M.UID()]'>Heal</A>\] "
|
||||
@@ -147,7 +147,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
body += {" | <A href='?_src_=holder;cryossd=[M.UID()]'>Cryo</A> "}
|
||||
|
||||
if(M.client)
|
||||
if(!istype(M, /mob/new_player))
|
||||
if(!isnewplayer(M))
|
||||
body += "<br><br>"
|
||||
body += "<b>Transformation:</b>"
|
||||
body += "<br>"
|
||||
@@ -1004,13 +1004,13 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
|
||||
/proc/kick_clients_in_lobby(message, kick_only_afk = 0)
|
||||
var/list/kicked_client_names = list()
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(istype(C.mob, /mob/new_player))
|
||||
if(isnewplayer(C.mob))
|
||||
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
|
||||
continue
|
||||
if(message)
|
||||
to_chat(C, message)
|
||||
kicked_client_names.Add("[C.ckey]")
|
||||
del(C)
|
||||
qdel(C)
|
||||
return kicked_client_names
|
||||
|
||||
//returns 1 to let the dragdrop code know we are trapping this event
|
||||
|
||||
@@ -337,7 +337,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
ghost.reenter_corpse()
|
||||
log_admin("[key_name(usr)] re-entered their body")
|
||||
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else if(istype(mob,/mob/new_player))
|
||||
else if(isnewplayer(mob))
|
||||
to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or observe first.</font>")
|
||||
else
|
||||
//ghostize
|
||||
@@ -542,7 +542,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
|
||||
log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban")
|
||||
to_chat(C, "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.")
|
||||
del(C)
|
||||
qdel(C)
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
|
||||
log_admin("[key_name(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
else
|
||||
M_job = "Living"
|
||||
|
||||
else if(istype(M,/mob/new_player))
|
||||
else if(isnewplayer(M))
|
||||
M_job = "New player"
|
||||
|
||||
else if(isobserver(M))
|
||||
@@ -356,7 +356,7 @@
|
||||
dat += "<td>[M.real_name]</td>"
|
||||
else if(istype(M, /mob/living/silicon/pai))
|
||||
dat += "<td>pAI</td>"
|
||||
else if(istype(M, /mob/new_player))
|
||||
else if(isnewplayer(M))
|
||||
dat += "<td>New Player</td>"
|
||||
else if(isobserver(M))
|
||||
dat += "<td>Ghost</td>"
|
||||
|
||||
@@ -909,7 +909,7 @@
|
||||
log_admin("[key_name(usr)] booted [key_name(M)].")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(M)].</span>", 1)
|
||||
//M.client = null
|
||||
del(M.client)
|
||||
qdel(M.client)
|
||||
|
||||
//Player Notes
|
||||
else if(href_list["addnote"])
|
||||
@@ -1011,8 +1011,7 @@
|
||||
log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.</span>")
|
||||
|
||||
del(M.client)
|
||||
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
||||
qdel(M.client)
|
||||
if("No")
|
||||
var/reason = input(usr,"Please state the reason","Reason") as message|null
|
||||
if(!reason)
|
||||
@@ -1032,8 +1031,7 @@
|
||||
feedback_inc("ban_perma",1)
|
||||
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
|
||||
|
||||
del(M.client)
|
||||
//qdel(M)
|
||||
qdel(M.client)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
@@ -1507,7 +1505,7 @@
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["makeanimal"])
|
||||
if(istype(M, /mob/new_player))
|
||||
if(isnewplayer(M))
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/new_player")
|
||||
return
|
||||
if(alert(usr, "Confirm make animal?",, "Yes", "No") != "Yes")
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
if(T.mob)
|
||||
if(istype(T.mob, /mob/new_player))
|
||||
if(isnewplayer(T.mob))
|
||||
targets["(New Player) - [T]"] = T
|
||||
else if(istype(T.mob, /mob/dead/observer))
|
||||
targets["[T.mob.name](Ghost) - [T]"] = T
|
||||
@@ -42,7 +42,7 @@
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
if(T.mob)
|
||||
if(istype(T.mob, /mob/new_player))
|
||||
if(isnewplayer(T.mob))
|
||||
targets["[T] - (New Player)"] = T
|
||||
else if(istype(T.mob, /mob/dead/observer))
|
||||
targets["[T] - [T.mob.name](Ghost)"] = T
|
||||
|
||||
@@ -251,7 +251,7 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
alert("That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(istype(M, /mob/new_player))
|
||||
if(isnewplayer(M))
|
||||
alert("The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
@@ -382,7 +382,7 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
//This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with del-all
|
||||
//This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with qdel-all
|
||||
var/confirm = alert("This will delete ALL Singularities and Tesla orbs except for any that are on away mission z-levels or the centcomm z-level. Are you sure you want to delete them?", "Confirm Panic Button", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -59,10 +59,6 @@
|
||||
var/karma = 0
|
||||
var/karma_spent = 0
|
||||
var/karma_tab = 0
|
||||
/////////////////////////////////////////////
|
||||
// /vg/: MEDIAAAAAAAA
|
||||
// Set on login.
|
||||
var/datum/media_manager/media = null
|
||||
|
||||
var/topic_debugging = 0 //if set to true, allows client to see nanoUI errors -- yes i realize this is messy but it'll make live testing infinitely easier
|
||||
|
||||
@@ -85,9 +81,6 @@
|
||||
// If set to true, this client can interact with atoms such as buttons and doors on top of regular machinery interaction
|
||||
var/advanced_admin_interaction = FALSE
|
||||
|
||||
// Has the client been varedited by an admin? [Inherits from datum now]
|
||||
// var/var_edited = FALSE
|
||||
|
||||
var/client_keysend_amount = 0
|
||||
var/next_keysend_reset = 0
|
||||
var/next_keysend_trip_reset = 0
|
||||
|
||||
@@ -432,7 +432,13 @@
|
||||
//////////////
|
||||
//DISCONNECT//
|
||||
//////////////
|
||||
|
||||
/client/Del()
|
||||
if(!gc_destroyed)
|
||||
Destroy() //Clean up signals and timers.
|
||||
return ..()
|
||||
|
||||
/client/Destroy()
|
||||
if(holder)
|
||||
holder.owner = null
|
||||
GLOB.admins -= src
|
||||
@@ -442,7 +448,8 @@
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
Master.UpdateTickRate()
|
||||
return ..()
|
||||
..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
|
||||
/client/proc/donator_check()
|
||||
@@ -556,7 +563,7 @@
|
||||
if(GLOB.panic_bunker_enabled)
|
||||
var/threshold = config.panic_bunker_threshold
|
||||
src << "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. Please try again later."
|
||||
del(src)
|
||||
qdel(src)
|
||||
return // Dont insert or they can just go in again
|
||||
|
||||
var/DBQuery/query_insert = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/strength = 2 //ex_act severity number
|
||||
var/life = 2 //how many things we hit before del(src)
|
||||
var/life = 2 //how many things we hit before qdel(src)
|
||||
var/atom/goal = null
|
||||
|
||||
/obj/effect/space_dust/weak
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
|
||||
SplashReagents(target)
|
||||
|
||||
//Finally, smash the bottle. This kills (del) the bottle.
|
||||
//Finally, smash the bottle. This kills (qdel) the bottle.
|
||||
smash(target, user)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/proc/SplashReagents(mob/M)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
if(message)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(istype(M, /mob/new_player))
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
|
||||
if(check_rights(R_ADMIN|R_MOD, 0, M) && M.get_preference(CHAT_DEAD)) // Show the emote to admins/mods
|
||||
|
||||
@@ -752,7 +752,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
|
||||
if(client.holder && (client.holder.rights & R_ADMIN))
|
||||
is_admin = 1
|
||||
else if(stat != DEAD || istype(src, /mob/new_player))
|
||||
else if(stat != DEAD || isnewplayer(src))
|
||||
to_chat(usr, "<span class='notice'>You must be observing to use this!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
if(affecting)
|
||||
if(!affecting.buckled)
|
||||
affecting.pixel_x = 0
|
||||
affecting.pixel_y = 0 //used to be an animate, not quick enough for del'ing
|
||||
affecting.pixel_y = 0 //used to be an animate, not quick enough for qdel'ing
|
||||
affecting.layer = initial(affecting.layer)
|
||||
affecting.grabbed_by -= src
|
||||
affecting = null
|
||||
|
||||
@@ -459,7 +459,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
|
||||
name = realname
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(CHAT_DEAD))
|
||||
if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(CHAT_DEAD))
|
||||
var/follow
|
||||
var/lname
|
||||
if(subject)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//Note that this proc does NOT do MMI related stuff!
|
||||
/mob/proc/change_mob_type(var/new_type = null, var/turf/location = null, var/new_name = null as text, var/delete_old_mob = 0 as num, var/forcekey = 0)
|
||||
|
||||
if(istype(src,/mob/new_player))
|
||||
if(isnewplayer(src))
|
||||
to_chat(usr, "<span class='warning'>cannot convert players who have not entered yet.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -12,8 +12,13 @@
|
||||
stat = 2
|
||||
canmove = 0
|
||||
|
||||
/mob/new_player/New()
|
||||
/mob/new_player/Initialize(mapload)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
if(initialized)
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
initialized = TRUE
|
||||
GLOB.mob_list += src
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/mob/new_player/verb/new_player_panel()
|
||||
set src = usr
|
||||
|
||||
Reference in New Issue
Block a user