mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Add feedback to user if successful when reconnecting ship computers to ship.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user