diff --git a/nsv13/code/controllers/subsystem/starsystem.dm b/nsv13/code/controllers/subsystem/starsystem.dm index 624fd95c753..40460bf848d 100644 --- a/nsv13/code/controllers/subsystem/starsystem.dm +++ b/nsv13/code/controllers/subsystem/starsystem.dm @@ -296,7 +296,6 @@ Returns a faction datum by its name (case insensitive!) return system /datum/controller/subsystem/star_system/proc/spawn_ship(obj/structure/overmap/OM, datum/star_system/target_sys, center=FALSE)//Select Ship to Spawn and Location via Z-Trait - target_sys.system_contents += OM if(target_sys.occupying_z) var/turf/destination = null if(center) @@ -689,12 +688,12 @@ Returns a faction datum by its name (case insensitive!) START_PROCESSING(SSfastprocess, src) /obj/effect/overmap_anomaly/singularity/process() - if(!z) //Not in nullspace + if(!z || !current_system) //Not in nullspace if(length(affecting)) for(var/obj/structure/overmap/OM in affecting) stop_affecting(OM) return - for(var/obj/structure/overmap/OM as() in GLOB.overmap_objects) //Has to go through global overmaps due to anomalies not referencing their system - probably something to change one day. + for(var/obj/structure/overmap/OM in current_system.system_contents) //This list is not exclusively overmaps so no as() calls. if(LAZYFIND(affecting, OM)) continue if(OM.z != z) diff --git a/nsv13/code/modules/overmap/FTL/ftl_jump.dm b/nsv13/code/modules/overmap/FTL/ftl_jump.dm index bcdfc6b9120..887cd18b4b1 100644 --- a/nsv13/code/modules/overmap/FTL/ftl_jump.dm +++ b/nsv13/code/modules/overmap/FTL/ftl_jump.dm @@ -40,6 +40,9 @@ if(istype(OM, /obj/structure/overmap)) OM.current_system = src //Debugging purposes only after_enter(OM) + else if(istype(OM, /obj/effect/overmap_anomaly)) + var/obj/effect/overmap_anomaly/anomaly_OM = OM + anomaly_OM.current_system = src /datum/star_system/proc/after_enter(obj/structure/overmap/OM) SEND_SIGNAL(src, COMSIG_STAR_SYSTEM_AFTER_ENTER, OM) diff --git a/nsv13/code/modules/overmap/physics.dm b/nsv13/code/modules/overmap/physics.dm index 99665fffe79..c0e4e7b3917 100644 --- a/nsv13/code/modules/overmap/physics.dm +++ b/nsv13/code/modules/overmap/physics.dm @@ -596,6 +596,10 @@ This proc is to be used when someone gets stuck in an overmap ship, gauss, WHATE if(!z || QDELETED(src)) return FALSE var/turf/T = get_center() + if(!T) //Might be at map edge. + T = get_turf(src) + if(!T) //Abort. + return FALSE var/obj/item/projectile/proj = new proj_type(T) if(ai_aim && !proj.can_home && !proj.hitscan) target = calculate_intercept(target, proj, miss_chance=miss_chance, max_miss_distance=max_miss_distance)