mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 22:43:46 +00:00
tgui: AI system integrity restorer (#49828)
* AI fixer UI * Cleanup * Polish
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
tgui_id = "ntos_ai_restorer"
|
||||
ui_x = 370
|
||||
ui_y = 400
|
||||
|
||||
/// Variable dictating if we are in the process of restoring the AI in the inserted intellicard
|
||||
var/restoring = FALSE
|
||||
|
||||
/datum/computer_file/program/aidiag/proc/get_ai(cardcheck)
|
||||
@@ -95,8 +95,10 @@
|
||||
|
||||
var/obj/item/aicard/aicard = get_ai(2)
|
||||
|
||||
data["ejectable"] = TRUE
|
||||
data["AI_present"] = FALSE
|
||||
data["error"] = null
|
||||
if(!aicard)
|
||||
data["nocard"] = TRUE
|
||||
data["error"] = "Please insert an intelliCard."
|
||||
else
|
||||
if(!AI)
|
||||
@@ -106,12 +108,12 @@
|
||||
if(cardhold.flush)
|
||||
data["error"] = "Flush in progress"
|
||||
else
|
||||
data["AI_present"] = TRUE
|
||||
data["name"] = AI.name
|
||||
data["restoring"] = restoring
|
||||
data["laws"] = AI.laws.get_law_list(include_zeroth = 1)
|
||||
data["health"] = (AI.health + 100) / 2
|
||||
data["isDead"] = AI.stat == DEAD
|
||||
data["ai_laws"] = AI.laws.get_law_list(include_zeroth = 1)
|
||||
data["laws"] = AI.laws.get_law_list(include_zeroth = 1)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user