/* While these computers can be placed anywhere, they will only function if placed on either a non-space, non-shuttle turf with an /obj/effect/overmap/visitable/ship present elsewhere on that z level, or else placed in a shuttle area with an /obj/effect/overmap/visitable/ship somewhere on that shuttle. Subtypes of these can be then used to perform ship overmap movement functions. */ /obj/machinery/computer/ship var/obj/effect/overmap/visitable/ship/linked var/list/viewers // Weakrefs to mobs in direct-view mode. var/extra_view = 0 // how much the view is increased by when the mob is in overmap mode. // A late init operation called in SSshuttles, used to attach the thing to the right ship. /obj/machinery/computer/ship/proc/attempt_hook_up(obj/effect/overmap/visitable/ship/sector) if(!istype(sector)) return if(sector.check_ownership(src)) linked = sector return 1 /obj/machinery/computer/ship/proc/sync_linked(var/user = null) var/obj/effect/overmap/visitable/ship/sector = get_overmap_sector(z) if(!sector) return . = attempt_hook_up_recursive(sector) if(. && linked && user) to_chat(user, span_notice("[src] reconnected to [linked]")) user << browse(null, "window=[src]") // close reconnect dialog /obj/machinery/computer/ship/proc/attempt_hook_up_recursive(obj/effect/overmap/visitable/ship/sector) if(attempt_hook_up(sector)) return sector for(var/obj/effect/overmap/visitable/ship/candidate in sector) if((. = .(candidate))) return /obj/machinery/computer/ship/proc/display_reconnect_dialog(var/mob/user, var/flavor) var/datum/browser/popup = new (user, "[src]", "[src]") if(viewing_overmap(user)) user.reset_perspective() popup.set_content("