mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
RETURNTOPOOL AND VARIOUS (#16540)
* RETURNTOPOOL AND VARIOUS * fixes * forgot a fix * more fix * too tired to git * Sood AKA that guy that always tries to fix GC even though he forgets how it works every time and he always does it late at night in a hurry * cluster knows best
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
if(M.client.buildmode_objs && M.client.buildmode_objs.len)
|
if(M.client.buildmode_objs && M.client.buildmode_objs.len)
|
||||||
for(var/BM in M.client.buildmode_objs)
|
for(var/BM in M.client.buildmode_objs)
|
||||||
returnToPool(BM)
|
returnToPool(BM)
|
||||||
|
M.client.buildmode_objs.Cut()
|
||||||
else
|
else
|
||||||
log_admin("[key_name(usr)] has entered build mode.")
|
log_admin("[key_name(usr)] has entered build mode.")
|
||||||
M.client.buildmode = 1
|
M.client.buildmode = 1
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ var/global/obj/abstract/screen/clicker/catcher = new()
|
|||||||
adding -= IN
|
adding -= IN
|
||||||
mymob.client.screen -= IN
|
mymob.client.screen -= IN
|
||||||
|
|
||||||
|
hand_hud_objects -= IN
|
||||||
returnToPool(IN)
|
returnToPool(IN)
|
||||||
|
|
||||||
if(mymob.client)
|
if(mymob.client)
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
|
|
||||||
if(materials)
|
if(materials)
|
||||||
returnToPool(materials)
|
returnToPool(materials)
|
||||||
|
materials = null
|
||||||
|
|
||||||
if(on_moved)
|
if(on_moved)
|
||||||
on_moved.holder = null
|
on_moved.holder = null
|
||||||
|
|||||||
@@ -414,6 +414,7 @@
|
|||||||
connected = null
|
connected = null
|
||||||
for(var/datum/block_label/label in labels)
|
for(var/datum/block_label/label in labels)
|
||||||
returnToPool(label)
|
returnToPool(label)
|
||||||
|
labels.Cut()
|
||||||
buffers.Cut()
|
buffers.Cut()
|
||||||
if(disk)
|
if(disk)
|
||||||
qdel(disk)
|
qdel(disk)
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
return
|
return
|
||||||
if(!path)
|
if(!path)
|
||||||
returnToPool(verb_holder)
|
returnToPool(verb_holder)
|
||||||
|
verb_holder = null
|
||||||
return
|
return
|
||||||
|
|
||||||
verb_holder.verbs -= path
|
verb_holder.verbs -= path
|
||||||
@@ -197,6 +198,7 @@
|
|||||||
verb_holder.verbs -= P.verbpath
|
verb_holder.verbs -= P.verbpath
|
||||||
|
|
||||||
returnToPool(verb_holder)
|
returnToPool(verb_holder)
|
||||||
|
verb_holder = null
|
||||||
|
|
||||||
|
|
||||||
//Helper proc. Does all the checks and stuff for us to avoid copypasta
|
//Helper proc. Does all the checks and stuff for us to avoid copypasta
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
/obj/machinery/smartfridge/Destroy()
|
/obj/machinery/smartfridge/Destroy()
|
||||||
for(var/key in piles)
|
for(var/key in piles)
|
||||||
returnToPool(piles[key])
|
returnToPool(piles[key])
|
||||||
|
piles.Cut()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ var/global/list/datum/stack_recipe/cable_recipes = list ( \
|
|||||||
if(prob(50)) //Fail
|
if(prob(50)) //Fail
|
||||||
getFromPool(/obj/item/stack/cable_coil, C.loc, 1)
|
getFromPool(/obj/item/stack/cable_coil, C.loc, 1)
|
||||||
returnToPool(C)
|
returnToPool(C)
|
||||||
|
return // let's not return the reference to a pooled cable
|
||||||
|
|
||||||
return C //What was our last known position?
|
return C //What was our last known position?
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/rcl/proc/is_empty(mob/user)
|
/obj/item/weapon/rcl/proc/is_empty(mob/user)
|
||||||
update_icon()
|
update_icon()
|
||||||
if(!loaded.amount)
|
if(loaded && !loaded.amount)
|
||||||
to_chat(user, "<span class='notice'>The last of the cables unreel from \the [src].</span>")
|
to_chat(user, "<span class='notice'>The last of the cables unreel from \the [src].</span>")
|
||||||
returnToPool(loaded)
|
returnToPool(loaded)
|
||||||
loaded = null
|
loaded = null
|
||||||
|
|||||||
@@ -276,6 +276,7 @@
|
|||||||
overlays.len = 0 //Once it's been on for a while, in addition to handling the water overlay.
|
overlays.len = 0 //Once it's been on for a while, in addition to handling the water overlay.
|
||||||
if(mymist)
|
if(mymist)
|
||||||
returnToPool(mymist)
|
returnToPool(mymist)
|
||||||
|
mymist = null
|
||||||
|
|
||||||
if(on)
|
if(on)
|
||||||
var/image/water = image('icons/obj/watercloset.dmi', src, "water", BELOW_OBJ_LAYER, dir)
|
var/image/water = image('icons/obj/watercloset.dmi', src, "water", BELOW_OBJ_LAYER, dir)
|
||||||
@@ -297,6 +298,7 @@
|
|||||||
spawn(250)
|
spawn(250)
|
||||||
if(src && !on)
|
if(src && !on)
|
||||||
returnToPool(mymist)
|
returnToPool(mymist)
|
||||||
|
mymist = null
|
||||||
ismist = 0
|
ismist = 0
|
||||||
|
|
||||||
/obj/machinery/shower/Crossed(atom/movable/O)
|
/obj/machinery/shower/Crossed(atom/movable/O)
|
||||||
|
|||||||
@@ -365,9 +365,9 @@ turf/simulated/floor/update_icon()
|
|||||||
if(floor_tile)
|
if(floor_tile)
|
||||||
//qdel(floor_tile)
|
//qdel(floor_tile)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
|
floor_tile = null
|
||||||
icon_plating = "plating"
|
icon_plating = "plating"
|
||||||
set_light(0)
|
set_light(0)
|
||||||
floor_tile = null
|
|
||||||
intact = 0
|
intact = 0
|
||||||
broken = 0
|
broken = 0
|
||||||
burnt = 0
|
burnt = 0
|
||||||
@@ -388,7 +388,7 @@ turf/simulated/floor/update_icon()
|
|||||||
set_light(0)
|
set_light(0)
|
||||||
if(floor_tile)
|
if(floor_tile)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
floor_tile = null
|
floor_tile = null
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T,/obj/item/stack/tile/plasteel))
|
if(istype(T,/obj/item/stack/tile/plasteel))
|
||||||
floor_tile = T
|
floor_tile = T
|
||||||
@@ -418,7 +418,7 @@ turf/simulated/floor/update_icon()
|
|||||||
plane = TURF_PLANE
|
plane = TURF_PLANE
|
||||||
if(floor_tile)
|
if(floor_tile)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
floor_tile = null
|
floor_tile = null
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T,/obj/item/stack/tile/light))
|
if(istype(T,/obj/item/stack/tile/light))
|
||||||
floor_tile = T
|
floor_tile = T
|
||||||
@@ -440,7 +440,7 @@ turf/simulated/floor/update_icon()
|
|||||||
plane = TURF_PLANE
|
plane = TURF_PLANE
|
||||||
if(floor_tile)
|
if(floor_tile)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
floor_tile = null
|
floor_tile = null
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T,/obj/item/stack/tile/grass))
|
if(istype(T,/obj/item/stack/tile/grass))
|
||||||
floor_tile = T
|
floor_tile = T
|
||||||
@@ -461,7 +461,7 @@ turf/simulated/floor/update_icon()
|
|||||||
plane = TURF_PLANE
|
plane = TURF_PLANE
|
||||||
if(floor_tile)
|
if(floor_tile)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
floor_tile = null
|
floor_tile = null
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T,/obj/item/stack/tile/wood))
|
if(istype(T,/obj/item/stack/tile/wood))
|
||||||
floor_tile = T
|
floor_tile = T
|
||||||
@@ -482,7 +482,7 @@ turf/simulated/floor/update_icon()
|
|||||||
plane = TURF_PLANE
|
plane = TURF_PLANE
|
||||||
if(floor_tile)
|
if(floor_tile)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
floor_tile = null
|
floor_tile = null
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T,/obj/item/stack/tile/carpet))
|
if(istype(T,/obj/item/stack/tile/carpet))
|
||||||
floor_tile = T
|
floor_tile = T
|
||||||
@@ -573,10 +573,10 @@ turf/simulated/floor/update_icon()
|
|||||||
if(!broken && !burnt)
|
if(!broken && !burnt)
|
||||||
var/obj/item/stack/tile/T = C
|
var/obj/item/stack/tile/T = C
|
||||||
if(T.use(1))
|
if(T.use(1))
|
||||||
if(floor_tile)
|
if(floor_tile && floor_tile.type != T.type)
|
||||||
returnToPool(floor_tile)
|
returnToPool(floor_tile)
|
||||||
floor_tile = null
|
floor_tile = null
|
||||||
floor_tile = getFromPool(T.type, null)
|
floor_tile = getFromPool(T.type, null)
|
||||||
material = floor_tile.material
|
material = floor_tile.material
|
||||||
intact = 1
|
intact = 1
|
||||||
plane = TURF_PLANE
|
plane = TURF_PLANE
|
||||||
|
|||||||
@@ -42,8 +42,7 @@
|
|||||||
spark(user, 5)
|
spark(user, 5)
|
||||||
if(L.damage <= 0)
|
if(L.damage <= 0)
|
||||||
returnToPool(L)
|
returnToPool(L)
|
||||||
//del(L)
|
else
|
||||||
if(L)
|
|
||||||
playsound(get_turf(src), 'sound/effects/eleczap.ogg', 75, 1)
|
playsound(get_turf(src), 'sound/effects/eleczap.ogg', 75, 1)
|
||||||
L.tang = adjustAngle(get_angle(U,T))
|
L.tang = adjustAngle(get_angle(U,T))
|
||||||
L.icon = midicon
|
L.icon = midicon
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
/obj/item/weapon/disk/data/Destroy()
|
/obj/item/weapon/disk/data/Destroy()
|
||||||
for(var/datum/block_label/label in labels)
|
for(var/datum/block_label/label in labels)
|
||||||
returnToPool(label)
|
returnToPool(label)
|
||||||
|
labels.Cut()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/disk/data/proc/Initialize()
|
/obj/item/weapon/disk/data/proc/Initialize()
|
||||||
|
|||||||
@@ -278,7 +278,7 @@
|
|||||||
assailant = null
|
assailant = null
|
||||||
if(hud)
|
if(hud)
|
||||||
returnToPool(hud)
|
returnToPool(hud)
|
||||||
hud = null
|
hud = null
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/mob/proc/grab_check(mob/victim)
|
/mob/proc/grab_check(mob/victim)
|
||||||
|
|||||||
Reference in New Issue
Block a user