Add feedback to user if successful when reconnecting ship computers to ship.

This commit is contained in:
Leshana
2020-04-05 10:05:39 -04:00
parent f23af78ae9
commit 13d4144bc1

View File

@@ -16,11 +16,14 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
linked = sector linked = sector
return 1 return 1
/obj/machinery/computer/ship/proc/sync_linked() /obj/machinery/computer/ship/proc/sync_linked(var/user = null)
var/obj/effect/overmap/visitable/ship/sector = map_sectors["[z]"] var/obj/effect/overmap/visitable/ship/sector = map_sectors["[z]"]
if(!sector) if(!sector)
return return
return attempt_hook_up_recursive(sector) . = attempt_hook_up_recursive(sector)
if(. && linked && user)
to_chat(user, "<span class='notice'>[src] reconnected to [linked]</span>")
user << browse(null, "window=[src]") // close reconnect dialog
/obj/machinery/computer/ship/proc/attempt_hook_up_recursive(obj/effect/overmap/visitable/ship/sector) /obj/machinery/computer/ship/proc/attempt_hook_up_recursive(obj/effect/overmap/visitable/ship/sector)
if(attempt_hook_up(sector)) if(attempt_hook_up(sector))
@@ -43,7 +46,7 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
if(..()) if(..())
return TOPIC_HANDLED return TOPIC_HANDLED
if(href_list["sync"]) if(href_list["sync"])
sync_linked() sync_linked(user)
return TOPIC_REFRESH return TOPIC_REFRESH
if(href_list["close"]) if(href_list["close"])
unlook(user) unlook(user)