-
Notifications
You must be signed in to change notification settings - Fork 524
/
Copy pathcards_ids.dm
724 lines (596 loc) · 21.7 KB
/
cards_ids.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
/* Cards
* Contains:
* DATA CARD
* ID CARD
* FINGERPRINT CARD HOLDER
* FINGERPRINT CARD
*/
/*
* DATA CARDS - Used for the teleporter
*/
/obj/item/card
name = "card"
desc = "Does card things."
icon = 'icons/obj/card.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_card.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_card.dmi',
)
w_class = WEIGHT_CLASS_TINY
var/associated_account_number = 0
var/list/files = list( )
var/last_flash = 0 //Spam limiter.
drop_sound = 'sound/items/drop/card.ogg'
pickup_sound = 'sound/items/pickup/card.ogg'
/obj/item/card/Initialize()
. = ..()
update_icon()
/obj/item/card/pickup(mob/user)
..()
update_icon()
/obj/item/card/dropped(mob/user)
..()
update_icon()
/obj/item/card/attack_hand()
..()
update_icon()
/obj/item/card/update_icon()
var/matrix/tf = matrix()
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
/obj/item/card/data
name = "data disk"
desc = "A disk of data."
icon_state = "data"
var/function = "storage"
var/data = "null"
var/special = null
item_state = "card-id"
overlay_state = "data"
/obj/item/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
set src in usr
if (t)
src.name = "data disk- '[t]'"
else
src.name = "data disk"
src.add_fingerprint(usr)
return
/*
* ID CARDS
*/
/obj/item/card/emag
desc = "It's a card with a magnetic strip attached to some circuitry."
name = "cryptographic sequencer"
icon_state = "emag"
item_state = "card-id"
origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2)
var/uses = 10
/obj/item/card/emag_broken
desc = "It's a card with a magnetic strip attached to some circuitry. It looks too busted to be used for anything but salvage."
name = "broken cryptographic sequencer"
icon_state = "emag_broken"
item_state = "card-id"
origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2)
/obj/item/card/emag/resolve_attackby(atom/A, mob/user, var/click_parameters)
var/used_uses = A.emag_act(uses, user, src)
if(used_uses == NO_EMAG_ACT)
return ..(A, user, click_parameters)
uses -= used_uses
A.add_fingerprint(user)
if(used_uses)
log_and_message_admins("emagged \an [A].")
if(uses<1)
user.visible_message(SPAN_WARNING("\The [src] fizzles and sparks - it seems it's been used once too often, and is now spent."))
var/obj/item/card/emag_broken/junk = new(user.loc)
junk.add_fingerprint(user)
user.drop_from_inventory(src,get_turf(junk))
qdel(src)
return 1
#define ID_CARD_UNSET "\[UNSET\]"
/obj/item/card/id
name = "identification card"
desc = "A card used to identify people and determine access."
icon_state = "id"
item_state = "card-id"
overlay_state = "id"
var/list/access = list()
var/registered_name = ID_CARD_UNSET // The name registered_name on the card
var/datum/weakref/mob_id
slot_flags = SLOT_ID
var/age = ID_CARD_UNSET
var/blood_type = ID_CARD_UNSET
var/dna_hash = ID_CARD_UNSET
var/fingerprint_hash = ID_CARD_UNSET
var/citizenship = ID_CARD_UNSET
var/sex = ID_CARD_UNSET
var/icon/front
var/icon/side
var/mining_points //miners gotta eat
var/can_copy_access = FALSE
var/access_copy_msg
var/flipped = 0
var/wear_over_suit = 0
//alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system
var/assignment = null //can be alt title or the actual job
var/rank = null //actual job
var/employer_faction = null
var/datum/ntnet_user/chat_user
var/iff_faction = IFF_DEFAULT
/obj/item/card/id/Destroy()
QDEL_NULL(chat_user)
. = ..()
GC_TEMPORARY_HARDDEL
/obj/item/card/id/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended)
. = ..()
if (distance <= 1)
show(user)
/obj/item/card/id/on_slotmove(var/mob/living/user, slot)
. = ..(user, slot)
BITSET(user.hud_updateflag, ID_HUD) //Update ID HUD if an ID is ever moved
/obj/item/card/id/proc/prevent_tracking()
return 0
/obj/item/card/id/proc/show(mob/user)
if(front && side)
send_rsc(user, front, "front.png")
send_rsc(user, side, "side.png")
var/datum/browser/popup = new(user, "idcard", name, 650, 260)
popup.set_content(dat())
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/item/card/id/proc/update_name()
name = "workplace ID card - [src.registered_name], [src.assignment]"
if(istype(chat_user))
chat_user.username = chat_user.generateUsernameIdCard(src)
/obj/item/card/id/proc/set_id_photo(var/mob/M)
front = getFlatIcon(M, SOUTH)
front.Scale(128, 128)
side = getFlatIcon(M, WEST)
side.Scale(128, 128)
/mob/proc/set_id_info(var/obj/item/card/id/id_card)
SHOULD_NOT_SLEEP(TRUE)
id_card.age = 0
id_card.registered_name = real_name
id_card.sex = capitalize(gender)
id_card.set_id_photo(src)
if(dna)
id_card.blood_type = dna.b_type
id_card.dna_hash = dna.unique_enzymes
id_card.fingerprint_hash = md5(dna.uni_identity)
id_card.update_name()
/mob/living/carbon/human/set_id_info(var/obj/item/card/id/id_card)
..()
id_card.age = age
id_card.citizenship = SSrecords.get_citizenship_record_name(citizenship)
id_card.mob_id = WEAKREF(src)
id_card.employer_faction = employer_faction
/obj/item/card/id/proc/dat()
var/dat = ("<table><tr><td>")
dat += "Name: [registered_name]<br>"
dat += "Age: [age]<br>\n"
dat += "Sex: [sex]<br>\n"
dat += "Citizenship: [citizenship]<br>\n"
dat += "Assignment and Employer: [assignment]<br>\n"
dat += "Blood Type: [blood_type]<br>\n"
dat += "Fingerprint Hash: [fingerprint_hash]<br>\n"
dat += "DNA Hash: [dna_hash]\n"
if(mining_points)
dat += "<br>Ore Redemption Points: [mining_points]\n"
if(front && side)
dat +="<td align = center valign = top>Front and Side Photograph<br><img src=front.png height=128 width=128 border=4><img src=side.png height=128 width=128 border=4></td>"
dat += "</tr></table>"
return dat
/obj/item/card/id/attack_self(mob/user as mob)
if(dna_hash == ID_CARD_UNSET && ishuman(user))
var/response = alert(user, "This ID card has not been imprinted with biometric data. Would you like to imprint yours now?", "Biometric Imprinting", "Yes", "No")
if (response == "Yes")
var/mob/living/carbon/human/H = user
if(H.gloves)
to_chat(user, SPAN_WARNING("You cannot imprint [src] while wearing \the [H.gloves]."))
return
else
mob_id = WEAKREF(H)
blood_type = H.dna.b_type
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
citizenship = H.citizenship
age = H.age
to_chat(user, SPAN_NOTICE("Biometric imprinting successful!"))
return
if(last_flash <= world.time - 20)
last_flash = world.time
id_flash(user)
src.add_fingerprint(user)
return
/obj/item/card/id/proc/id_flash(var/mob/user, var/add_text = "", var/blind_add_text = "")
var/list/id_viewers = viewers(3, user) // or some other distance - this distance could be defined as a var on the ID
var/message = "<b>[user]</b> flashes [user.get_pronoun("his")] [icon2html(src, id_viewers)] [src.name]."
var/blind_message = "You flash your [icon2html(src, id_viewers)] [src.name]."
if(add_text != "")
message += " [add_text]"
if(blind_add_text != "")
blind_message += " [blind_add_text]"
user.visible_message(message, blind_message)
/obj/item/card/id/attack(mob/living/target_mob, mob/living/user, target_zone)
if(user.zone_sel.selecting == BP_R_HAND || user.zone_sel.selecting == BP_L_HAND)
if(!ishuman(target_mob))
return ..()
if (dna_hash == ID_CARD_UNSET && ishuman(user))
var/response = alert(user, "This ID card has not been imprinted with biometric data. Would you like to imprint [target_mob]'s now?", "Biometric Imprinting", "Yes", "No")
if (response == "Yes")
if (!user.Adjacent(target_mob) || user.restrained() || user.lying || user.stat)
to_chat(user, SPAN_WARNING("You must remain adjacent to [target_mob] to scan their biometric data."))
return
var/mob/living/carbon/human/H = target_mob
if(H.gloves)
to_chat(user, SPAN_WARNING("\The [H] is wearing gloves."))
return 1
if(user != H && H.a_intent != "help" && !H.lying)
user.visible_message(SPAN_DANGER("\The [user] tries to take prints from \the [H], but they move away."))
return 1
var/has_hand
var/obj/item/organ/external/O = H.organs_by_name[BP_R_HAND]
if(istype(O) && !O.is_stump())
has_hand = 1
else
O = H.organs_by_name[BP_L_HAND]
if(istype(O) && !O.is_stump())
has_hand = 1
if(!has_hand)
to_chat(user, SPAN_WARNING("They don't have any hands."))
return 1
user.visible_message("[user] imprints [src] with \the [H]'s biometrics.")
mob_id = WEAKREF(H)
blood_type = H.dna.b_type
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
citizenship = H.citizenship
age = H.age
src.add_fingerprint(H)
to_chat(user, SPAN_NOTICE("Biometric Imprinting Successful!"))
return 1
return ..()
/obj/item/card/id/attackby(obj/item/attacking_item, mob/user)
if(istype(attacking_item, /obj/item/card/id))
var/obj/item/card/id/ID = attacking_item
if(ID.can_copy_access)
ID.access |= src.access
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(player_is_antag(user.mind) || isgolem(user))
to_chat(user, SPAN_NOTICE(ID.access_copy_msg))
return
. = ..()
/obj/item/card/id/GetAccess()
return access
/obj/item/card/id/GetID()
return src
/obj/item/card/id/proc/mob_icon_update()
if(ismob(src.loc))
var/mob/M = src.loc
M.update_inv_wear_id()
/obj/item/card/id/verb/flip_side()
set name = "Flip ID card"
set category = "Object"
set src in usr
if(use_check_and_message(usr, use_flags = USE_DISALLOW_SILICONS))
return
src.flipped = !src.flipped
if(src.flipped)
src.overlay_state = "[overlay_state]_flip"
else
src.overlay_state = initial(overlay_state)
to_chat(usr, "You change \the [src] to be on your [src.flipped ? "left" : "right"] side.")
mob_icon_update()
/obj/item/card/id/verb/toggle_icon_layer()
set name = "Switch ID Layer"
set category = "Object"
set src in usr
if(use_check_and_message(usr, use_flags = USE_DISALLOW_SILICONS))
return
if(wear_over_suit == -1)
to_chat(usr, SPAN_NOTICE("\The [src] cannot be worn above your suit!"))
return
wear_over_suit = !wear_over_suit
mob_icon_update()
/obj/item/card/id/proc/InitializeChatUser()
if(!istype(chat_user))
chat_user = new()
chat_user.username = chat_user.generateUsernameIdCard(src)
/obj/item/card/id/silver
icon_state = "silver"
item_state = "silver_id"
overlay_state = "silver"
/obj/item/card/id/white
icon_state = "white"
item_state = "white_id"
overlay_state = "white"
/obj/item/card/id/navy
desc = "A navy card which shows honour and dedication."
icon_state = "navy"
item_state = "navy_id"
overlay_state = "navy"
/obj/item/card/id/gold
desc = "A golden card which shows power and might."
icon_state = "gold"
item_state = "gold_id"
overlay_state = "gold"
/obj/item/card/id/syndicate/command
name = "illicit identification card"
desc = "An identification card."
icon_state = "dark"
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
access = list(ACCESS_SYNDICATE, ACCESS_EXTERNAL_AIRLOCKS)
/obj/item/card/id/syndicate/ert
name = "illicit commando identification card"
assignment = "Commando"
icon_state = "centcom"
/obj/item/card/id/syndicate/ert/Initialize()
. = ..()
access = get_all_accesses()
/obj/item/card/id/syndicate/raider
name = "passport"
assignment = "Visitor"
/obj/item/card/id/syndicate/raider/update_name()
name = "[registered_name]'s Passport"
/obj/item/card/id/highlander
name = "highlander identification card"
assignment = "Highlander"
icon_state = "centcom"
/obj/item/card/id/highlander/New()
access = get_all_station_access() | get_all_centcom_access()
..()
/obj/item/card/id/captains_spare
name = "captain's spare identification card"
desc = "A captain's spare identification card."
icon_state = "gold"
item_state = "gold_id"
overlay_state = "gold"
registered_name = "Captain"
assignment = "Captain"
/obj/item/card/id/captains_spare/New()
access = get_all_station_access()
..()
/obj/item/card/id/merchant
name = "merchant identification card"
desc = "An identification card issued to SCC-sanctioned merchants, indicating their right to sell and buy goods."
icon_state = "centcom"
overlay_state = "centcom"
access = list(ACCESS_MERCHANT)
/obj/item/card/id/synthetic
name = "\improper SCC equipment identification card"
desc = "Access module for SCC equipment."
icon_state = "id-robot"
item_state = "tdgreen"
assignment = "Equipment"
/obj/item/card/id/synthetic/New()
access = get_all_station_access() + ACCESS_EQUIPMENT
..()
/obj/item/card/id/synthetic/cyborg
name = "\improper SCC equipment identification card"
desc = "Access module for SCC equipment."
icon_state = "id-robot"
item_state = "tdgreen"
assignment = "Equipment"
/obj/item/card/id/synthetic/cyborg/New()
..()
access = list(ACCESS_EQUIPMENT, ACCESS_AI_UPLOAD, ACCESS_EXTERNAL_AIRLOCKS) // barebones cyborg access. Job special added in different place
/obj/item/card/id/minedrone
name = "mine drone identification card"
desc = "Access module for mine drones."
icon_state = "id-robot"
item_state = "tdgreen"
assignment = "Minedrone"
/obj/item/card/id/minedrone/New()
access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_EXTERNAL_AIRLOCKS)
..()
/obj/item/card/id/centcom
name = "\improper CentCom identification card"
desc = "A high-tech holocard displaying the commanding credentials of a Central Command official."
icon_state = "centcom"
overlay_state = "centcom"
registered_name = "Central Command"
assignment = "General"
/obj/item/card/id/centcom/New()
access = get_all_centcom_access()
..()
/obj/item/card/id/ccia
name = "\improper CentCom. Internal Affairs identification card"
desc = "A synthleather ID displaying the blood-chilling credentials of an Internal Affairs agent."
icon_state = "ccia"
overlay_state = "ccia"
drop_sound = /singleton/sound_category/generic_drop_sound
pickup_sound = /singleton/sound_category/generic_pickup_sound
/obj/item/card/id/ccia/update_icon()
return
/obj/item/card/id/ccia/id_flash(var/mob/user)
var/add_text = "Done with prejudice and professionalism, [user.get_pronoun("he")] means business."
var/blind_add_text = "Done with prejudice and professionalism, you mean business."
return ..(user, add_text, blind_add_text)
/obj/item/card/id/ccia/bssb
name = "\improper Biesel Security Services Bureau identification card"
desc = "A synthleather ID straight from the Biesel Security Services Bureau."
icon_state = "bssb"
/obj/item/card/id/ert
name = "\improper NanoTrasen Emergency Response Team identification card"
icon_state = "centcom"
overlay_state = "centcom"
assignment = "Emergency Response Team"
/obj/item/card/id/ert/New()
access = get_all_station_access() + get_centcom_access("Emergency Response Team")
..()
/obj/item/card/id/ert/scc
name = "\improper SCC Emergency Response Team identification card"
/obj/item/card/id/asset_protection
name = "\improper NanoTrasen Asset Protection identification card"
icon_state = "centcom"
overlay_state = "centcom"
assignment = "Asset Protection"
/obj/item/card/id/asset_protection/New()
access = get_all_accesses()
..()
/obj/item/card/id/distress
name = "\improper Freelancer Mercenary identification card"
icon_state = "data"
assignment = "Freelancer Mercenary"
/obj/item/card/id/distress/New()
access = list(ACCESS_DISTRESS, ACCESS_MAINT_TUNNELS, ACCESS_EXTERNAL_AIRLOCKS)
..()
/obj/item/card/id/distress/fsf
name = "\improper Free Solarian Fleets identification card"
icon_state = "data"
assignment = "Free Solarian Fleets Marine"
/obj/item/card/id/distress/kataphract
name = "\improper Kataphract identification card"
icon_state = "data"
assignment = "Kataphract"
/obj/item/card/id/distress/legion
name = "\improper Tau Ceti Foreign Legion identification card"
desc = "An old-fashioned, practical plastic card. Cheaply produced for Tau Ceti's finest."
assignment = "Tau Ceti Foreign Legion Volunteer"
icon_state = "legion"
/obj/item/card/id/distress/legion/New()
access = list(ACCESS_LEGION, ACCESS_MAINT_TUNNELS, ACCESS_EXTERNAL_AIRLOCKS, ACCESS_SECURITY, ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_MEDICAL, ACCESS_RESEARCH, ACCESS_ATMOSPHERICS, ACCESS_MEDICAL_EQUIP)
..()
/obj/item/card/id/distress/legion/tcaf
name = "\improper Tau Ceti Armed Forces identification card"
assignment = "Republican Fleet Legionary"
/obj/item/card/id/distress/ap_eridani
name = "\improper Eridani Private Military Contractor identification card"
desc = "A high-tech holobadge, identifying the owner as a contractor from one of the many PMCs from the Eridani Corporate Federation."
assignment = "EPMC Asset Protection"
icon_state = "pmc_card"
overlay_state = "pmc_card"
/obj/item/card/distress/ap_eridani/update_icon()
return
/obj/item/card/id/distress/ap_eridani/New()
access = get_distress_access()
..()
/obj/item/card/id/distress/iac
name = "\improper Interstellar Aid Corps identification card"
assignment = "Interstellar Aid Corps Responder"
icon_state = "centcom"
/obj/item/card/id/distress/iac/New()
access = get_distress_access()
..()
/obj/item/card/id/all_access
name = "\improper Administrator's spare identification card"
desc = "An administrator's spare identification card."
icon_state = "data"
item_state = "tdgreen"
overlay_state = "data"
registered_name = "Administrator"
assignment = "Administrator"
/obj/item/card/id/all_access/New()
access = get_access_ids()
..()
// Contractor cards
/obj/item/card/id/idris
name = "\improper Idris Incorporated identification card"
desc = "A high-tech holocard, designed to project information about a sub-contractor from Idris Incorporated."
icon_state = "idris_card"
overlay_state = "idris_card"
/obj/item/card/id/idris/update_icon()
return
/obj/item/card/id/idris/sec
icon_state = "idrissec_card"
overlay_state = "idrissec_card"
/obj/item/card/id/iru
name = "\improper IRU identification card"
desc = "A high-tech holobadge, designed to project information about an asset reclamation synthetic at Idris Incorporated."
icon_state = "iru_card"
overlay_state = "iru_card"
/obj/item/card/id/iru/update_icon()
return
/obj/item/card/id/pmc
name = "\improper PMCG identification card"
desc = "A high-tech holobadge, identifying the owner as a contractor from one of the many PMCs from the Private Military Contracting Group."
icon_state = "pmc_card"
overlay_state = "pmc_card"
/obj/item/card/id/pmc/update_icon()
return
/obj/item/card/id/zeng_hu
name = "\improper Zeng-Hu Pharmaceuticals identification card"
desc = "A synthleather card, belonging to one of the highly skilled members of Zeng-Hu."
icon_state = "zhu_card"
overlay_state = "zhu_card"
/obj/item/card/zeng_hu/update_icon()
return
/obj/item/card/id/hephaestus
name = "\improper Hephaestus Industries identification card"
desc = "A metal-backed card, belonging to the powerful Hephaestus Industries."
icon_state = "heph_card"
overlay_state = "heph_card"
/obj/item/card/id/zavodskoi
name = "\improper Zavodskoi Interstellar Incorporated identification card"
desc = "An old-fashioned, practical plastic card. Smells faintly of gunpowder."
icon_state = "necro_card"
overlay_state = "necro_card"
/obj/item/card/id/zavodskoi/sec
desc = "An old-fashioned, practical plastic card. This one is of a higher rank, for Security personnel."
icon_state = "necrosec_card"
overlay_state = "necrosec_card"
/obj/item/card/id/einstein
name = "\improper Einstein Engines identification card"
desc = "A stylized plastic card, belonging to one of the many specialists at Einstein Engines."
icon_state = "einstein_card"
overlay_state = "einstein_card"
iff_faction = IFF_EE
/obj/item/card/id/orion
name = "\improper Orion Express identification card"
desc = "A well-worn identification pass, retrofitted with wireless transmission technology."
icon_state = "orion_card"
overlay_state = "orion_card"
/obj/item/card/id/coalition
name = "\improper coalition identification card"
desc = "A rugged ID card denoting the wearer as a member of a Coalition of Colonies government organization."
icon_state = "coalition_card"
overlay_state = "nothing"
/obj/item/card/id/generic
name = "identification card"
desc = "A card with a soft metallic sheen, used to identify people and determine access."
icon_state = "data"
overlay_state = "data"
/obj/item/card/id/tcaf // For ghostroles, rather than ERTs.
name = "\improper Tau Ceti Armed Forces identification card"
desc = "An old-fashioned, practical plastic card. Cheaply produced for Tau Ceti's finest."
icon_state = "legion"
overlay_state = "nothing"
/obj/item/card/id/bluespace
name = "bluespace identification card"
desc = "A bizarre imitation of an ID card; shifting and moving."
desc_antag = "Access can be copied from other ID cards by clicking on them."
icon_state = "crystalid"
iff_faction = IFF_BLUESPACE
/obj/item/card/id/bluespace/update_name()
return
/obj/item/card/id/bluespace/attack_self(mob/user)
if(registered_name == user.real_name)
switch(alert("Would you like edit the ID label, or show it?", "Show or Edit?", "Edit", "Show"))
if("Edit")
var/new_label = sanitize(input(user, "Enter the new label.", "Set Label") as text|null, 12)
if(new_label)
name = "[initial(name)] ([new_label])"
if("Show")
..()
else
..()
/obj/item/card/id/away_site
access = list(ACCESS_GENERIC_AWAY_SITE, ACCESS_EXTERNAL_AIRLOCKS)
/obj/item/card/id/mecha
name = "exosuit access card"
/obj/item/card/id/mecha/GetAccess()
var/mob/living/heavy_vehicle/exosuit = loc
if(!istype(loc) || !length(exosuit.pilots))
return list()
var/list/pilot_access = list()
for(var/mob/pilot as anything in exosuit.pilots)
var/obj/item/ID = pilot.GetIdCard()
pilot_access |= ID.GetAccess()
return pilot_access
#undef ID_CARD_UNSET