mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
A plethora of Destroy() fixes - return qdel hints and clean stuff up.
This commit is contained in:
@@ -314,7 +314,7 @@
|
|||||||
if(occupant)
|
if(occupant)
|
||||||
occupant.forceMove(loc)
|
occupant.forceMove(loc)
|
||||||
occupant.resting = 1
|
occupant.resting = 1
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/cryopod/initialize()
|
/obj/machinery/cryopod/initialize()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
/obj/machinery/door/window/Destroy()
|
/obj/machinery/door/window/Destroy()
|
||||||
density = 0
|
density = 0
|
||||||
update_nearby_tiles()
|
update_nearby_tiles()
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)
|
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)
|
||||||
if (!( ismob(AM) ))
|
if (!( ismob(AM) ))
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
/obj/item/radio/integrated/beepsky/Destroy()
|
/obj/item/radio/integrated/beepsky/Destroy()
|
||||||
if(radio_controller)
|
if(radio_controller)
|
||||||
radio_controller.remove_object(src, control_freq)
|
radio_controller.remove_object(src, control_freq)
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Radio Cartridge, essentially a signaler.
|
* Radio Cartridge, essentially a signaler.
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
|||||||
if(exonet)
|
if(exonet)
|
||||||
exonet.remove_address()
|
exonet.remove_address()
|
||||||
exonet = null
|
exonet = null
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
// Proc: ui_interact()
|
// Proc: ui_interact()
|
||||||
// Parameters: 4 (standard NanoUI arguments)
|
// Parameters: 4 (standard NanoUI arguments)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
/obj/item/device/flashlight/Destroy()
|
/obj/item/device/flashlight/Destroy()
|
||||||
if(power_use)
|
if(power_use)
|
||||||
processing_objects -= src
|
processing_objects -= src
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/device/flashlight/verb/toggle()
|
/obj/item/device/flashlight/verb/toggle()
|
||||||
set name = "Toggle Flashlight Brightness"
|
set name = "Toggle Flashlight Brightness"
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||||
if(!isnull(pai))
|
if(!isnull(pai))
|
||||||
pai.death(0)
|
pai.death(0)
|
||||||
..()
|
qdel_null(radio)
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/device/paicard/attack_self(mob/user)
|
/obj/item/device/paicard/attack_self(mob/user)
|
||||||
if (!in_range(src, user))
|
if (!in_range(src, user))
|
||||||
|
|||||||
@@ -33,10 +33,8 @@ var/global/list/active_radio_jammers = list()
|
|||||||
/obj/item/device/radio_jammer/Destroy()
|
/obj/item/device/radio_jammer/Destroy()
|
||||||
if(on)
|
if(on)
|
||||||
turn_off()
|
turn_off()
|
||||||
if(power_source)
|
qdel_null(power_source)
|
||||||
qdel(power_source)
|
return ..()
|
||||||
power_source = null
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/device/radio_jammer/proc/turn_off(mob/user)
|
/obj/item/device/radio_jammer/proc/turn_off(mob/user)
|
||||||
if(user)
|
if(user)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
/obj/structure/inflatable/Destroy()
|
/obj/structure/inflatable/Destroy()
|
||||||
update_nearby_tiles()
|
update_nearby_tiles()
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -8,9 +8,8 @@
|
|||||||
pockets.max_storage_space = ITEMSIZE_COST_SMALL * 2
|
pockets.max_storage_space = ITEMSIZE_COST_SMALL * 2
|
||||||
|
|
||||||
/obj/item/clothing/suit/storage/Destroy()
|
/obj/item/clothing/suit/storage/Destroy()
|
||||||
qdel(pockets)
|
qdel_null(pockets)
|
||||||
pockets = null
|
return ..()
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||||
if (pockets.handle_attack_hand(user))
|
if (pockets.handle_attack_hand(user))
|
||||||
|
|||||||
@@ -77,7 +77,8 @@
|
|||||||
plant_controller.remove_plant(src)
|
plant_controller.remove_plant(src)
|
||||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||||
plant_controller.add_plant(neighbor)
|
plant_controller.add_plant(neighbor)
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/effect/plant/single
|
/obj/effect/plant/single
|
||||||
spread_chance = 0
|
spread_chance = 0
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,8 @@
|
|||||||
if(exonet)
|
if(exonet)
|
||||||
exonet.remove_address()
|
exonet.remove_address()
|
||||||
qdel(exonet)
|
qdel(exonet)
|
||||||
..()
|
exonet = null
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/integrated_circuit/input/EPv2/do_work()
|
/obj/item/integrated_circuit/input/EPv2/do_work()
|
||||||
var/target_address = get_pin_data(IC_INPUT, 1)
|
var/target_address = get_pin_data(IC_INPUT, 1)
|
||||||
@@ -370,7 +371,7 @@
|
|||||||
|
|
||||||
/obj/item/integrated_circuit/input/microphone/Destroy()
|
/obj/item/integrated_circuit/input/microphone/Destroy()
|
||||||
listening_objects -= src
|
listening_objects -= src
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/integrated_circuit/input/microphone/hear_talk(mob/living/M, msg, var/verb="says", datum/language/speaking=null)
|
/obj/item/integrated_circuit/input/microphone/hear_talk(mob/living/M, msg, var/verb="says", datum/language/speaking=null)
|
||||||
var/translated = FALSE
|
var/translated = FALSE
|
||||||
@@ -483,9 +484,6 @@
|
|||||||
var/light_rgb = "#FFFFFF"
|
var/light_rgb = "#FFFFFF"
|
||||||
power_draw_idle = 0 // Adjusted based on brightness.
|
power_draw_idle = 0 // Adjusted based on brightness.
|
||||||
|
|
||||||
/obj/item/integrated_circuit/output/light/Destroy()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/integrated_circuit/output/light/do_work()
|
/obj/item/integrated_circuit/output/light/do_work()
|
||||||
light_toggled = !light_toggled
|
light_toggled = !light_toggled
|
||||||
update_lighting()
|
update_lighting()
|
||||||
@@ -644,8 +642,8 @@
|
|||||||
on_data_written()
|
on_data_written()
|
||||||
|
|
||||||
/obj/item/integrated_circuit/output/video_camera/Destroy()
|
/obj/item/integrated_circuit/output/video_camera/Destroy()
|
||||||
qdel(camera)
|
qdel_null(camera)
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/integrated_circuit/output/video_camera/proc/set_camera_status(var/status)
|
/obj/item/integrated_circuit/output/video_camera/proc/set_camera_status(var/status)
|
||||||
if(camera)
|
if(camera)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
|
|||||||
qdel(ghostimage)
|
qdel(ghostimage)
|
||||||
ghostimage = null
|
ghostimage = null
|
||||||
updateallghostimages()
|
updateallghostimages()
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/mob/observer/dead/Topic(href, href_list)
|
/mob/observer/dead/Topic(href, href_list)
|
||||||
if (href_list["track"])
|
if (href_list["track"])
|
||||||
|
|||||||
@@ -110,10 +110,8 @@
|
|||||||
if(isrobot(loc))
|
if(isrobot(loc))
|
||||||
var/mob/living/silicon/robot/borg = loc
|
var/mob/living/silicon/robot/borg = loc
|
||||||
borg.mmi = null
|
borg.mmi = null
|
||||||
if(brainmob)
|
qdel_null(brainmob)
|
||||||
qdel(brainmob)
|
return ..()
|
||||||
brainmob = null
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/device/mmi/radio_enabled
|
/obj/item/device/mmi/radio_enabled
|
||||||
name = "radio-enabled man-machine interface"
|
name = "radio-enabled man-machine interface"
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
/obj/item/weapon/gun/energy/Destroy()
|
/obj/item/weapon/gun/energy/Destroy()
|
||||||
if(self_recharge)
|
if(self_recharge)
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/process()
|
/obj/item/weapon/gun/energy/process()
|
||||||
if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the battery
|
if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the battery
|
||||||
|
|||||||
@@ -18,11 +18,7 @@
|
|||||||
unwrap()
|
unwrap()
|
||||||
|
|
||||||
proc/unwrap()
|
proc/unwrap()
|
||||||
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
// Destroy will drop our wrapped object on the turf, so let it.
|
||||||
wrapped.loc = (get_turf(src.loc))
|
|
||||||
if(istype(wrapped, /obj/structure/closet))
|
|
||||||
var/obj/structure/closet/O = wrapped
|
|
||||||
O.welded = 0
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
attackby(obj/item/W as obj, mob/user as mob)
|
attackby(obj/item/W as obj, mob/user as mob)
|
||||||
@@ -312,14 +308,15 @@
|
|||||||
|
|
||||||
/obj/structure/bigDelivery/Destroy()
|
/obj/structure/bigDelivery/Destroy()
|
||||||
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
||||||
wrapped.loc = (get_turf(loc))
|
wrapped.forceMove(get_turf(src))
|
||||||
if(istype(wrapped, /obj/structure/closet))
|
if(istype(wrapped, /obj/structure/closet))
|
||||||
var/obj/structure/closet/O = wrapped
|
var/obj/structure/closet/O = wrapped
|
||||||
O.welded = 0
|
O.welded = 0
|
||||||
|
wrapped = null
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
for(var/atom/movable/AM in contents)
|
for(var/atom/movable/AM in contents)
|
||||||
AM.loc = T
|
AM.forceMove(T)
|
||||||
..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/device/destTagger
|
/obj/item/device/destTagger
|
||||||
name = "destination tagger"
|
name = "destination tagger"
|
||||||
|
|||||||
@@ -32,13 +32,12 @@
|
|||||||
my_gen.field.Remove(src)
|
my_gen.field.Remove(src)
|
||||||
my_gen = null
|
my_gen = null
|
||||||
var/turf/current_loc = get_turf(src)
|
var/turf/current_loc = get_turf(src)
|
||||||
spawn(1) // Updates neightbors after we're gone.
|
. = ..()
|
||||||
for(var/direction in cardinal)
|
for(var/direction in cardinal)
|
||||||
var/turf/T = get_step(current_loc, direction)
|
var/turf/T = get_step(current_loc, direction)
|
||||||
if(T)
|
if(T)
|
||||||
for(var/obj/effect/energy_field/F in T)
|
for(var/obj/effect/energy_field/F in T)
|
||||||
F.update_icon()
|
F.update_icon()
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/effect/energy_field/ex_act(var/severity)
|
/obj/effect/energy_field/ex_act(var/severity)
|
||||||
adjust_strength(-(4 - severity) * 4)
|
adjust_strength(-(4 - severity) * 4)
|
||||||
|
|||||||
@@ -38,10 +38,8 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/shield_gen/Destroy()
|
/obj/machinery/shield_gen/Destroy()
|
||||||
for(var/obj/effect/energy_field/D in field)
|
qdel_null_list(field)
|
||||||
field.Remove(D)
|
return ..()
|
||||||
D.loc = null
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/machinery/shield_gen/emag_act(var/remaining_charges, var/mob/user)
|
/obj/machinery/shield_gen/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
|
|||||||
Reference in New Issue
Block a user