From 3a196c181264aa25b2fae9c010880861fc9963df Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 4 Mar 2015 14:30:33 +0100 Subject: [PATCH 1/3] Re-add door forcing sound --- code/game/machinery/doors/airlock.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index e24a798ec97..a7ce13d419e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -873,7 +873,9 @@ About the new airlock wires panel: if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) ) return 0 use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people - if(istype(src, /obj/machinery/door/airlock/glass)) + if(forced) + playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) + else if(istype(src, /obj/machinery/door/airlock/glass)) playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1) else if(istype(src, /obj/machinery/door/airlock/clown)) playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1) @@ -902,8 +904,14 @@ About the new airlock wires panel: return use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people - if(istype(src, /obj/machinery/door/airlock/glass)) + if(forced) + playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) + else if(istype(src, /obj/machinery/door/airlock/glass)) playsound(src.loc, 'sound/machines/windowdoor.ogg', 30, 1) + else if(istype(src, /obj/machinery/door/airlock/clown)) + playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1) + else if(istype(src, /obj/machinery/door/airlock/mime)) + // Do nothing else playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1) for(var/turf/turf in locs) From 691fef1ff02f932e08739719ee27535ed33ff055 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 4 Mar 2015 14:47:45 +0100 Subject: [PATCH 2/3] Fix player panel --- code/modules/mob/living/silicon/ai/ai.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index d5805617b5c..f0d33c40a04 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -160,7 +160,7 @@ var/list/ai_verbs_default = list( if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. new/obj/structure/AIcore/deactivated(loc)//New empty terminal. - del(src)//Delete AI. + qdel(src)//Delete AI. return else if (B.brainmob.mind) From 6352d2abd92608521e5ec21fd8b95e81ddc4439b Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 4 Mar 2015 15:09:12 +0100 Subject: [PATCH 3/3] Remove qdel from ghost images, clarify qdel debug, nanoUI runtime fix --- code/controllers/garbage.dm | 14 +++++++++----- code/datums/mind.dm | 4 ++-- code/game/gamemodes/blob/overmind.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 2 +- code/modules/mob/living/silicon/ai/freelook/eye.dm | 2 +- code/modules/nano/nanomanager.dm | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/controllers/garbage.dm b/code/controllers/garbage.dm index 3c96126c0f1..f488ea92aa0 100644 --- a/code/controllers/garbage.dm +++ b/code/controllers/garbage.dm @@ -3,13 +3,19 @@ #define GC_FORCE_DEL_PER_TICK 60 //#define GC_DEBUG -var/list/gc_hard_del_types = new +var/list/gc_hard_del_types = list() var/datum/garbage_collector/garbageCollector /client/proc/gc_dump_hdl() set name = "(GC) Hard Del List" set desc = "List types that are hard del()'d by the GC." set category = "Debug" + + if(!check_rights(R_DEBUG)) + return + + if(!gc_hard_del_types || !gc_hard_del_types.len) + usr << "No hard del()'d types found." for(var/A in gc_hard_del_types) usr << "[A] = [gc_hard_del_types[A]]" @@ -60,8 +66,7 @@ var/datum/garbage_collector/garbageCollector #endif AM.hard_deleted = 1 - if(!AM.type in gc_hard_del_types) - gc_hard_del_types += AM.type + gc_hard_del_types |= AM.type del AM hard_dels++ @@ -95,8 +100,7 @@ var/datum/garbage_collector/garbageCollector if(!istype(AM)) WARNING("qdel() passed object of type [AM.type]. qdel() can only handle /atom/movable types.") - if(!AM.type in gc_hard_del_types) - gc_hard_del_types += AM.type + gc_hard_del_types |= AM.type del(AM) garbageCollector.hard_dels++ garbageCollector.dels_count++ diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 905d47d36b8..2b0482bd57f 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -72,11 +72,11 @@ datum/mind if(current) //remove ourself from our old body's mind variable current.mind = null + nanomanager.user_transferred(current, new_character) + if(new_character.mind) //remove any mind currently in our new body's mind variable new_character.mind.current = null - nanomanager.user_transferred(current, new_character) - current = new_character //link ourself to our new body new_character.mind = src //and link our new body to ourself diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 37b70de409a..c5be700afd4 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -30,7 +30,7 @@ /mob/camera/blob/Destroy() if (ghostimage) ghost_darkness_images -= ghostimage - qdel(ghostimage) + del(ghostimage) ghostimage = null; updateallghostimages() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 87b60348e03..7ae495373e3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -89,7 +89,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi /mob/dead/observer/Destroy() if (ghostimage) ghost_darkness_images -= ghostimage - qdel(ghostimage) + del(ghostimage) ghostimage = null updateallghostimages() ..() diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 50b60912107..01945aa86fd 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -26,7 +26,7 @@ /mob/aiEye/Destroy() if (ghostimage) ghost_darkness_images -= ghostimage - qdel(ghostimage) + del(ghostimage) ghostimage = null; updateallghostimages() diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 1fd76dcf726..bb73178e94a 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -220,7 +220,7 @@ */ /datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob) //testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]") - if (isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) + if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/user_transferred mob [oldMob.name] has no open uis") return 0 // has no open uis