mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Fixes crew monitor runtime and removes dead code.
The crew monitor used src instead of nano_host(). Also removes unneeded Topic() href.
This commit is contained in:
@@ -3,17 +3,11 @@
|
|||||||
var/list/tracked = new
|
var/list/tracked = new
|
||||||
|
|
||||||
/datum/nano_module/crew_monitor/Topic(href, href_list)
|
/datum/nano_module/crew_monitor/Topic(href, href_list)
|
||||||
if(..()) return
|
if(..()) return 1
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(nano_host()) // TODO: Allow setting any config.contact_levels from the interface.
|
||||||
if (!T || !(T.z in config.player_levels))
|
if (!T || !(T.z in config.player_levels))
|
||||||
usr << "<span class='warning'>Unable to establish a connection</span>: You're too far away from the station!"
|
usr << "<span class='warning'>Unable to establish a connection</span>: You're too far away from the station!"
|
||||||
return 0
|
return 0
|
||||||
if(href_list["close"] )
|
|
||||||
var/mob/user = usr
|
|
||||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
|
||||||
usr.unset_machine()
|
|
||||||
ui.close()
|
|
||||||
return 0
|
|
||||||
if(href_list["track"])
|
if(href_list["track"])
|
||||||
if(usr.isMobAI())
|
if(usr.isMobAI())
|
||||||
var/mob/living/silicon/ai/AI = usr
|
var/mob/living/silicon/ai/AI = usr
|
||||||
@@ -23,11 +17,11 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
/datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||||
user.set_machine(src)
|
// TODO: Move this to a singleton instance that does the scan every X seconds (if the info is being requested), to offer some antag balance and to reduce load in the case of multiple viewers.
|
||||||
src.scan()
|
src.scan()
|
||||||
|
|
||||||
var/data[0]
|
var/data[0]
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(nano_host())
|
||||||
var/list/crewmembers = list()
|
var/list/crewmembers = list()
|
||||||
for(var/obj/item/clothing/under/C in src.tracked)
|
for(var/obj/item/clothing/under/C in src.tracked)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user