mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Merge branch 'master' into nanomaps-github-action
This commit is contained in:
@@ -85,7 +85,7 @@ GLOBAL_DATUM_INIT(default_state, /datum/topic_state/default, new())
|
||||
if(. != STATUS_CLOSE)
|
||||
if(loc)
|
||||
. = min(., loc.contents_nano_distance(src_object, src))
|
||||
if(STATUS_INTERACTIVE)
|
||||
if(. == STATUS_INTERACTIVE)
|
||||
return STATUS_UPDATE
|
||||
|
||||
/mob/living/carbon/brain/default_can_use_topic(var/src_object)
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/datum/nano_module/crew_monitor
|
||||
name = "Crew monitor"
|
||||
|
||||
/datum/nano_module/crew_monitor/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
var/turf/T = get_turf(nano_host())
|
||||
if(!T || !is_level_reachable(T.z))
|
||||
to_chat(usr, "<span class='warning'><b>Unable to establish a connection</b>: You're too far away from the station!</span>")
|
||||
return 0
|
||||
if(href_list["track"])
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/mob/living/carbon/human/H = locate(href_list["track"]) in GLOB.mob_list
|
||||
if(hassensorlevel(H, SUIT_SENSOR_TRACKING))
|
||||
AI.ai_actual_track(H)
|
||||
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 = GLOB.default_state)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800)
|
||||
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
|
||||
|
||||
ui.open()
|
||||
|
||||
// should make the UI auto-update; doesn't seem to?
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/crew_monitor/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
var/turf/T = get_turf(nano_host())
|
||||
|
||||
data["isAI"] = isAI(user)
|
||||
data["crewmembers"] = GLOB.crew_repository.health_data(T)
|
||||
|
||||
return data
|
||||
@@ -99,7 +99,7 @@
|
||||
if(href_list["change_supplied_law_position"])
|
||||
var/new_position = input(usr, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position) as num|null
|
||||
if(isnum(new_position) && can_still_topic())
|
||||
supplied_law_position = Clamp(new_position, 1, MAX_SUPPLIED_LAW_NUMBER)
|
||||
supplied_law_position = clamp(new_position, 1, MAX_SUPPLIED_LAW_NUMBER)
|
||||
return 1
|
||||
|
||||
if(href_list["edit_law"])
|
||||
|
||||
Reference in New Issue
Block a user