mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 21:56:55 +01:00
Adds an overmap helper to find what sector you're in
This commit is contained in:
@@ -55,14 +55,14 @@
|
||||
if(!istype(docking_controller))
|
||||
log_error("Could not find docking controller for shuttle waypoint '[name]', docking tag was '[docking_tag]'.")
|
||||
if(using_map.use_overmap)
|
||||
var/obj/effect/overmap/visitable/location = map_sectors["[z]"]
|
||||
var/obj/effect/overmap/visitable/location = get_overmap_sector(z)
|
||||
if(location && location.docking_codes)
|
||||
docking_controller.docking_codes = location.docking_codes
|
||||
|
||||
/obj/effect/shuttle_landmark/forceMove()
|
||||
var/obj/effect/overmap/visitable/map_origin = map_sectors["[z]"]
|
||||
var/obj/effect/overmap/visitable/map_origin = get_overmap_sector(z)
|
||||
. = ..()
|
||||
var/obj/effect/overmap/visitable/map_destination = map_sectors["[z]"]
|
||||
var/obj/effect/overmap/visitable/map_destination = get_overmap_sector(z)
|
||||
if(map_origin != map_destination)
|
||||
if(map_origin)
|
||||
map_origin.remove_landmark(src, shuttle_restricted)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(active_docking_controller)
|
||||
set_docking_codes(active_docking_controller.docking_codes)
|
||||
else if(global.using_map.use_overmap)
|
||||
var/obj/effect/overmap/visitable/location = map_sectors["[current_location.z]"]
|
||||
var/obj/effect/overmap/visitable/location = get_overmap_sector(get_z(current_location))
|
||||
if(location && location.docking_codes)
|
||||
set_docking_codes(location.docking_codes)
|
||||
dock()
|
||||
|
||||
@@ -166,7 +166,7 @@ GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/weapon/paper/dockingcodes)
|
||||
var/dockingcodes = null
|
||||
var/z_to_check = codes_from_z ? codes_from_z : z
|
||||
if(using_map.use_overmap)
|
||||
var/obj/effect/overmap/visitable/location = map_sectors["[z_to_check]"]
|
||||
var/obj/effect/overmap/visitable/location = get_overmap_sector(z_to_check)
|
||||
if(location && location.docking_codes)
|
||||
dockingcodes = location.docking_codes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user