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

Commit 8a3b2a3

Browse files
committed
Access card + meson + nightvision
1 parent f00e2f7 commit 8a3b2a3

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

code/game/machinery/doors/door.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@
244244
return TRUE
245245
if(unrestricted_side(M))
246246
return TRUE
247+
if(ispAI(M))
248+
var/mob/living/silicon/pai/P = M
249+
return !isnull(check_access(P.access_card))
247250
return ..()
248251

249252
/// Returns the opposite of '/allowed', but makes exceptions for things like IsAdminGhost().

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
var/can_transmit = TRUE
6161
//Can pAI receive radio messages?
6262
var/can_receive = TRUE
63-
var/obj/item/card/id/access_card = null
63+
var/obj/item/card/id/access_card = new /obj/item/card/id
6464
var/chassis = "repairbot"
6565
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.
6666

@@ -319,4 +319,12 @@
319319

320320
/mob/living/silicon/pai/proc/copy_access(obj/item/card/id/ID, mob/user)
321321
access_card.access += ID.access
322-
to_chat(user, "Copied access from [ID]!")
322+
to_chat(user, span_info("Copied access from [ID]!"))
323+
to_chat(src, span_notice("Data transfer complete: New access encryption keys stored in memory."))
324+
325+
/mob/living/silicon/pai/Bump(atom/A) //Copied from bot.dm
326+
. = ..()
327+
if((istype(A, /obj/machinery/door/airlock) || istype(A, /obj/machinery/door/window)) && (!isnull(access_card)))
328+
var/obj/machinery/door/D = A
329+
if(D.check_access(access_card))
330+
D.open()

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// - Potentially roll HUDs and Records into one
33
// - Shock collar/lock system for prisoner pAIs?
44
// - Camera jack
5+
6+
57
/mob/living/silicon/pai/var/list/available_software = list(
68
//Nightvision
79
//T-Ray
810
//radiation eyes
911
//chem goggs
10-
//mesons
1112
list("module_name" = "crew manifest", "tab"=FALSE, "cost" = 5),
1213
list("module_name" = "digital messenger", "tab"=FALSE, "cost" = 5),
1314
list("module_name" = "atmosphere sensor", "tab"=TRUE, "title"="Atmospheric sensor", "cost" = 5),
@@ -21,6 +22,8 @@
2122
//"heartbeat sensor" = 10,
2223
//"projection array" = 15,
2324
list("module_name" = "medical HUD", "tab"=FALSE, "cost" = 20),
25+
list("module_name" = "meson HUD", "tab"=FALSE, "cost" = 20),
26+
list("module_name" = "nightvision HUD", "tab"=FALSE, "cost" = 20),
2427
list("module_name" = "security HUD", "tab"=FALSE, "cost" = 20),
2528
list("module_name" = "loudness booster", "tab"=TRUE, "title"="Sound Synthesizer", "cost" = 20),
2629
list("module_name" = "newscaster", "tab"=FALSE, "cost" = 20),
@@ -126,6 +129,10 @@
126129
if(params["name"] == "medical HUD")
127130
var/datum/atom_hud/med = GLOB.huds[med_hud]
128131
med.show_to(src)
132+
if(params["name"] == "meson HUD")
133+
sight |= SEE_TURFS
134+
if(params["name"] == "nightvision HUD")
135+
lighting_cutoff = LIGHTING_CUTOFF_HIGH
129136
if(params["name"] == "security HUD")
130137
var/datum/atom_hud/sec = GLOB.huds[sec_hud]
131138
sec.show_to(src)

0 commit comments

Comments
 (0)