mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
Merge pull request #7297 from Fox-McCloud/more-gc-defines
More GC Define Transitions
This commit is contained in:
@@ -51,34 +51,21 @@
|
||||
if(mymob.hud_used == src)
|
||||
mymob.hud_used = null
|
||||
|
||||
qdel(hide_actions_toggle)
|
||||
hide_actions_toggle = null
|
||||
QDEL_NULL(hide_actions_toggle)
|
||||
|
||||
QDEL_NULL(module_store_icon)
|
||||
|
||||
if(static_inventory.len)
|
||||
for(var/thing in static_inventory)
|
||||
qdel(thing)
|
||||
static_inventory.Cut()
|
||||
QDEL_LIST(static_inventory)
|
||||
|
||||
inv_slots.Cut()
|
||||
action_intent = null
|
||||
move_intent = null
|
||||
|
||||
if(toggleable_inventory.len)
|
||||
for(var/thing in toggleable_inventory)
|
||||
qdel(thing)
|
||||
toggleable_inventory.Cut()
|
||||
QDEL_LIST(toggleable_inventory)
|
||||
|
||||
if(hotkeybuttons.len)
|
||||
for(var/thing in hotkeybuttons)
|
||||
qdel(thing)
|
||||
hotkeybuttons.Cut()
|
||||
QDEL_LIST(hotkeybuttons)
|
||||
|
||||
if(infodisplay.len)
|
||||
for(var/thing in infodisplay)
|
||||
qdel(thing)
|
||||
infodisplay.Cut()
|
||||
QDEL_LIST(infodisplay)
|
||||
|
||||
//clear mob refs to screen objects
|
||||
mymob.throw_icon = null
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
materials[MAT_TRANQUILLITE] = new /datum/material/tranquillite()
|
||||
|
||||
/datum/material_container/Destroy()
|
||||
QDEL_LIST_ASSOC_VAL(materials)
|
||||
owner = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
/mob/camera/blob/Destroy()
|
||||
if(ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
qdel(ghostimage)
|
||||
ghostimage = null;
|
||||
QDEL_NULL(ghostimage)
|
||||
updateallghostimages()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
*/
|
||||
|
||||
/obj/item/weapon/camera_assembly/Destroy()
|
||||
for(var/thing in upgrades)
|
||||
qdel(thing)
|
||||
upgrades.Cut()
|
||||
QDEL_LIST(upgrades)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/camera_assembly/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
@@ -142,14 +142,12 @@
|
||||
/obj/machinery/computer/aifixer/Destroy()
|
||||
if(occupant)
|
||||
occupant.ghostize()
|
||||
qdel(occupant)
|
||||
occupant = null
|
||||
QDEL_NULL(occupant)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/aifixer/emp_act()
|
||||
if(occupant)
|
||||
occupant.ghostize()
|
||||
qdel(occupant)
|
||||
occupant = null
|
||||
QDEL_NULL(occupant)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
|
||||
light_color = LIGHT_COLOR_DARKGREEN
|
||||
|
||||
|
||||
/obj/machinery/computer/vr_control/New()
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/vr_control/Destroy()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/vr_control/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
ui_interact(user)
|
||||
|
||||
@@ -141,8 +141,7 @@
|
||||
var/locked = 0
|
||||
|
||||
/obj/machinery/shieldgen/Destroy()
|
||||
for(var/obj/machinery/shield/shield_tile in deployed_shields)
|
||||
qdel(shield_tile)
|
||||
QDEL_LIST(deployed_shields)
|
||||
deployed_shields = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -610,13 +610,9 @@
|
||||
WR.crowbar_salvage += internal_tank
|
||||
internal_tank.forceMove(WR)
|
||||
else
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
|
||||
E.forceMove(loc)
|
||||
qdel(E)
|
||||
if(cell)
|
||||
qdel(cell)
|
||||
if(internal_tank)
|
||||
qdel(internal_tank)
|
||||
QDEL_LIST(equipment)
|
||||
QDEL_NULL(cell)
|
||||
QDEL_NULL(internal_tank)
|
||||
|
||||
processing_objects.Remove(src)
|
||||
poi_list.Remove(src)
|
||||
|
||||
@@ -85,8 +85,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.unEquip(src, 1)
|
||||
for(var/X in actions)
|
||||
qdel(X)
|
||||
QDEL_LIST(actions)
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
/obj/item/device/paicard/Destroy()
|
||||
if(pai)
|
||||
pai.ghostize()
|
||||
qdel(pai)
|
||||
pai = null
|
||||
QDEL_NULL(pai)
|
||||
QDEL_NULL(radio)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -267,6 +267,7 @@ var/global/list/default_medbay_channels = list(
|
||||
/mob/living/automatedannouncer/Destroy()
|
||||
if(lifetime_timer)
|
||||
deltimer(lifetime_timer)
|
||||
lifetime_timer = null
|
||||
return ..()
|
||||
|
||||
/mob/living/automatedannouncer/proc/autocleanup()
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/Destroy()
|
||||
QDEL_NULL(nadeassembly)
|
||||
for(var/thing in beakers)
|
||||
qdel(thing)
|
||||
beakers.Cut()
|
||||
QDEL_LIST(beakers)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/obj/item/weapon/grenade/empgrenade
|
||||
name = "classic emp grenade"
|
||||
name = "classic EMP grenade"
|
||||
desc = "It is designed to wreak havoc on electronic systems."
|
||||
icon_state = "emp"
|
||||
item_state = "emp"
|
||||
origin_tech = "materials=2;magnets=3"
|
||||
|
||||
prime()
|
||||
..()
|
||||
if(empulse(src, 4, 10))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/empgrenade/prime()
|
||||
update_mob()
|
||||
empulse(src, 4, 10)
|
||||
qdel(src)
|
||||
@@ -14,9 +14,7 @@
|
||||
var/max_signs = 20
|
||||
|
||||
/obj/item/weapon/holosign_creator/Destroy()
|
||||
for(var/sign in signs)
|
||||
qdel(sign)
|
||||
signs.Cut()
|
||||
QDEL_LIST(signs)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag)
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/Destroy()
|
||||
QDEL_NULL(tank)
|
||||
for(var/obj/item/I in loadedItems)
|
||||
qdel(I)
|
||||
loadedItems.Cut()
|
||||
QDEL_LIST(loadedItems)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/examine(mob/user)
|
||||
|
||||
@@ -69,8 +69,7 @@
|
||||
/obj/item/weapon/watertank/Destroy()
|
||||
if(on)
|
||||
remove_noz()
|
||||
qdel(noz)
|
||||
noz = null
|
||||
QDEL_NULL(noz)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/watertank/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
/obj/structure/transit_tube_pod/Destroy()
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.forceMove(get_turf(src))
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube_pod/Process_Spacemove()
|
||||
|
||||
@@ -123,8 +123,7 @@
|
||||
if(istype(cl))
|
||||
cl.images -= I
|
||||
cl = null
|
||||
qdel(I)
|
||||
I = null
|
||||
QDEL_NULL(I)
|
||||
return ..()
|
||||
|
||||
/datum/click_intercept
|
||||
@@ -139,9 +138,7 @@
|
||||
holder.screen += buttons
|
||||
|
||||
/datum/click_intercept/Destroy()
|
||||
for(var/button in buttons)
|
||||
qdel(button)
|
||||
buttons.Cut()
|
||||
QDEL_LIST(buttons)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
/obj/item/device/assembly/infra/Destroy()
|
||||
if(first)
|
||||
qdel(first)
|
||||
first = null
|
||||
QDEL_NULL(first)
|
||||
last = null
|
||||
fire_location = null
|
||||
return ..()
|
||||
|
||||
@@ -165,13 +165,11 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
|
||||
/obj/effect/hallucination/fake_flood/Destroy()
|
||||
processing_objects -= src
|
||||
qdel(flood_turfs)
|
||||
flood_turfs = list()
|
||||
flood_turfs.Cut()
|
||||
if(target.client)
|
||||
target.client.images.Remove(flood_images)
|
||||
target = null
|
||||
qdel(flood_images)
|
||||
flood_images = list()
|
||||
QDEL_LIST(flood_images)
|
||||
return ..()
|
||||
|
||||
/obj/effect/hallucination/simple/xeno
|
||||
|
||||
@@ -372,8 +372,7 @@
|
||||
overlays += T
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/Destroy()
|
||||
for(var/obj/item/O in ingredients)
|
||||
qdel(O)
|
||||
QDEL_LIST(ingredients)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/examine(mob/user)
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
if(contents.len)
|
||||
for(var/atom/movable/A in contents)
|
||||
A.loc = get_turf(src)
|
||||
if(occupant) occupant = null
|
||||
if(occupant)
|
||||
occupant = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gibber/RefreshParts() //If you want to make the machine upgradable, this is where you would change any vars basd on its stock parts.
|
||||
|
||||
@@ -227,8 +227,7 @@
|
||||
/obj/item/device/mobcapsule/Destroy()
|
||||
if(captured)
|
||||
captured.ghostize()
|
||||
qdel(captured)
|
||||
captured = null
|
||||
QDEL_NULL(captured)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/mobcapsule/attack(var/atom/A, mob/user, prox_flag)
|
||||
|
||||
@@ -94,8 +94,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
following = null
|
||||
if(ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
qdel(ghostimage)
|
||||
ghostimage = null
|
||||
QDEL_NULL(ghostimage)
|
||||
updateallghostimages()
|
||||
return ..()
|
||||
|
||||
@@ -642,13 +641,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/proc/can_admin_interact()
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/proc/can_advanced_admin_interact()
|
||||
return FALSE
|
||||
|
||||
/mob/dead/observer/can_admin_interact()
|
||||
return check_rights(R_ADMIN, 0, src)
|
||||
|
||||
|
||||
/mob/dead/observer/can_advanced_admin_interact()
|
||||
if(!can_admin_interact())
|
||||
return FALSE
|
||||
@@ -657,7 +656,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/dead/observer/incapacitated()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -17,10 +17,8 @@
|
||||
med_hud_set_status()
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
for(var/atom/movable/guts in internal_organs)
|
||||
qdel(guts)
|
||||
for(var/atom/movable/food in stomach_contents)
|
||||
qdel(food)
|
||||
QDEL_LIST(internal_organs)
|
||||
QDEL_LIST(stomach_contents)
|
||||
remove_from_all_data_huds()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
emag.name = "Placeholder Emag Item"
|
||||
|
||||
/obj/item/weapon/robot_module/Destroy()
|
||||
for(var/module in modules)
|
||||
qdel(module)
|
||||
modules.Cut()
|
||||
QDEL_LIST(modules)
|
||||
QDEL_NULL(emag)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -119,8 +119,7 @@
|
||||
return null
|
||||
|
||||
/obj/item/weapon/computer_hardware/hard_drive/Destroy()
|
||||
for(var/file in stored_files)
|
||||
qdel(file)
|
||||
QDEL_LIST(stored_files)
|
||||
stored_files = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/paper_bin/Destroy()
|
||||
if(papers)
|
||||
for(var/i in papers)
|
||||
qdel(i)
|
||||
papers.Cut()
|
||||
QDEL_LIST(papers)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper_bin/burn()
|
||||
|
||||
@@ -464,9 +464,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
pai.forceMove(T)
|
||||
current_app = null
|
||||
scanmode = null
|
||||
for(var/A in programs)
|
||||
qdel(A)
|
||||
programs.Cut()
|
||||
QDEL_LIST(programs)
|
||||
QDEL_NULL(cartridge)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -25,12 +25,8 @@
|
||||
|
||||
/obj/item/weapon/cartridge/Destroy()
|
||||
QDEL_NULL(radio)
|
||||
for(var/A in programs)
|
||||
qdel(A)
|
||||
programs.Cut()
|
||||
for(var/A in messenger_plugins)
|
||||
qdel(A)
|
||||
messenger_plugins.Cut()
|
||||
QDEL_LIST(programs)
|
||||
QDEL_LIST(messenger_plugins)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/cartridge/proc/update_programs(obj/item/device/pda/pda)
|
||||
|
||||
@@ -39,11 +39,10 @@
|
||||
processing_objects.Add(src)
|
||||
poi_list |= src
|
||||
singularities += src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in world)
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
break
|
||||
return
|
||||
|
||||
/obj/singularity/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/power/tesla_coil/Destroy()
|
||||
if(wires)
|
||||
qdel(wires)
|
||||
wires = null
|
||||
QDEL_NULL(wires)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/tesla_coil/RefreshParts()
|
||||
|
||||
@@ -49,9 +49,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
EB.orbiting_balls -= src
|
||||
orbiting = null
|
||||
|
||||
for(var/ball in orbiting_balls)
|
||||
var/obj/singularity/energy_ball/EB = ball
|
||||
qdel(EB)
|
||||
QDEL_LIST(orbiting_balls)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/ammo_box/Destroy()
|
||||
for(var/atom/A in stored_ammo)
|
||||
qdel(A)
|
||||
QDEL_LIST(stored_ammo)
|
||||
stored_ammo = null
|
||||
return ..()
|
||||
|
||||
@@ -193,4 +192,4 @@
|
||||
var/turf_mag = get_turf(src)
|
||||
for(var/obj/item/ammo in stored_ammo)
|
||||
ammo.forceMove(turf_mag)
|
||||
stored_ammo -= ammo
|
||||
stored_ammo -= ammo
|
||||
@@ -20,10 +20,8 @@
|
||||
to_chat(user, "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>")
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/Destroy()
|
||||
for(var/datum/D in rockets)
|
||||
qdel(D)
|
||||
QDEL_LIST(rockets)
|
||||
rockets = null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/update_icon()
|
||||
|
||||
@@ -37,10 +37,8 @@
|
||||
|
||||
/obj/item/weapon/gun/throw/Destroy()
|
||||
QDEL_NULL(to_launch)
|
||||
for(var/atom/A in loaded_projectiles)
|
||||
qdel(A)
|
||||
QDEL_LIST(loaded_projectiles)
|
||||
loaded_projectiles = null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/throw/update_icon()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
newdart.update_icon()
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/Destroy()
|
||||
pen = null
|
||||
QDEL_NULL(pen)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/riot
|
||||
|
||||
@@ -747,9 +747,7 @@ atom/proc/create_reagents(max_vol)
|
||||
/datum/reagents/Destroy()
|
||||
. = ..()
|
||||
processing_objects -= src
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
qdel(R)
|
||||
reagent_list.Cut()
|
||||
QDEL_LIST(reagent_list)
|
||||
reagent_list = null
|
||||
if(my_atom && my_atom.reagents == src)
|
||||
my_atom.reagents = null
|
||||
@@ -28,9 +28,7 @@
|
||||
set_occupied(FALSE)
|
||||
if(parent)
|
||||
parent.children -= src
|
||||
for(var/datum/space_chunk/child in children)
|
||||
qdel(child)
|
||||
children.Cut()
|
||||
QDEL_LIST(children)
|
||||
parent = null
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -131,8 +131,8 @@ var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/human/monkey,/
|
||||
var/obj/machinery/parent
|
||||
|
||||
/obj/structure/filler/ex_act()
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/dna_vault
|
||||
name = "DNA Vault"
|
||||
desc = "Break glass in case of apocalypse."
|
||||
@@ -177,7 +177,7 @@ var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/human/monkey,/
|
||||
plants_max = G.plant_count
|
||||
dna_max = G.human_count
|
||||
break
|
||||
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/dna_vault/Destroy()
|
||||
@@ -185,13 +185,14 @@ var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/human/monkey,/
|
||||
var/obj/structure/filler/filler = V
|
||||
filler.parent = null
|
||||
qdel(filler)
|
||||
fillers.Cut()
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/machinery/dna_vault/attack_ghost(mob/user)
|
||||
if(stat & (BROKEN|MAINT))
|
||||
return
|
||||
return ui_interact(user)
|
||||
|
||||
|
||||
/obj/machinery/dna_vault/attack_hand(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -296,7 +297,7 @@ var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/human/monkey,/
|
||||
grant_power(H, JUMPBLOCK, JUMPY)
|
||||
grant_power(H, INCREASERUNBLOCK, RUN)
|
||||
power_lottery[H] = list()
|
||||
|
||||
|
||||
/obj/machinery/dna_vault/proc/grant_power(mob/living/carbon/human/H, block, power)
|
||||
H.dna.SetSEState(block, 1, 1)
|
||||
H.mutations |= power
|
||||
|
||||
@@ -96,9 +96,7 @@
|
||||
if(owner)
|
||||
owner.bodyparts_by_name[limb_name] = null
|
||||
|
||||
if(children)
|
||||
for(var/obj/item/organ/external/C in children)
|
||||
qdel(C)
|
||||
QDEL_LIST(children)
|
||||
|
||||
if(wound_cleanup_timer)
|
||||
deltimer(wound_cleanup_timer)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/machinery/computer/telescience/Destroy()
|
||||
eject()
|
||||
if(inserted_gps)
|
||||
inserted_gps.loc = loc
|
||||
inserted_gps.forceMove(loc)
|
||||
inserted_gps = null
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user