diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index e8c211306d6..7465b4c965d 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -158,6 +158,7 @@ /obj/item/card/id/Destroy() QDEL_NULL(chat_user) + mob_id = null . = ..() GC_TEMPORARY_HARDDEL diff --git a/code/game/objects/items/weapons/ecigs.dm b/code/game/objects/items/weapons/ecigs.dm index 713c74d8094..bd5b6dd0394 100644 --- a/code/game/objects/items/weapons/ecigs.dm +++ b/code/game/objects/items/weapons/ecigs.dm @@ -52,6 +52,11 @@ cig_cell = new cell_type(src) ec_cartridge = new cartridge_type(src) +/obj/item/clothing/mask/smokable/ecig/Destroy() + QDEL_NULL(ec_cartridge) + QDEL_NULL(cig_cell) + return ..() + /obj/item/clothing/mask/smokable/ecig/get_cell() return cig_cell diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 40a46d4d8d7..b9549e1d023 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -11,7 +11,7 @@ var/state = 0 var/path = 0 var/obj/item/device/assembly_holder/detonator = null - var/list/beakers = new/list() + var/list/beakers = list() var/list/allowed_containers = list(/obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle) var/affected_area = 3 @@ -26,6 +26,13 @@ . = ..() create_reagents(1000) +/obj/item/grenade/chem_grenade/Destroy() + for(var/obj/item/beaker in beakers) + qdel(beaker) + beakers.Cut() + QDEL_NULL(detonator) + return ..() + /obj/item/grenade/chem_grenade/attack_self(mob/user as mob) if(!stage || stage==1) if(detonator) diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index 47773985549..32f8609b41c 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -14,6 +14,10 @@ hold.max_storage_space = DEFAULT_BOX_STORAGE hold.max_w_class = WEIGHT_CLASS_SMALL +/obj/item/clothing/accessory/storage/Destroy() + QDEL_NULL(hold) + return ..() + /obj/item/clothing/accessory/storage/attack_hand(mob/user as mob) if (has_suit) //if we are part of a suit hold.open(user) diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index a6c36c43575..cbebeb3311d 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -100,7 +100,8 @@ var/datum/weakref/carp_weakref = carp_ref var/mob/living/simple_animal/hostile/carp/fish = carp_weakref.resolve() if (fish && prob(50) && is_type_in_typecache(fish.loc, despawn_turfs)) - qdel(fish) + spawned_carp -= carp_weakref + qdel(carp_weakref) /datum/event/carp_migration/cozmo/start() ..() diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index fff0ffd9dff..1baed537051 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -21,7 +21,7 @@ death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA ghostize() //Ghostize checks for key so nothing else is necessary. container = null - . = ..() + return ..() /mob/living/carbon/brain/IsAdvancedToolUser() // to be able to use weapons when piloting a hardsuit return TRUE diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index e4fa81b84bc..5c5c5a83083 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -19,7 +19,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) /mob/living/carbon/human/dummy/mannequin/Destroy() SSmobs.free_mannequin(src) - . = ..() + return ..() /mob/living/carbon/human/vatgrown/Initialize(mapload) . = ..(mapload, SPECIES_HUMAN_VATGROWN) diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 1a7b9f65b32..edc7ff39bc1 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -66,9 +66,6 @@ var/toxloss = 0 var/datum/reagents/metabolism/ingested -/mob/living/carbon/slime/get_ingested_reagents() - return ingested - /mob/living/carbon/slime/Initialize(mapload, colour = "grey") . = ..() @@ -90,6 +87,19 @@ last_AI = world.time regenerate_icons() +/mob/living/carbon/slime/Destroy() + victim = null + target = null + leader = null + for(var/mob/friend in friends) + friends -= friend + friends.Cut() + QDEL_NULL(ingested) + return ..() + +/mob/living/carbon/slime/get_ingested_reagents() + return ingested + /mob/living/carbon/slime/purple/Initialize(mapload, colour = "purple") . = ..() diff --git a/code/modules/overmap/exoplanets/exoplanet.dm b/code/modules/overmap/exoplanets/exoplanet.dm index 7d91d275c00..97dc3bf0291 100644 --- a/code/modules/overmap/exoplanets/exoplanet.dm +++ b/code/modules/overmap/exoplanets/exoplanet.dm @@ -265,7 +265,6 @@ var/mob_type = pick(repopulate_types) var/mob/S = new mob_type(T) animals += S - GLOB.death_event.register(S, src, PROC_REF(remove_animal)) RegisterSignal(S, COMSIG_QDELETING, PROC_REF(remove_animal)) adapt_animal(S) if(animals.len >= max_animal_count) @@ -287,7 +286,6 @@ /obj/effect/overmap/visitable/sector/exoplanet/proc/remove_animal(mob/M) animals -= M - GLOB.death_event.unregister(M, src) UnregisterSignal(M, COMSIG_QDELETING) repopulate_types |= M.type diff --git a/code/modules/reagents/reagent_containers/food/drinks/flask.dm b/code/modules/reagents/reagent_containers/food/drinks/flask.dm index fe95153f27d..a89ca3d7aa8 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/flask.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/flask.dm @@ -35,6 +35,10 @@ atom_flags ^= ATOM_FLAG_OPEN_CONTAINER update_icon() +/obj/item/reagent_containers/food/drinks/flask/vacuumflask/Destroy() + QDEL_NULL(cup) + return ..() + /obj/item/reagent_containers/food/drinks/flask/vacuumflask/attack_self(mob/user) if(cup) to_chat(user, SPAN_NOTICE("You remove \the [src]'s cap."))