mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Del The World: Unit testing for hard deletes (#59612)
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
co-authored by
SteelSlayer
parent
0304206af3
commit
cd576ab519
@@ -46,4 +46,4 @@ GLOBAL_LIST(gang_tags)
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
LAZYREMOVE(GLOB.gang_tags, src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/obj/effect/shield/Destroy()
|
||||
var/turf/location = get_turf(src)
|
||||
location.heat_capacity=old_heat_capacity
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/shield/singularity_act()
|
||||
return
|
||||
|
||||
@@ -173,5 +173,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/dummy/chameleon/Destroy()
|
||||
master.disrupt(0)
|
||||
if(master)
|
||||
master.disrupt(0)
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
@@ -113,8 +113,9 @@
|
||||
/obj/structure/projected_forcefield/Destroy()
|
||||
visible_message(span_warning("[src] flickers and disappears!"))
|
||||
playsound(src,'sound/weapons/resonator_blast.ogg',25,TRUE)
|
||||
generator.current_fields -= src
|
||||
generator = null
|
||||
if(generator)
|
||||
generator.current_fields -= src
|
||||
generator = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/projected_forcefield/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
@@ -123,4 +124,5 @@
|
||||
/obj/structure/projected_forcefield/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
if(sound_effect)
|
||||
play_attack_sound(damage_amount, damage_type, damage_flag)
|
||||
generator.shield_integrity = max(generator.shield_integrity - damage_amount, 0)
|
||||
if(generator)
|
||||
generator.shield_integrity = max(generator.shield_integrity - damage_amount, 0)
|
||||
|
||||
@@ -263,6 +263,9 @@
|
||||
|
||||
|
||||
/obj/item/food/deepfryholder/Initialize(mapload, obj/item/fried)
|
||||
if(!fried)
|
||||
stack_trace("A deepfried object was created with no fried target")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
. = ..()
|
||||
name = fried.name //We'll determine the other stuff when it's actually removed
|
||||
appearance = fried.appearance
|
||||
|
||||
@@ -70,7 +70,8 @@
|
||||
/////////////////////////////////
|
||||
/obj/effect/payload_spawner/Initialize(mapload, type, numspawned)
|
||||
..()
|
||||
spawn_payload(type, numspawned)
|
||||
if(type && isnum(numspawned))
|
||||
spawn_payload(type, numspawned)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/payload_spawner/proc/spawn_payload(type, numspawned)
|
||||
|
||||
@@ -505,10 +505,11 @@
|
||||
/obj/item/borg/upgrade/defib/backpack/proc/on_defib_instance_qdel_or_moved(obj/item/defibrillator/D)
|
||||
SIGNAL_HANDLER
|
||||
defib_instance = null
|
||||
qdel(src)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/borg/upgrade/defib/backpack/Destroy()
|
||||
if(defib_instance)
|
||||
if(!QDELETED(defib_instance))
|
||||
QDEL_NULL(defib_instance)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -237,9 +237,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
/obj/item/claymore/highlander/robot/Initialize()
|
||||
var/obj/item/robot_model/kiltkit = loc
|
||||
robot = kiltkit.loc
|
||||
. = ..()
|
||||
if(!istype(robot))
|
||||
qdel(src)
|
||||
return ..()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/claymore/highlander/robot/process()
|
||||
loc.layer = LARGE_MOB_LAYER
|
||||
|
||||
@@ -112,6 +112,9 @@
|
||||
var/obj/machinery/computer/camera_advanced/base_construction/linked_console
|
||||
|
||||
/mob/camera/ai_eye/remote/base_construction/Initialize(mapload, obj/machinery/computer/camera_advanced/console_link)
|
||||
if(!linked_console)
|
||||
stack_trace("A base consturuction drone was created with no linked console")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
linked_console = console_link
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/Destroy()
|
||||
recursive_organ_check(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/obj/machinery/deployable_turret/Destroy()
|
||||
target = null
|
||||
target_turf = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/// Undeploying, for when you want to move your big dakka around
|
||||
/obj/machinery/deployable_turret/wrench_act(mob/living/user, obj/item/wrench/used_wrench)
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
/obj/item/gun_control/Destroy()
|
||||
turret = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun_control/CanItemAutoclick()
|
||||
return TRUE
|
||||
|
||||
@@ -458,6 +458,10 @@ GLOBAL_DATUM(central_tram, /obj/structure/industrial_lift/tram/central)
|
||||
SStramprocess.can_fire = TRUE
|
||||
GLOB.central_tram = src
|
||||
|
||||
/obj/structure/industrial_lift/tram/central/Destroy()
|
||||
GLOB.central_tram = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/industrial_lift/tram/LateInitialize()
|
||||
. = ..()
|
||||
find_our_location()
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
|
||||
/obj/structure/trap/stun/hunter/flare()
|
||||
..()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
if(!our_turf)
|
||||
return
|
||||
stored_item.forceMove(get_turf(src))
|
||||
forceMove(stored_item)
|
||||
if(caught)
|
||||
|
||||
Reference in New Issue
Block a user