|
7 | 7 | hud_type = /datum/hud/pai |
8 | 8 | pass_flags = PASSTABLE | PASSMOB |
9 | 9 | 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." |
11 | 11 | weather_immunities = WEATHER_STORM |
12 | 12 | light_on = FALSE |
13 | 13 | light_flags = LIGHT_ATTACHED |
|
23 | 23 | var/network = "ss13" |
24 | 24 | var/obj/machinery/camera/current = null |
25 | 25 |
|
26 | | - var/ram = 100 // Used as currency to purchase different abilities |
| 26 | + ///Used as currency to purchase different abilities |
| 27 | + var/ram = 100 |
27 | 28 | var/list/software = list() |
28 | | - var/userDNA // The DNA string of our assigned user |
29 | | - var/obj/item/computer_hardware/paicard/card // The card we inhabit |
30 | | - var/hacking = FALSE //Are we hacking a door? |
| 29 | + ///The DNA string of our assigned user |
| 30 | + var/userDNA |
| 31 | + ///The card we inhabit |
| 32 | + var/obj/item/computer_hardware/paicard/card |
| 33 | + ///Are we hacking a door? |
| 34 | + var/hacking = FALSE |
31 | 35 |
|
32 | 36 | var/speakStatement = "states" |
33 | 37 | var/speakExclamation = "declares" |
34 | 38 | var/speakDoubleExclamation = "alarms" |
35 | 39 | var/speakQuery = "queries" |
36 | 40 |
|
37 | | - var/obj/item/pai_cable/cable // The cable we produce and use when door or camera jacking |
| 41 | + ///The cable we produce and use when door or camera jacking |
| 42 | + var/obj/item/pai_cable/cable |
38 | 43 |
|
39 | | - var/master // Name of the one who commands us |
40 | | - var/master_dna // DNA string for owner verification |
| 44 | + ///Name of the one who commands us |
| 45 | + var/master |
| 46 | + ///DNA string for owner verification |
| 47 | + var/master_dna |
41 | 48 |
|
42 | 49 | // Various software-specific vars |
43 | 50 |
|
44 | | - var/temp // General error reporting text contained here will typically be shown once and cleared |
45 | | - var/screen // Which screen our main window displays |
46 | | - var/subscreen // Which specific function of the main screen is being displayed |
| 51 | + ///The airlock being hacked |
| 52 | + var/obj/machinery/door/hackdoor |
| 53 | + ///Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check |
| 54 | + var/hackprogress = 0 |
47 | 55 |
|
48 | | - var/secHUD = 0 // Toggles whether the Security HUD is active or not |
49 | | - var/medHUD = 0 // Toggles whether the Medical HUD is active or not |
50 | | - |
51 | | - var/datum/data/record/medicalActive1 // Datacore record declarations for record software |
52 | | - var/datum/data/record/medicalActive2 |
53 | | - |
54 | | - var/datum/data/record/securityActive1 // Could probably just combine all these into one |
55 | | - var/datum/data/record/securityActive2 |
56 | | - |
57 | | - var/obj/machinery/door/hackdoor // The airlock being hacked |
58 | | - var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check |
59 | | - |
60 | | - /// Remote signaler |
| 56 | + ///Remote signaler |
61 | 57 | var/obj/item/assembly/signaler/internal/signaler |
62 | 58 |
|
63 | 59 | var/obj/item/instrument/piano_synth/internal_instrument |
64 | | - var/obj/machinery/newscaster //pAI Newscaster |
65 | | - var/obj/item/healthanalyzer/hostscan //pAI healthanalyzer |
| 60 | + ///pAI Newscaster |
| 61 | + var/obj/machinery/newscaster |
| 62 | + ///pAI healthanalyzer |
| 63 | + var/obj/item/healthanalyzer/hostscan |
66 | 64 |
|
| 65 | + ///Whether the pAI has bought the encryption slot module or not |
67 | 66 | var/encryptmod = FALSE |
68 | 67 | var/holoform = FALSE |
| 68 | + ///Can pAI use their holoprojector? |
69 | 69 | var/canholo = TRUE |
| 70 | + ///Can pAI transmit radio messages? |
70 | 71 | var/can_transmit = TRUE |
| 72 | + ///Can pAI receive radio messages? |
71 | 73 | var/can_receive = TRUE |
72 | | - var/obj/item/card/id/access_card = null |
| 74 | + var/obj/item/card/id/access_card = new /obj/item/card/id |
73 | 75 | var/chassis = "repairbot" |
74 | 76 | var/list/possible_chassis = list("cat" = TRUE, "mouse" = TRUE, "monkey" = TRUE, "corgi" = FALSE, "fox" = FALSE, "repairbot" = TRUE, "rabbit" = TRUE, "frog" = TRUE) //assoc value is whether it can be picked up. |
75 | 77 |
|
|
81 | 83 | var/emittersemicd = FALSE |
82 | 84 |
|
83 | 85 | var/overload_ventcrawl = 0 |
84 | | - var/overload_bulletblock = 0 //Why is this a good idea? |
| 86 | + //Why is this a good idea? |
| 87 | + var/overload_bulletblock = 0 |
85 | 88 | var/overload_maxhealth = 0 |
86 | 89 | var/silent = FALSE |
87 | 90 | var/brightness_power = 5 |
|
127 | 130 |
|
128 | 131 | . = ..() |
129 | 132 |
|
130 | | - create_modularInterface() |
131 | 133 | emittersemicd = TRUE |
132 | 134 | addtimer(CALLBACK(src, PROC_REF(emittercool)), 600) |
133 | 135 |
|
|
153 | 155 | if(cable && cable.machine && istype(cable.machine, /obj/machinery/door) && cable.machine == hackdoor && get_dist(src, hackdoor) <= 1) |
154 | 156 | hackprogress = clamp(hackprogress + 20, 0, 100) |
155 | 157 | else |
156 | | - temp = "Door Jack: Connection to airlock has been lost. Hack aborted." |
157 | 158 | hackprogress = 0 |
158 | 159 | hacking = FALSE |
159 | 160 | hackdoor = null |
|
282 | 283 |
|
283 | 284 | /mob/living/silicon/pai/examine(mob/user) |
284 | 285 | . = ..() |
285 | | - . += "A personal AI in holochassis mode. Its master ID string seems to be [master]." |
| 286 | + . += "A personal AI in holochassis mode. Its master ID string seems to be [master ? master : "empty"]." |
| 287 | + if(software && isobserver(user)) |
| 288 | + . += "<b>[src] has the following modules:</b>" |
| 289 | + for(var/module in software) |
| 290 | + . += "[module]" |
286 | 291 |
|
287 | 292 | /mob/living/silicon/pai/Life(seconds_per_tick = SSMOBS_DT, times_fired) |
288 | 293 | if(stat == DEAD) |
|
307 | 312 | emitterhealth = clamp((emitterhealth + (emitter_regen_per_second * delta_time)), -50, emittermaxhealth) |
308 | 313 |
|
309 | 314 | /obj/item/computer_hardware/paicard/attackby(obj/item/W, mob/user, params) |
310 | | - ..() |
| 315 | + . = ..() |
311 | 316 | user.set_machine(src) |
312 | | - if(pai.encryptmod == TRUE) |
313 | | - if(W.tool_behaviour == TOOL_SCREWDRIVER) |
314 | | - pai.radio.attackby(W, user, params) |
315 | | - else if(istype(W, /obj/item/encryptionkey)) |
| 317 | + if(W.tool_behaviour == TOOL_SCREWDRIVER||istype(W, /obj/item/encryptionkey)) |
| 318 | + if(pai.encryptmod == TRUE) |
316 | 319 | pai.radio.attackby(W, user, params) |
317 | | - else |
318 | | - to_chat(user, "Encryption Key ports not configured.") |
| 320 | + else |
| 321 | + to_chat(user, "Encryption Key ports not configured.") |
| 322 | + else if(istype(W, /obj/item/card/id)) |
| 323 | + var/obj/item/card/id/id_card = W |
| 324 | + pai.copy_access(id_card, user) |
| 325 | + |
| 326 | +/mob/living/silicon/pai/attackby(obj/item/W, mob/user, params) |
| 327 | + . = ..() |
| 328 | + if(istype(W, /obj/item/card/id)) |
| 329 | + var/obj/item/card/id/id_card = W |
| 330 | + copy_access(id_card, user) |
| 331 | + |
| 332 | +/mob/living/silicon/pai/proc/copy_access(obj/item/card/id/ID, mob/user) |
| 333 | + access_card.access += ID.access |
| 334 | + to_chat(user, span_info("Copied access from [ID]!")) |
| 335 | + to_chat(src, span_notice("Data transfer complete: New access encryption keys stored in memory.")) |
| 336 | + |
| 337 | +/mob/living/silicon/pai/Bump(atom/A) //Copied from bot.dm |
| 338 | + . = ..() |
| 339 | + if((istype(A, /obj/machinery/door/airlock) || istype(A, /obj/machinery/door/window)) && (!isnull(access_card))) |
| 340 | + var/obj/machinery/door/D = A |
| 341 | + if(D.check_access(access_card)) |
| 342 | + D.open() |
0 commit comments