Skip to content

Commit

Permalink
Some more overmap fixes (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaFire15 authored Dec 17, 2024
1 parent 16fab68 commit d569e28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nsv13/code/controllers/subsystem/starsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions nsv13/code/modules/overmap/FTL/ftl_jump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions nsv13/code/modules/overmap/physics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d569e28

Please sign in to comment.