tgui: AI system integrity restorer (#49828)

* AI fixer UI

* Cleanup

* Polish
This commit is contained in:
Arkatos1
2020-03-10 06:12:13 +01:00
committed by GitHub
parent ff60448f0c
commit e9bc48632c
6 changed files with 148 additions and 167 deletions

View File

@@ -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