diff --git a/code/controllers/subsystem/explosion.dm b/code/controllers/subsystem/explosion.dm index f038003535e..81917b103bf 100644 --- a/code/controllers/subsystem/explosion.dm +++ b/code/controllers/subsystem/explosion.dm @@ -615,7 +615,7 @@ SUBSYSTEM_DEF(explosions) var/throw_dir = L[2] var/max_range = L[3] for(var/atom/movable/A in T) - if(!A.anchored && A.move_resist != INFINITY) + if(!QDELETED(A) && !A.anchored && A.move_resist != INFINITY) //NSV13 - also check for QDELETED var/atom_throw_range = rand(throw_range, max_range) var/turf/throw_at = get_ranged_target_turf(A, throw_dir, atom_throw_range) A.throw_at(throw_at, atom_throw_range, EXPLOSION_THROW_SPEED, quickstart = FALSE) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index c6e307add8b..e5b7cec1a87 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -467,7 +467,7 @@ ///Is the passed in mob an admin ghost /proc/IsAdminGhost(var/mob/user) - if(!user) //Are they a mob? Auto interface updates call this with a null src + if(!user || !ismob(user)) //Are they a mob? Auto interface updates call this with a null src //NSV13 - you DO know sending the wrong type is NOT equal to null, RIGHT? return if(!user.client) // Do they have a client? return diff --git a/nsv13/code/game/machinery/computer/_ship.dm b/nsv13/code/game/machinery/computer/_ship.dm index a8ea43f338b..4493dfdf534 100644 --- a/nsv13/code/game/machinery/computer/_ship.dm +++ b/nsv13/code/game/machinery/computer/_ship.dm @@ -86,10 +86,12 @@ GLOBAL_LIST_INIT(computer_beeps, list('nsv13/sound/effects/computer/beep.ogg','n return ..() /obj/machinery/computer/ship/Destroy() - . = ..() for(var/mob/living/M in ui_users) ui_close(M) linked?.stop_piloting(M) + linked = null + ui_users = null //drop list to the GC + return ..() //Viewscreens for regular crew to watch combat /obj/machinery/computer/ship/viewscreen diff --git a/nsv13/code/game/machinery/computer/helm.dm b/nsv13/code/game/machinery/computer/helm.dm index d10f797bb82..94f1e5d6a86 100644 --- a/nsv13/code/game/machinery/computer/helm.dm +++ b/nsv13/code/game/machinery/computer/helm.dm @@ -10,7 +10,8 @@ req_one_access = list(ACCESS_SYNDICATE) /obj/machinery/computer/ship/helm/Destroy() - linked?.helm = null + if(linked && linked.helm == src) + linked.helm = null return ..() /obj/machinery/computer/ship/helm/set_position(obj/structure/overmap/OM) diff --git a/nsv13/code/game/machinery/computer/tactical.dm b/nsv13/code/game/machinery/computer/tactical.dm index ea70855dd8f..040da31c199 100644 --- a/nsv13/code/game/machinery/computer/tactical.dm +++ b/nsv13/code/game/machinery/computer/tactical.dm @@ -7,7 +7,8 @@ circuit = /obj/item/circuitboard/computer/ship/tactical_computer /obj/machinery/computer/ship/tactical/Destroy() - linked?.tactical = null + if(linked && linked.tactical == src) + linked.tactical = null return ..() /obj/machinery/computer/ship/tactical/ui_interact(mob/user, datum/tgui/ui) diff --git a/nsv13/code/modules/overmap/overmap.dm b/nsv13/code/modules/overmap/overmap.dm index 6eec8dbcc49..86da1c84a30 100644 --- a/nsv13/code/modules/overmap/overmap.dm +++ b/nsv13/code/modules/overmap/overmap.dm @@ -93,7 +93,6 @@ var/backward_maxthrust = 3 var/side_maxthrust = 1 var/mass = MASS_SMALL //The "mass" variable will scale the movespeed according to how large the ship is. - var/landing_gear = FALSE //Allows you to move in atmos without scraping the hell outta your ship var/bump_impulse = 0.6 var/bounce_factor = 0.7 // how much of our velocity to keep on collision @@ -118,8 +117,18 @@ var/list/beacons_in_ship = list() // Controlling equipment - var/obj/machinery/computer/ship/helm //Relay beeping noises when we act - var/obj/machinery/computer/ship/tactical + + /* + These are probably more okay not being lists since only one person can control either of these two slots at a time. + */ + var/obj/machinery/computer/ship/helm/helm //Relay beeping noises when we act + var/obj/machinery/computer/ship/tactical/tactical + + /* + || THIS SHOULD BE A LIST, there could be a billion dradises that can keep fighting for which one is considered the ship dradis any time someone interacts with one!!! + || When you change this, also change the reference cleaning on del for this var from being on the dradis to being on the ship listening for the console's QDEL signal. + \/ I'm not feeling like refactoring that right now though. Maybe in the future. -Delta + */ var/obj/machinery/computer/ship/dradis/dradis //So that pilots can check the radar easily // Ship weapons diff --git a/nsv13/code/modules/overmap/physics.dm b/nsv13/code/modules/overmap/physics.dm index 6bb334ff21a..eee33df53e2 100644 --- a/nsv13/code/modules/overmap/physics.dm +++ b/nsv13/code/modules/overmap/physics.dm @@ -624,6 +624,9 @@ This proc is to be used when someone gets stuck in an overmap ship, gauss, WHATE if(isovermap(proj.homing_target)) var/obj/structure/overmap/overmap_target = proj.homing_target overmap_target.on_missile_lock(src, proj) + + LAZYINITLIST(proj.impacted) //The spawn call after this might be causing some issues so the list should exist before async actions. + spawn() proj.preparePixelProjectileOvermap(target, src, null, round((rand() - 0.5) * proj.spread), lateral=lateral) proj.fire() diff --git a/nsv13/code/modules/overmap/radar.dm b/nsv13/code/modules/overmap/radar.dm index 27ac3630bbf..b619f4bda09 100644 --- a/nsv13/code/modules/overmap/radar.dm +++ b/nsv13/code/modules/overmap/radar.dm @@ -105,6 +105,11 @@ Called by add_sensor_profile_penalty if remove_in is used. if(beacon) . += "It's currently linked to [beacon] in [get_area(beacon)]. You can use a multitool to switch whether it delivers here, or to your cargo bay." +/obj/machinery/computer/ship/dradis/Destroy() + if(linked && linked.dradis == src) + linked.dradis = null //clean ref. Usually the ship would register this deleting and handle the del there instead, but overmap reference code is so decentralized I am not refactoring that right now. + return ..() + /obj/machinery/computer/ship/dradis/attackby(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/supplypod_beacon)) var/obj/item/supplypod_beacon/sb = W