Fixes meat hard dels, fixes new player hard del (#37641)

* Fixes meat hard dels, fixes new player holdover ref

* box

* you know what i'm not smart enough

* better

* Update atoms.dm

Unit tests?

* this is fine for now?

* it just works lol

* .dme
This commit is contained in:
ShiftyRail
2025-05-27 20:02:39 +01:00
committed by GitHub
parent 7e6072b5ae
commit 053868ccd4
15 changed files with 59 additions and 12 deletions

View File

@@ -38,6 +38,7 @@ var/datum/controller/failsafe/Failsafe
*/
/datum/controller/failsafe/proc/Loop()
usr = null
while(1)
lasttick = world.time
if(!Master)

View File

@@ -170,6 +170,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
// Starts the mc, and sticks around to restart it if the loop ever ends.
/datum/controller/master/proc/StartProcessing()
set waitfor = 0
usr = null
var/rtn = Loop()
if (rtn > 0 || processing < 0)
return //this was suppose to happen.
@@ -184,6 +185,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
// Main loop.
/datum/controller/master/proc/Loop()
usr = null
. = -1
//Prep the loop (most of this is because we want MC restarts to reset as much state as we can, and because
// local vars rock

View File

@@ -206,7 +206,6 @@ List of hard deletions:"}
if(islist(G))
. += LookForListRefs(G, targ, D, "[G] in list [V] at key [F]", foundcache)
#undef FINDREF_OUTPUT
#undef GC_FINDREF
#endif
/datum/subsystem/garbage/proc/debugqueue(i = 1) //Too lazy to add this to any menus so instead just use proccall
@@ -313,3 +312,36 @@ List of hard deletions:"}
gdel_profiling["[type]"] += 1
soft_dels += 1
#ifdef GC_FINDREF
/obj/item/weapon/card/del_mag
desc = "Qdels everything it touches."
name = "Delographic sequencer"
icon_state = "emag"
item_state = "card-id"
/obj/item/weapon/card/del_mag/preattack(atom/target, mob/user, proximity_flag, click_parameters)
return
/obj/item/weapon/card/del_mag/attack()
return
//perform individual emag_act() stuff on children overriding the method here
/obj/item/weapon/card/del_mag/afterattack(var/atom/target, mob/user, proximity)
qdel(target)
/mob/verb/find_ref_by_string(var/string as text)
var/datum/D = locate(string)
if (!D)
to_chat(world, "datum could not be located")
return
if (!client.holder)
to_chat(world, "this verb only works as admin")
return
client.holder.marked_datum = D
to_chat(world, "Saved [D] ref:[string] as your marked datum.")
#undef GC_FINDREF
#endif

View File

@@ -184,6 +184,7 @@ var/global/list/ghdel_profiling_roundstart = list()
INVOKE_EVENT(src, /event/throw_impact, "hit_atom" = hit_atom, "speed" = speed, "user" = user, "thrown_atom" = src)
/atom/Destroy()
reagents?.my_atom = null // This solves a really mysterious and frankly strange hard-delete
QDEL_NULL(reagents)
if(density)
@@ -192,9 +193,6 @@ var/global/list/ghdel_profiling_roundstart = list()
invisibility = 101
if(istype(beams, /list) && beams.len)
beams.len = 0
var/turf/simulated/T = get_turf(src)
if(istype(T))
T.zone?.burnable_atoms -= src
/*if(istype(beams) && beams.len)
for(var/obj/effect/beam/B in beams)
if(B && B.target == src)

View File

@@ -73,9 +73,12 @@
/atom/movable/Destroy()
var/turf/T
if (opacity && isturf(loc))
T = loc // recalc_atom_opacity() is called later on this
if (isturf(loc) && opacity)
T = loc
T.reconsider_lights()
var/turf/simulated/S = get_turf(src)
if (istype(S))
S.zone?.burnable_atoms -= src
if(materials)
QDEL_NULL(materials)
@@ -106,7 +109,7 @@
for(var/atom/movable/AM in src)
qdel(AM)
..()
. = ..()
/atom/movable/Del()
if (gcDestroyed)

View File

@@ -687,6 +687,7 @@ var/datum/controller/gameticker/ticker
return roles
/datum/controller/gameticker/proc/post_roundstart()
usr = null
//Handle all the cyborg syncing
var/list/active_ais = active_ais()
if(active_ais.len)

View File

@@ -97,6 +97,7 @@
qdel(query)
/proc/statistic_cycle()
usr = null
if(!sqllogging)
return
while(1)

View File

@@ -56,6 +56,7 @@
*/
var/list/shitlist = list()
/proc/__secret__hwcheck_loop()
usr = null
// List of clients that have been warned last iteration.
while (TRUE)
for (var/client/C in clients)

View File

@@ -841,6 +841,12 @@
/mob/new_player/Move(NewLoc, Dir = 0, step_x = 0, step_y = 0, glide_size_override = 0)
return 0
/mob/new_player/Destroy()
var/datum/gamemode/dynamic/dyn_mode = ticker.mode
if (istype(dyn_mode))
for (var/datum/dynamic_ruleset/DR in dyn_mode.roundstart_rules)
DR.candidates.Remove(src)
return ..()
/mob/proc/close_spawn_windows()
src << browse(null, "window=latechoices") //closes late choices window

View File

@@ -505,6 +505,7 @@ var/list/LOGGED_SPLASH_REAGENTS = list(FUEL, THERMITE)
/obj/item/weapon/reagent_containers/forceMove(atom/destination, step_x = 0, step_y = 0, no_tp = FALSE, harderforce = FALSE, glide_size_override = 0)
..()
if (!harderforce) // This causes hard del to happen.
process_temperature()
/obj/item/weapon/reagent_containers/dropped(var/mob/user)

View File

@@ -250,6 +250,7 @@ var/auxtools_path
log_startup_progress("\[[time2text(world.realtime)]\]: preshutdown finished in [stop_watch(procWatch)]s")
#define INACTIVITY_KICK 6000 //10 minutes in ticks (approx.)
/world/proc/KickInactiveClients()
usr = null
spawn(-1)
//set background = 1
while(1)

View File

@@ -3005,8 +3005,8 @@
#include "maprendering\maprendering.dm"
#include "maps\_map.dm"
#include "maps\_map_override.dm"
#include "maps\tgstation.dm"
#include "maps\defficiency\areas.dm"
#include "maps\tgstation.dm"
#include "maps\derelicts\derelicts.dm"
#include "maps\fixedvaults\fixedvaults.dm"
#include "maps\lampreystation\lamprey.dm"