mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +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,7 +46,8 @@
|
||||
if(atmosblock)
|
||||
air_update_turf(TRUE, TRUE)
|
||||
ConsumeTile()
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_BLOB, CELL_VIRUS_TABLE_GENERIC, 2, 2)
|
||||
if(!QDELETED(src)) //Consuming our tile can in rare cases cause us to del
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_BLOB, CELL_VIRUS_TABLE_GENERIC, 2, 2)
|
||||
|
||||
/obj/structure/blob/proc/creation_action() //When it's created by the overmind, do this.
|
||||
return
|
||||
|
||||
@@ -359,9 +359,10 @@
|
||||
var/datum/action/innate/cult/blood_spell/source
|
||||
|
||||
/obj/item/melee/blood_magic/New(loc, spell)
|
||||
source = spell
|
||||
uses = source.charges
|
||||
health_cost = source.health_cost
|
||||
if(spell)
|
||||
source = spell
|
||||
uses = source.charges
|
||||
health_cost = source.health_cost
|
||||
..()
|
||||
|
||||
/obj/item/melee/blood_magic/Destroy()
|
||||
@@ -376,7 +377,7 @@
|
||||
source.desc = source.base_desc
|
||||
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
|
||||
source.UpdateButtonIcon()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/blood_magic/attack_self(mob/living/user)
|
||||
afterattack(user, user, TRUE)
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
/obj/item/ectoplasm/revenant/Destroy()
|
||||
if(!QDELETED(revenant))
|
||||
qdel(revenant)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//objectives
|
||||
/datum/objective/revenant
|
||||
|
||||
@@ -305,10 +305,10 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
|
||||
/obj/machinery/doomsday_device/Initialize()
|
||||
. = ..()
|
||||
owner = loc
|
||||
if(!istype(owner))
|
||||
if(!isAI(loc))
|
||||
stack_trace("Doomsday created outside an AI somehow, shit's fucking broke. Anyway, we're just gonna qdel now. Go make a github issue report.")
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
owner = loc
|
||||
countdown = new(src)
|
||||
|
||||
/obj/machinery/doomsday_device/Destroy()
|
||||
@@ -318,7 +318,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
SSmapping.remove_nuke_threat(src)
|
||||
set_security_level("red")
|
||||
for(var/mob/living/silicon/robot/borg in owner.connected_robots)
|
||||
for(var/mob/living/silicon/robot/borg in owner?.connected_robots)
|
||||
borg.lamp_doom = FALSE
|
||||
borg.toggle_headlamp(FALSE, TRUE) //forces borg lamp to update
|
||||
owner?.doomsday_device = null
|
||||
|
||||
Reference in New Issue
Block a user