Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit f00e2f7

Browse files
committed
Well, that was a simple fix
1 parent faf8fdc commit f00e2f7

File tree

3 files changed

+19
-31
lines changed

3 files changed

+19
-31
lines changed

code/modules/mob/living/silicon/pai/pai.dm

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
hud_type = /datum/hud/pai
88
pass_flags = PASSTABLE | PASSMOB
99
mob_size = MOB_SIZE_TINY
10-
desc = "A generic pAI mobile hard-light holographics emitter. It seems to be deactivated."
10+
desc = "A generic pAI mobile hard-light holographics emitter. It seems to be activated."
1111
weather_immunities = WEATHER_STORM
1212
light_on = FALSE
1313
light_flags = LIGHT_ATTACHED
@@ -118,7 +118,6 @@
118118

119119
. = ..()
120120

121-
create_modularInterface()
122121
emittersemicd = TRUE
123122
addtimer(CALLBACK(src, PROC_REF(emittercool)), 600)
124123

@@ -274,9 +273,9 @@
274273
. = ..()
275274
. += "A personal AI in holochassis mode. Its master ID string seems to be [master ? master : "empty"]."
276275
if(software && isobserver(user))
277-
. += "<b>[src] has the following modules:"
278-
for(var/list/module in software)
279-
. += "[module["module_name"]]"
276+
. += "<b>[src] has the following modules:</b>"
277+
for(var/module in software)
278+
. += "[module]"
280279

281280
/mob/living/silicon/pai/Life(seconds_per_tick = SSMOBS_DT, times_fired)
282281
if(stat == DEAD)
@@ -287,7 +286,7 @@
287286
T.visible_message(span_warning("[src.cable] rapidly retracts back into its spool."), span_italics("You hear a click and the sound of wire spooling rapidly."))
288287
qdel(src.cable)
289288
cable = null
290-
cable_status = PAI_CABLE_RETRACTED
289+
cable_status = "Retracted"
291290
silent = max(silent - 1, 0)
292291
. = ..()
293292

@@ -319,5 +318,5 @@
319318
copy_access(id_card, user)
320319

321320
/mob/living/silicon/pai/proc/copy_access(obj/item/card/id/ID, mob/user)
322-
pai.access_card.access += ID.access
321+
access_card.access += ID.access
323322
to_chat(user, "Copied access from [ID]!")

code/modules/mob/living/silicon/pai/software.dm

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// - Potentially roll HUDs and Records into one
33
// - Shock collar/lock system for prisoner pAIs?
44
// - Camera jack
5-
#define PAI_CABLE_RETRACTED 0
6-
#define PAI_CABLE_EXTENDED 1
7-
85
/mob/living/silicon/pai/var/list/available_software = list(
96
//Nightvision
107
//T-Ray
@@ -40,7 +37,7 @@
4037
/mob/living/silicon/pai/var/pressure
4138
/mob/living/silicon/pai/var/gases
4239

43-
/mob/living/silicon/pai/var/cable_status = PAI_CABLE_RETRACTED
40+
/mob/living/silicon/pai/var/cable_status = "Retracted"
4441

4542
/mob/living/silicon/pai/var/list/med_record = list()
4643
/mob/living/silicon/pai/var/list/sec_record = list()
@@ -73,10 +70,7 @@
7370
data["hacking"] = hacking
7471
data["hackprogress"] = hackprogress
7572
data["cable"] = cable_status
76-
if(isnull(cable))
77-
data["door"] = null
78-
else
79-
data["door"] = cable.machine
73+
data["door"] = isnull(cable) ? null : cable.machine
8074
data["code"] = signaler.code
8175
data["frequency"] = signaler.frequency
8276
data["minFrequency"] = MIN_FREE_FREQ
@@ -87,15 +81,9 @@
8781
for(var/datum/data/record/M in sortRecord(GLOB.data_core.medical))
8882
for(var/datum/data/record/R in sortRecord(GLOB.data_core.general))
8983
if(R.fields["name"] == M.fields["name"])
90-
message_admins("Made new med record")
91-
message_admins("Name: [R.fields["name"]]")
92-
var/list/new_record = list("name" = R.fields["name"], "id" = R.fields["id"], "gender" = R.fields["gender"], "age" = R.fields["age"], "fingerprint" = R.fields["fingerprint"], "p_state" = R.fields["p_state"], "m_state" = R.fields["m_state"], "blood_type" = M.fields["blood_type"], "dna" = M.fields["b_dna"], "minor_disabilities" = M.fields["mi_dis"], "minor_disabilities_details" = M.fields["mi_dis_d"], "major_disabilities" = M.fields["ma_dis"], "major_disabilities_details" = M.fields["ma_dis_d"], "allergies" = M.fields["alg"], "allergies_details" = M.fields["alg_d"], "current_diseases" = M.fields["cdi"], "current_diseases_details" = M.fields["cdi_d"], "important_notes" = M.fields["notes"])
93-
message_admins("New record name: [new_record["name"]]")
84+
var/list/new_record = list("name" = R.fields["name"], "id" = R.fields["id"], "gender" = R.fields["gender"], "age" = R.fields["age"], "fingerprint" = R.fields["fingerprint"], "p_state" = R.fields["p_stat"], "m_state" = R.fields["m_stat"], "blood_type" = M.fields["blood_type"], "dna" = M.fields["b_dna"], "minor_disabilities" = M.fields["mi_dis"], "minor_disabilities_details" = M.fields["mi_dis_d"], "major_disabilities" = M.fields["ma_dis"], "major_disabilities_details" = M.fields["ma_dis_d"], "allergies" = M.fields["alg"], "allergies_details" = M.fields["alg_d"], "current_diseases" = M.fields["cdi"], "current_diseases_details" = M.fields["cdi_d"], "important_notes" = M.fields["notes"])
9485
med_record += list(new_record)
95-
qdel(new_record)
9686
break
97-
message_admins("Len: [med_record.len]")
98-
message_admins("Record test: [med_record[0]]")
9987
if(GLOB.data_core.general && GLOB.data_core.security)
10088
sec_record = list()
10189
for(var/datum/data/record/S in sortRecord(GLOB.data_core.security))
@@ -107,9 +95,8 @@
10795
var/list/comments = list()
10896
for(var/datum/data/comment/comment in S.fields["comments"])
10997
comments += list("[comment.commentText] - [comment.author] [comment.time]")
110-
var/list/new_record = list("name" = R.fields["name"], "id" = R.fields["id"], "gender" = R.fields["gender"], "age" = R.fields["age"], "rank" = R.fields["rank"], "fingerprint" = R.fields["fingerprint"], "p_state" = R.fields["p_state"], "criminal_status" = S.fields["criminal"], "crimes" = crimes, "important_notes" = S.fields["notes"], "comments" = comments)
98+
var/list/new_record = list("name" = R.fields["name"], "id" = R.fields["id"], "gender" = R.fields["gender"], "age" = R.fields["age"], "rank" = R.fields["rank"], "fingerprint" = R.fields["fingerprint"], "p_state" = R.fields["p_stat"], "criminal_status" = S.fields["criminal"], "crimes" = crimes, "important_notes" = S.fields["notes"], "comments" = comments)
11199
sec_record += list(new_record)
112-
qdel(new_record)
113100
break
114101
data["med_records"] = med_record
115102
data["sec_records"] = sec_record
@@ -134,6 +121,8 @@
134121
return
135122
software.Add(params["name"])
136123
ram -= params["cost"]
124+
if(params["name"] == "digital messenger")
125+
create_modularInterface()
137126
if(params["name"] == "medical HUD")
138127
var/datum/atom_hud/med = GLOB.huds[med_hud]
139128
med.show_to(src)
@@ -213,15 +202,15 @@
213202
internal_instrument = new(src)
214203
internal_instrument.interact(src)
215204
if("cable")
216-
if(cable_status == PAI_CABLE_EXTENDED)
205+
if(cable_status == "Extended")
217206
return
218207
var/turf/T = get_turf(loc)
219208
cable = new /obj/item/pai_cable(T)
220209
if(get(card, /mob/living/carbon/human))
221210
var/mob/living/carbon/human/H = get(card, /mob/living/carbon/human)
222211
H.put_in_hands(cable)
223212
T.visible_message(span_warning("A port on [src] opens to reveal [cable], which promptly falls to the floor."), span_italics("You hear the soft click of something light and hard falling to the ground."))
224-
cable_status = PAI_CABLE_EXTENDED
213+
cable_status = "Extended"
225214
if("jack")
226215
if(cable && cable.machine)
227216
hackdoor = cable.machine
@@ -234,7 +223,7 @@
234223
qdel(cable)
235224
hackdoor = null
236225
cable = null
237-
cable_status = PAI_CABLE_RETRACTED
226+
cable_status = "Retracted"
238227
update_appearance(UPDATE_ICON)
239228

240229
/mob/living/silicon/pai/ui_state(mob/user)

tgui/packages/tgui/interfaces/PaiInterface.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type Data = {
6161
temperature: number;
6262
hacking: boolean;
6363
hackprogress: number;
64-
cable: boolean;
64+
cable: string;
6565
door: string[];
6666
code: number;
6767
frequency: number;
@@ -381,17 +381,17 @@ const PaiBox = (props, context) => {
381381
maxValue={100}>
382382
{AirlockJackTextSwitch(hackprogress)}
383383
</ProgressBar>
384-
{cable === false && (
384+
{cable === "Retracted" && (
385385
<Button onClick={() => act("cable")}>
386386
Extend cable
387387
</Button>
388388
)}
389-
{cable === true && (
389+
{cable === "Extended" && (
390390
<Button onClick={() => act("retract")}>
391391
Retract cable
392392
</Button>
393393
)}
394-
{cable === true && door !== null && (
394+
{cable === "Extended" && door !== null && (
395395
hacking ? (
396396
<Button onClick={() => act("cancel")}>
397397
Cancel Airlock Jack

0 commit comments

Comments
 (0)