-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
human.dm
1385 lines (1179 loc) · 53.2 KB
/
human.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
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/mob/living/carbon/human/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
icon_state = "" //Remove the inherent human icon that is visible on the map editor. We're rendering ourselves limb by limb, having it still be there results in a bug where the basic human icon appears below as south in all directions and generally looks nasty.
//initialize limbs first
create_bodyparts()
setup_human_dna()
if(dna.species)
set_species(dna.species.type)
//initialise organs
create_internal_organs() //most of it is done in set_species now, this is only for parent call
physiology = new()
. = ..()
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_FACE_ACT, .proc/clean_face)
AddComponent(/datum/component/personal_crafting)
AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 1, 2)
GLOB.human_list += src
/mob/living/carbon/human/proc/setup_human_dna()
//initialize dna. for spawned humans; overwritten by other code
create_dna(src)
randomize_human(src)
dna.initialize_dna()
/mob/living/carbon/human/ComponentInitialize()
. = ..()
if(!CONFIG_GET(flag/disable_human_mood))
AddComponent(/datum/component/mood)
/mob/living/carbon/human/Destroy()
QDEL_NULL(physiology)
GLOB.human_list -= src
return ..()
/mob/living/carbon/human/prepare_data_huds()
//Update med hud images...
..()
//...sec hud images...
sec_hud_set_ID()
sec_hud_set_implants()
sec_hud_set_security_status()
//...fan gear
fan_hud_set_fandom()
//...and display them.
add_to_all_human_data_huds()
/mob/living/carbon/human/Stat()
..()
if(statpanel("Status"))
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if (internal)
if (!internal.air_contents)
qdel(internal)
else
stat(null, "Internal Atmosphere Info: [internal.name]")
stat(null, "Tank Pressure: [internal.air_contents.return_pressure()]")
stat(null, "Distribution Pressure: [internal.distribute_pressure]")
if(istype(wear_suit, /obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/S = wear_suit
stat(null, "Thermal Regulator: [S.thermal_on ? "on" : "off"]")
stat(null, "Cell Charge: [S.cell ? "[round(S.cell.percent(), 0.1)]%" : "!invalid!"]")
if(mind)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
stat(null, "Chemical Storage: [changeling.chem_charges]/[changeling.chem_storage]")
stat(null, "Absorbed DNA: [changeling.absorbedcount]")
//NINJACODE
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) //Only display if actually a ninja.
var/obj/item/clothing/suit/space/space_ninja/SN = wear_suit
if(statpanel("SpiderOS"))
stat("SpiderOS Status:","[SN.s_initialized ? "Initialized" : "Disabled"]")
stat("Current Time:", "[station_time_timestamp()]")
if(SN.s_initialized)
//Suit gear
stat("Energy Charge:", "[round(SN.cell.charge/100)]%")
stat("Smoke Bombs:", "\Roman [SN.s_bombs]")
//Ninja status
stat("Fingerprints:", "[md5(dna.uni_identity)]")
stat("Unique Identity:", "[dna.unique_enzymes]")
stat("Overall Status:", "[stat > 1 ? "dead" : "[health]% healthy"]")
stat("Nutrition Status:", "[nutrition]")
stat("Oxygen Loss:", "[getOxyLoss()]")
stat("Toxin Levels:", "[getToxLoss()]")
stat("Burn Severity:", "[getFireLoss()]")
stat("Brute Trauma:", "[getBruteLoss()]")
stat("Radiation Levels:","[radiation] rad")
stat("Body Temperature:","[bodytemperature-T0C] degrees C ([bodytemperature*1.8-459.67] degrees F)")
//Diseases
if(diseases.len)
stat("Viruses:", null)
for(var/thing in diseases)
var/datum/disease/D = thing
stat("*", "[D.name], Type: [D.spread_text], Stage: [D.stage]/[D.max_stages], Possible Cure: [D.cure_text]")
/mob/living/carbon/human/show_inv(mob/user)
user.set_machine(src)
var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask)
var/list/obscured = check_obscured_slots()
var/list/dat = list()
dat += "<table>"
for(var/i in 1 to held_items.len)
var/obj/item/I = get_item_for_held_index(i)
dat += "<tr><td><B>[get_held_index_name(i)]:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_HANDS];hand_index=[i]'>[(I && !(I.item_flags & ABSTRACT)) ? I : "<font color=grey>Empty</font>"]</a></td></tr>"
dat += "<tr><td> </td></tr>"
dat += "<tr><td><B>Back:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_BACK]'>[(back && !(back.item_flags & ABSTRACT)) ? back : "<font color=grey>Empty</font>"]</A>"
if(has_breathable_mask && istype(back, /obj/item/tank))
dat += " <A href='?src=[REF(src)];internal=[ITEM_SLOT_BACK]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr><tr><td> </td></tr>"
dat += "<tr><td><B>Head:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_HEAD]'>[(head && !(head.item_flags & ABSTRACT)) ? head : "<font color=grey>Empty</font>"]</A></td></tr>"
if(ITEM_SLOT_MASK in obscured)
dat += "<tr><td><font color=grey><B>Mask:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Mask:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_MASK]'>[(wear_mask && !(wear_mask.item_flags & ABSTRACT)) ? wear_mask : "<font color=grey>Empty</font>"]</A></td></tr>"
if(ITEM_SLOT_NECK in obscured)
dat += "<tr><td><font color=grey><B>Neck:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Neck:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_NECK]'>[(wear_neck && !(wear_neck.item_flags & ABSTRACT)) ? wear_neck : "<font color=grey>Empty</font>"]</A></td></tr>"
if(ITEM_SLOT_EYES in obscured)
dat += "<tr><td><font color=grey><B>Eyes:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Eyes:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_EYES]'>[(glasses && !(glasses.item_flags & ABSTRACT)) ? glasses : "<font color=grey>Empty</font>"]</A></td></tr>"
if(ITEM_SLOT_EARS in obscured)
dat += "<tr><td><font color=grey><B>Ears:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Ears:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_EARS]'>[(ears && !(ears.item_flags & ABSTRACT)) ? ears : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td> </td></tr>"
dat += "<tr><td><B>Exosuit:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_OCLOTHING]'>[(wear_suit && !(wear_suit.item_flags & ABSTRACT)) ? wear_suit : "<font color=grey>Empty</font>"]</A></td></tr>"
if(wear_suit)
if(ITEM_SLOT_SUITSTORE in obscured)
dat += "<tr><td><font color=grey> ↳<B>Suit Storage:</B></font></td></tr>"
else
dat += "<tr><td> ↳<B>Suit Storage:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_SUITSTORE]'>[(s_store && !(s_store.item_flags & ABSTRACT)) ? s_store : "<font color=grey>Empty</font>"]</A>"
if(has_breathable_mask && istype(s_store, /obj/item/tank))
dat += " <A href='?src=[REF(src)];internal=[ITEM_SLOT_SUITSTORE]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr>"
else
dat += "<tr><td><font color=grey> ↳<B>Suit Storage:</B></font></td></tr>"
if(ITEM_SLOT_FEET in obscured)
dat += "<tr><td><font color=grey><B>Shoes:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Shoes:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_FEET]'>[(shoes && !(shoes.item_flags & ABSTRACT)) ? shoes : "<font color=grey>Empty</font>"]</A>"
if(shoes && shoes.can_be_tied && shoes.tied != SHOES_KNOTTED)
dat += " <A href='?src=[REF(src)];shoes=[ITEM_SLOT_FEET]'>[shoes.tied ? "Untie shoes" : "Knot shoes"]</A>"
dat += "</td></tr>"
if(ITEM_SLOT_GLOVES in obscured)
dat += "<tr><td><font color=grey><B>Gloves:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Gloves:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_GLOVES]'>[(gloves && !(gloves.item_flags & ABSTRACT)) ? gloves : "<font color=grey>Empty</font>"]</A></td></tr>"
if(ITEM_SLOT_ICLOTHING in obscured)
dat += "<tr><td><font color=grey><B>Uniform:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Uniform:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_ICLOTHING]'>[(w_uniform && !(w_uniform.item_flags & ABSTRACT)) ? w_uniform : "<font color=grey>Empty</font>"]</A>"
if(w_uniform)
var/obj/item/clothing/under/U = w_uniform
if (U.can_adjust)
dat += " <A href='?src=[REF(src)];toggle_uniform=[ITEM_SLOT_ICLOTHING]'>Adjust</A>"
dat += "</td></tr>"
var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_CHEST)
if((w_uniform == null && !(dna && dna.species.nojumpsuit) && !(O && O.status == BODYPART_ROBOTIC)) || (ITEM_SLOT_ICLOTHING in obscured))
dat += "<tr><td><font color=grey> ↳<B>Pockets:</B></font></td></tr>"
dat += "<tr><td><font color=grey> ↳<B>ID:</B></font></td></tr>"
dat += "<tr><td><font color=grey> ↳<B>Belt:</B></font></td></tr>"
else
dat += "<tr><td> ↳<B>Belt:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_BELT]'>[(belt && !(belt.item_flags & ABSTRACT)) ? belt : "<font color=grey>Empty</font>"]</A>"
if(has_breathable_mask && istype(belt, /obj/item/tank))
dat += " <A href='?src=[REF(src)];internal=[ITEM_SLOT_BELT]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr>"
dat += "<tr><td> ↳<B>Pockets:</B></td><td><A href='?src=[REF(src)];pockets=left'>[(l_store && !(l_store.item_flags & ABSTRACT)) ? "Left (Full)" : "<font color=grey>Left (Empty)</font>"]</A>"
dat += " <A href='?src=[REF(src)];pockets=right'>[(r_store && !(r_store.item_flags & ABSTRACT)) ? "Right (Full)" : "<font color=grey>Right (Empty)</font>"]</A></td></tr>"
dat += "<tr><td> ↳<B>ID:</B></td><td><A href='?src=[REF(src)];item=[ITEM_SLOT_ID]'>[(wear_id && !(wear_id.item_flags & ABSTRACT)) ? wear_id : "<font color=grey>Empty</font>"]</A></td></tr>"
if(handcuffed)
dat += "<tr><td><B>Handcuffed:</B> <A href='?src=[REF(src)];item=[ITEM_SLOT_HANDCUFFED]'>Remove</A></td></tr>"
if(legcuffed)
dat += "<tr><td><A href='?src=[REF(src)];item=[ITEM_SLOT_LEGCUFFED]'>Legcuffed</A></td></tr>"
dat += {"</table>
<A href='?src=[REF(user)];mach_close=mob[REF(src)]'>Close</A>
"}
var/datum/browser/popup = new(user, "mob[REF(src)]", "[src]", 440, 510)
popup.set_content(dat.Join())
popup.open()
// called when something steps onto a human
// this could be made more general, but for now just handle mulebot
/mob/living/carbon/human/Crossed(atom/movable/AM)
var/mob/living/simple_animal/bot/mulebot/MB = AM
if(istype(MB))
MB.RunOver(src)
. = ..()
spreadFire(AM)
/mob/living/carbon/human/Topic(href, href_list)
if(href_list["embedded_object"] && usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY))
var/obj/item/bodypart/L = locate(href_list["embedded_limb"]) in bodyparts
if(!L)
return
var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects
if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore
return
SEND_SIGNAL(src, COMSIG_CARBON_EMBED_RIP, I, L)
return
if(href_list["item"]) //canUseTopic check for this is handled by mob/Topic()
var/slot = text2num(href_list["item"])
if(slot in check_obscured_slots(TRUE))
to_chat(usr, "<span class='warning'>You can't reach that! Something is covering it.</span>")
return
if(href_list["pockets"] && usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY)) //TODO: Make it match (or intergrate it into) strippanel so you get 'item cannot fit here' warnings if mob_can_equip fails
var/pocket_side = href_list["pockets"] != "right" ? "left" : "right"
var/pocket_id = (pocket_side == "right" ? ITEM_SLOT_RPOCKET : ITEM_SLOT_LPOCKET)
var/obj/item/pocket_item = (pocket_id == ITEM_SLOT_RPOCKET ? r_store : l_store)
var/obj/item/place_item = usr.get_active_held_item() // Item to place in the pocket, if it's empty
var/delay_denominator = 1
if(pocket_item && !(pocket_item.item_flags & ABSTRACT))
if(HAS_TRAIT(pocket_item, TRAIT_NODROP))
to_chat(usr, "<span class='warning'>You try to empty [src]'s [pocket_side] pocket, it seems to be stuck!</span>")
to_chat(usr, "<span class='notice'>You try to empty [src]'s [pocket_side] pocket.</span>")
else if(place_item && place_item.mob_can_equip(src, usr, pocket_id, 1) && !(place_item.item_flags & ABSTRACT))
to_chat(usr, "<span class='notice'>You try to place [place_item] into [src]'s [pocket_side] pocket.</span>")
delay_denominator = 4
else
return
if(do_mob(usr, src, POCKET_STRIP_DELAY/delay_denominator)) //placing an item into the pocket is 4 times faster
if(pocket_item)
if(pocket_item == (pocket_id == ITEM_SLOT_RPOCKET ? r_store : l_store)) //item still in the pocket we search
dropItemToGround(pocket_item)
else
if(place_item)
if(place_item.mob_can_equip(src, usr, pocket_id, FALSE, TRUE))
usr.temporarilyRemoveItemFromInventory(place_item, TRUE)
equip_to_slot(place_item, pocket_id, TRUE)
//do nothing otherwise
//updating inv screen after handled by living/Topic()
else
// Display a warning if the user mocks up
to_chat(src, "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>")
if(href_list["toggle_uniform"] && usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY))
var/obj/item/clothing/under/U = get_item_by_slot(ITEM_SLOT_ICLOTHING)
to_chat(src, "<span class='notice'>[usr.name] is trying to adjust your [U].</span>")
if(do_mob(usr, src, U.strip_delay/2))
to_chat(src, "<span class='notice'>[usr.name] successfully adjusted your [U].</span>")
U.toggle_jumpsuit_adjust()
update_inv_w_uniform()
update_body()
var/mob/living/user = usr
if(istype(user) && href_list["shoes"] && shoes && (user.mobility_flags & MOBILITY_USE)) // we need to be on the ground, so we'll be a bit looser
shoes.handle_tying(usr)
///////HUDs///////
if(href_list["hud"])
if(!ishuman(usr))
return
var/mob/living/carbon/human/H = usr
var/perpname = get_face_name(get_id_name(""))
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD) && !HAS_TRAIT(H, TRAIT_MEDICAL_HUD))
return
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.general)
if(href_list["photo_front"] || href_list["photo_side"])
if(!R)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD) && !HAS_TRAIT(H, TRAIT_MEDICAL_HUD))
return
var/obj/item/photo/P = null
if(href_list["photo_front"])
P = R.fields["photo_front"]
else if(href_list["photo_side"])
P = R.fields["photo_side"]
if(P)
P.show(H)
return
if(href_list["hud"] == "m")
if(!HAS_TRAIT(H, TRAIT_MEDICAL_HUD))
return
if(href_list["evaluation"])
if(!getBruteLoss() && !getFireLoss() && !getOxyLoss() && getToxLoss() < 20)
to_chat(usr, "<span class='notice'>No external injuries detected.</span><br>")
return
var/span = "notice"
var/status = ""
if(getBruteLoss())
to_chat(usr, "<b>Physical trauma analysis:</b>")
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
var/brutedamage = BP.brute_dam
if(brutedamage > 0)
status = "received minor physical injuries."
span = "notice"
if(brutedamage > 20)
status = "been seriously damaged."
span = "danger"
if(brutedamage > 40)
status = "sustained major trauma!"
span = "userdanger"
if(brutedamage)
to_chat(usr, "<span class='[span]'>[BP] appears to have [status]</span>")
if(getFireLoss())
to_chat(usr, "<b>Analysis of skin burns:</b>")
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
var/burndamage = BP.burn_dam
if(burndamage > 0)
status = "signs of minor burns."
span = "notice"
if(burndamage > 20)
status = "serious burns."
span = "danger"
if(burndamage > 40)
status = "major burns!"
span = "userdanger"
if(burndamage)
to_chat(usr, "<span class='[span]'>[BP] appears to have [status]</span>")
if(getOxyLoss())
to_chat(usr, "<span class='danger'>Patient has signs of suffocation, emergency treatment may be required!</span>")
if(getToxLoss() > 20)
to_chat(usr, "<span class='danger'>Gathered data is inconsistent with the analysis, possible cause: poisoning.</span>")
if(!H.wear_id) //You require access from here on out.
to_chat(H, "<span class='warning'>ERROR: Invalid access</span>")
return
var/list/access = H.wear_id.GetAccess()
if(!(ACCESS_MEDICAL in access))
to_chat(H, "<span class='warning'>ERROR: Invalid access</span>")
return
if(href_list["p_stat"])
var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel")
if(!R)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_MEDICAL_HUD))
return
if(health_status && health_status != "Cancel")
R.fields["p_stat"] = health_status
return
if(href_list["m_stat"])
var/health_status = input(usr, "Specify a new mental status for this person.", "Medical HUD", R.fields["m_stat"]) in list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel")
if(!R)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_MEDICAL_HUD))
return
if(health_status && health_status != "Cancel")
R.fields["m_stat"] = health_status
return
return //Medical HUD ends here.
if(href_list["hud"] == "s")
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
if(usr.stat || usr == src) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten
// Checks the user has security clearence before allowing them to change arrest status via hud, comment out to enable all access
var/allowed_access = null
var/obj/item/clothing/glasses/hud/security/G = H.glasses
if(istype(G) && (G.obj_flags & EMAGGED))
allowed_access = "@%&ERROR_%$*"
else //Implant and standard glasses check access
if(H.wear_id)
var/list/access = H.wear_id.GetAccess()
if(ACCESS_SECURITY in access)
allowed_access = H.get_authentification_name()
if(!allowed_access)
to_chat(H, "<span class='warning'>ERROR: Invalid access.</span>")
return
if(!perpname)
to_chat(H, "<span class='warning'>ERROR: Can not identify target.</span>")
return
R = find_record("name", perpname, GLOB.data_core.security)
if(!R)
to_chat(usr, "<span class='warning'>ERROR: Unable to locate data core entry for target.</span>")
return
if(href_list["status"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Paroled", "Discharged", "Cancel")
if(setcriminal != "Cancel")
if(!R)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
investigate_log("[key_name(src)] has been set from [R.fields["criminal"]] to [setcriminal] by [key_name(usr)].", INVESTIGATE_RECORDS)
R.fields["criminal"] = setcriminal
sec_hud_set_security_status()
return
if(href_list["view"])
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
for(var/datum/data/crime/c in R.fields["crim"])
to_chat(usr, "<b>Crime:</b> [c.crimeName]")
if (c.crimeDetails)
to_chat(usr, "<b>Details:</b> [c.crimeDetails]")
else
to_chat(usr, "<b>Details:</b> <A href='?src=[REF(src)];hud=s;add_details=1;cdataid=[c.dataId]'>\[Add details]</A>")
to_chat(usr, "Added by [c.author] at [c.time]")
to_chat(usr, "----------")
to_chat(usr, "<b>Notes:</b> [R.fields["notes"]]")
return
if(href_list["add_citation"])
var/maxFine = CONFIG_GET(number/maxfine)
var/t1 = stripped_input("Please input citation crime:", "Security HUD", "", null)
var/fine = FLOOR(input("Please input citation fine, up to [maxFine]:", "Security HUD", 50) as num|null, 1)
if(!R || !t1 || !fine || !allowed_access)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
if(fine < 0)
to_chat(usr, "<span class='warning'>You're pretty sure that's not how money works.</span>")
return
fine = min(fine, maxFine)
var/crime = GLOB.data_core.createCrimeEntry(t1, "", allowed_access, station_time_timestamp(), fine)
for (var/obj/item/pda/P in GLOB.PDAs)
if(P.owner == R.fields["name"])
var/message = "You have been fined [fine] credits for '[t1]'. Fines may be paid at security."
var/datum/signal/subspace/messaging/pda/signal = new(src, list(
"name" = "Security Citation",
"job" = "Citation Server",
"message" = message,
"targets" = list("[P.owner] ([P.ownjob])"),
"automated" = 1
))
signal.send_to_receivers()
usr.log_message("(PDA: Citation Server) sent \"[message]\" to [signal.format_target()]", LOG_PDA)
GLOB.data_core.addCitation(R.fields["id"], crime)
investigate_log("New Citation: <strong>[t1]</strong> Fine: [fine] | Added to [R.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
return
if(href_list["add_crime"])
var/t1 = stripped_input("Please input crime name:", "Security HUD", "", null)
if(!R || !t1 || !allowed_access)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, null, allowed_access, station_time_timestamp())
GLOB.data_core.addCrime(R.fields["id"], crime)
investigate_log("New Crime: <strong>[t1]</strong> | Added to [R.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
to_chat(usr, "<span class='notice'>Successfully added a crime.</span>")
return
if(href_list["add_details"])
var/t1 = stripped_input(usr, "Please input crime details:", "Secure. records", "", null)
if(!R || !t1 || !allowed_access)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
if(href_list["cdataid"])
GLOB.data_core.addCrimeDetails(R.fields["id"], href_list["cdataid"], t1)
investigate_log("New Crime details: [t1] | Added to [R.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
to_chat(usr, "<span class='notice'>Successfully added details.</span>")
return
if(href_list["view_comment"])
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
to_chat(usr, "<b>Comments/Log:</b>")
var/counter = 1
while(R.fields[text("com_[]", counter)])
to_chat(usr, R.fields[text("com_[]", counter)])
to_chat(usr, "----------")
counter++
return
if(href_list["add_comment"])
var/t1 = stripped_multiline_input("Add Comment:", "Secure. records", null, null)
if (!R || !t1 || !allowed_access)
return
if(!H.canUseHUD())
return
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
counter++
R.fields[text("com_[]", counter)] = text("Made by [] on [] [], []<BR>[]", allowed_access, station_time_timestamp(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
to_chat(usr, "<span class='notice'>Successfully added comment.</span>")
return
..() //end of this massive fucking chain. TODO: make the hud chain not spooky. - Yeah, great job doing that.
/mob/living/carbon/human/proc/canUseHUD()
return (mobility_flags & MOBILITY_USE)
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = 0)
. = 1 // Default to returning true.
if(user && !target_zone)
target_zone = user.zone_selected
if(HAS_TRAIT(src, TRAIT_PIERCEIMMUNE))
. = 0
// If targeting the head, see if the head item is thin enough.
// If targeting anything else, see if the wear suit is thin enough.
if (!penetrate_thick)
if(above_neck(target_zone))
if(head && istype(head, /obj/item/clothing))
var/obj/item/clothing/CH = head
if (CH.clothing_flags & THICKMATERIAL)
. = 0
else
if(wear_suit && istype(wear_suit, /obj/item/clothing))
var/obj/item/clothing/CS = wear_suit
if (CS.clothing_flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
to_chat(user, "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].</span>")
/mob/living/carbon/human/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
if(judgement_criteria & JUDGE_EMAGGED)
return 10 //Everyone is a criminal!
var/threatcount = 0
//Lasertag bullshit
if(lasercolor)
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
if(istype(wear_suit, /obj/item/clothing/suit/redtag))
threatcount += 4
if(is_holding_item_of_type(/obj/item/gun/energy/laser/redtag))
threatcount += 4
if(istype(belt, /obj/item/gun/energy/laser/redtag))
threatcount += 2
if(lasercolor == "r")
if(istype(wear_suit, /obj/item/clothing/suit/bluetag))
threatcount += 4
if(is_holding_item_of_type(/obj/item/gun/energy/laser/bluetag))
threatcount += 4
if(istype(belt, /obj/item/gun/energy/laser/bluetag))
threatcount += 2
return threatcount
//Check for ID
var/obj/item/card/id/idcard = get_idcard(FALSE)
if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name=="Unknown")
threatcount += 4
//Check for weapons
if( (judgement_criteria & JUDGE_WEAPONCHECK) && weaponcheck)
if(!idcard || !(ACCESS_WEAPONS in idcard.access))
for(var/obj/item/I in held_items) //if they're holding a gun
if(weaponcheck.Invoke(I))
threatcount += 4
if(weaponcheck.Invoke(belt) || weaponcheck.Invoke(back)) //if a weapon is present in the belt or back slot
threatcount += 2 //not enough to trigger look_for_perp() on it's own unless they also have criminal status.
//Check for arrest warrant
if(judgement_criteria & JUDGE_RECORDCHECK)
var/perpname = get_face_name(get_id_name())
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.security)
if(R && R.fields["criminal"])
switch(R.fields["criminal"])
if("*Arrest*")
threatcount += 5
if("Incarcerated")
threatcount += 2
if("Paroled")
threatcount += 2
//Check for dresscode violations
if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard))
threatcount += 2
//Check for nonhuman scum
if(dna && dna.species.id && dna.species.id != "human")
threatcount += 1
//mindshield implants imply trustworthyness
if(HAS_TRAIT(src, TRAIT_MINDSHIELD))
threatcount -= 1
//Agent cards lower threatlevel.
if(istype(idcard, /obj/item/card/id/syndicate))
threatcount -= 5
return threatcount
//Used for new human mobs created by cloning/goleming/podding
/mob/living/carbon/human/proc/set_cloned_appearance()
if(gender == MALE)
facial_hairstyle = "Full Beard"
else
facial_hairstyle = "Shaved"
hairstyle = pick("Bedhead", "Bedhead 2", "Bedhead 3")
underwear = "Nude"
update_body()
update_hair()
/mob/living/carbon/human/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_THREE)
for(var/obj/item/hand in held_items)
if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && dropItemToGround(hand))
step_towards(hand, src)
to_chat(src, "<span class='warning'>\The [S] pulls \the [hand] from your grip!</span>")
rad_act(current_size * 3)
#define CPR_PANIC_SPEED (0.8 SECONDS)
/// Performs CPR on the target after a delay.
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/target)
var/panicking = FALSE
do
CHECK_DNA_AND_SPECIES(target)
if (INTERACTING_WITH(src, target))
return FALSE
if (target.stat == DEAD || HAS_TRAIT(target, TRAIT_FAKEDEATH))
to_chat(src, "<span class='warning'>[target.name] is dead!</span>")
return FALSE
if (is_mouth_covered())
to_chat(src, "<span class='warning'>Remove your mask first!</span>")
return FALSE
if (target.is_mouth_covered())
to_chat(src, "<span class='warning'>Remove [p_their()] mask first!</span>")
return FALSE
if (!getorganslot(ORGAN_SLOT_LUNGS))
to_chat(src, "<span class='warning'>You have no lungs to breathe with, so you cannot perform CPR!</span>")
return FALSE
if (HAS_TRAIT(src, TRAIT_NOBREATH))
to_chat(src, "<span class='warning'>You do not breathe, so you cannot perform CPR!</span>")
return FALSE
visible_message("<span class='notice'>[src] is trying to perform CPR on [target.name]!</span>", \
"<span class='notice'>You try to perform CPR on [target.name]... Hold still!</span>")
if (!do_mob(src, target, time = panicking ? CPR_PANIC_SPEED : (3 SECONDS)))
to_chat(src, "<span class='warning'>You fail to perform CPR on [target]!</span>")
return FALSE
if (target.health > target.crit_threshold)
return FALSE
visible_message("<span class='notice'>[src] performs CPR on [target.name]!</span>", "<span class='notice'>You perform CPR on [target.name].</span>")
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "perform_cpr", /datum/mood_event/perform_cpr)
log_combat(src, target, "CPRed")
if (HAS_TRAIT(target, TRAIT_NOBREATH))
to_chat(target, "<span class='unconscious'>You feel a breath of fresh air... which is a sensation you don't recognise...</span>")
else if (!target.getorganslot(ORGAN_SLOT_LUNGS))
to_chat(target, "<span class='unconscious'>You feel a breath of fresh air... but you don't feel any better...</span>")
else
target.adjustOxyLoss(-min(target.getOxyLoss(), 7))
to_chat(target, "<span class='unconscious'>You feel a breath of fresh air enter your lungs... It feels good...</span>")
if (target.health <= target.crit_threshold)
if (!panicking)
to_chat(src, "<span class='warning'>[target] still isn't up! You try harder!</span>")
panicking = TRUE
else
panicking = FALSE
while (panicking)
#undef CPR_PANIC_SPEED
/mob/living/carbon/human/cuff_resist(obj/item/I)
if(dna && dna.check_mutation(HULK))
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
if(..(I, cuff_break = FAST_CUFFBREAK))
dropItemToGround(I)
else
if(..())
dropItemToGround(I)
/**
* Wash the hands, cleaning either the gloves if equipped and not obscured, otherwise the hands themselves if they're not obscured.
*
* Returns false if we couldn't wash our hands due to them being obscured, otherwise true
*/
/mob/living/carbon/human/proc/wash_hands(clean_types)
var/list/obscured = check_obscured_slots()
if(ITEM_SLOT_GLOVES in obscured)
return FALSE
if(gloves)
if(gloves.wash(clean_types))
update_inv_gloves()
else if((clean_types & CLEAN_TYPE_BLOOD) && blood_in_hands > 0)
blood_in_hands = 0
update_inv_gloves()
return TRUE
/**
* Cleans the lips of any lipstick. Returns TRUE if the lips had any lipstick and was thus cleaned
*/
/mob/living/carbon/human/proc/clean_lips()
if(isnull(lip_style) && lip_color == initial(lip_color))
return FALSE
lip_style = null
lip_color = initial(lip_color)
update_body()
return TRUE
/**
* Called on the COMSIG_COMPONENT_CLEAN_FACE_ACT signal
*/
/mob/living/carbon/human/proc/clean_face(datum/source, clean_types)
if(!is_mouth_covered() && clean_lips())
. = TRUE
if(glasses && is_eyes_covered(FALSE, TRUE, TRUE) && glasses.wash(clean_types))
update_inv_glasses()
. = TRUE
var/list/obscured = check_obscured_slots()
if(wear_mask && !(ITEM_SLOT_MASK in obscured) && wear_mask.wash(clean_types))
update_inv_wear_mask()
. = TRUE
/**
* Called when this human should be washed
*/
/mob/living/carbon/human/wash(clean_types)
. = ..()
// Wash equipped stuff that cannot be covered
if(wear_suit?.wash(clean_types))
update_inv_wear_suit()
. = TRUE
if(belt?.wash(clean_types))
update_inv_belt()
. = TRUE
// Check and wash stuff that can be covered
var/list/obscured = check_obscured_slots()
if(w_uniform && !(ITEM_SLOT_ICLOTHING in obscured) && w_uniform.wash(clean_types))
update_inv_w_uniform()
. = TRUE
if(!is_mouth_covered() && clean_lips())
. = TRUE
// Wash hands if exposed
if(!gloves && (clean_types & CLEAN_TYPE_BLOOD) && blood_in_hands > 0 && !(ITEM_SLOT_GLOVES in obscured))
blood_in_hands = 0
update_inv_gloves()
. = TRUE
//Turns a mob black, flashes a skeleton overlay
//Just like a cartoon!
/mob/living/carbon/human/proc/electrocution_animation(anim_duration)
//Handle mutant parts if possible
if(dna && dna.species)
add_atom_colour("#000000", TEMPORARY_COLOUR_PRIORITY)
var/static/mutable_appearance/electrocution_skeleton_anim
if(!electrocution_skeleton_anim)
electrocution_skeleton_anim = mutable_appearance(icon, "electrocuted_base")
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR|KEEP_APART
add_overlay(electrocution_skeleton_anim)
addtimer(CALLBACK(src, .proc/end_electrocution_animation, electrocution_skeleton_anim), anim_duration)
else //or just do a generic animation
flick_overlay_view(image(icon,src,"electrocuted_generic",ABOVE_MOB_LAYER), src, anim_duration)
/mob/living/carbon/human/proc/end_electrocution_animation(mutable_appearance/MA)
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
cut_overlay(MA)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dexterity=FALSE, no_tk=FALSE, floor_okay=FALSE)
if(!(mobility_flags & MOBILITY_UI) && !floor_okay)
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
return FALSE
if(!Adjacent(M) && (M.loc != src))
if((be_close == FALSE) || (!no_tk && (dna.check_mutation(TK) && tkMaxRangeCheck(src, M))))
return TRUE
to_chat(src, "<span class='warning'>You are too far away!</span>")
return FALSE
return TRUE
/mob/living/carbon/human/resist_restraints()
if(wear_suit && wear_suit.breakouttime)
changeNext_move(CLICK_CD_BREAKOUT)
last_special = world.time + CLICK_CD_BREAKOUT
cuff_resist(wear_suit)
else
..()
/mob/living/carbon/human/clear_cuffs(obj/item/I, cuff_break)
. = ..()
if(.)
return
if(!I.loc || buckled)
return FALSE
if(I == wear_suit)
visible_message("<span class='danger'>[src] manages to [cuff_break ? "break" : "remove"] [I]!</span>")
to_chat(src, "<span class='notice'>You successfully [cuff_break ? "break" : "remove"] [I].</span>")
return TRUE
/mob/living/carbon/human/replace_records_name(oldname,newname) // Only humans have records right now, move this up if changed.
for(var/list/L in list(GLOB.data_core.general,GLOB.data_core.medical,GLOB.data_core.security,GLOB.data_core.locked))
var/datum/data/record/R = find_record("name", oldname, L)
if(R)
R.fields["name"] = newname
/mob/living/carbon/human/get_total_tint()
. = ..()
if(glasses)
. += glasses.tint
/mob/living/carbon/human/update_health_hud()
if(!client || !hud_used)
return
if(dna.species.update_health_hud())
return
else
if(hud_used.healths)
var/health_amount = min(health, maxHealth - getStaminaLoss())
if(..(health_amount)) //not dead
switch(hal_screwyhud)
if(SCREWYHUD_CRIT)
hud_used.healths.icon_state = "health6"
if(SCREWYHUD_DEAD)
hud_used.healths.icon_state = "health7"
if(SCREWYHUD_HEALTHY)
hud_used.healths.icon_state = "health0"
if(hud_used.healthdoll)
hud_used.healthdoll.cut_overlays()
if(stat != DEAD)
hud_used.healthdoll.icon_state = "healthdoll_OVERLAY"
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
var/damage = BP.burn_dam + BP.brute_dam
var/comparison = (BP.max_damage/5)
var/icon_num = 0
if(damage)
icon_num = 1
if(damage > (comparison))
icon_num = 2
if(damage > (comparison*2))
icon_num = 3
if(damage > (comparison*3))
icon_num = 4
if(damage > (comparison*4))
icon_num = 5
if(hal_screwyhud == SCREWYHUD_HEALTHY)
icon_num = 0
if(icon_num)
hud_used.healthdoll.add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[BP.body_zone][icon_num]"))
for(var/t in get_missing_limbs()) //Missing limbs
hud_used.healthdoll.add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[t]6"))
for(var/t in get_disabled_limbs()) //Disabled limbs
hud_used.healthdoll.add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[t]7"))
else
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
/mob/living/carbon/human/fully_heal(admin_revive = FALSE)
dna?.species.spec_fully_heal(src)
if(admin_revive)
regenerate_limbs()
regenerate_organs()
remove_all_embedded_objects()
set_heartattack(FALSE)
drunkenness = 0
for(var/datum/mutation/human/HM in dna.mutations)
if(HM.quality != POSITIVE)
dna.remove_mutation(HM.name)
return ..()
/mob/living/carbon/human/check_weakness(obj/item/weapon, mob/living/attacker)
. = ..()
if (dna && dna.species)
. += dna.species.check_species_weakness(weapon, attacker)
/mob/living/carbon/human/is_literate()
return TRUE
/mob/living/carbon/human/can_hold_items()
return TRUE
/mob/living/carbon/human/update_gravity(has_gravity,override = 0)
if(dna && dna.species) //prevents a runtime while a human is being monkeyfied
override = dna.species.override_float
..()
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, toxic = FALSE, harm = TRUE, force = FALSE, purge = FALSE)
if(blood && (NOBLOOD in dna.species.species_traits) && !HAS_TRAIT(src, TRAIT_TOXINLOVER))
if(message)
visible_message("<span class='warning'>[src] dry heaves!</span>", \
"<span class='userdanger'>You try to throw up, but there's nothing in your stomach!</span>")
if(stun)
Paralyze(200)
return 1
..()
/mob/living/carbon/human/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION("", "---------")
VV_DROPDOWN_OPTION(VV_HK_COPY_OUTFIT, "Copy Outfit")
VV_DROPDOWN_OPTION(VV_HK_MOD_MUTATIONS, "Add/Remove Mutation")
VV_DROPDOWN_OPTION(VV_HK_MOD_QUIRKS, "Add/Remove Quirks")
VV_DROPDOWN_OPTION(VV_HK_MAKE_MONKEY, "Make Monkey")
VV_DROPDOWN_OPTION(VV_HK_MAKE_CYBORG, "Make Cyborg")
VV_DROPDOWN_OPTION(VV_HK_MAKE_SLIME, "Make Slime")
VV_DROPDOWN_OPTION(VV_HK_MAKE_ALIEN, "Make Alien")
VV_DROPDOWN_OPTION(VV_HK_SET_SPECIES, "Set Species")
VV_DROPDOWN_OPTION(VV_HK_PURRBATION, "Toggle Purrbation")
/mob/living/carbon/human/vv_do_topic(list/href_list)
. = ..()
if(href_list[VV_HK_COPY_OUTFIT])
if(!check_rights(R_SPAWN))
return
copy_outfit()
if(href_list[VV_HK_MOD_MUTATIONS])
if(!check_rights(R_SPAWN))
return
var/list/options = list("Clear"="Clear")
for(var/x in subtypesof(/datum/mutation/human))
var/datum/mutation/human/mut = x
var/name = initial(mut.name)
options[dna.check_mutation(mut) ? "[name] (Remove)" : "[name] (Add)"] = mut
var/result = input(usr, "Choose mutation to add/remove","Mutation Mod") as null|anything in sortList(options)
if(result)
if(result == "Clear")
dna.remove_all_mutations()
else
var/mut = options[result]
if(dna.check_mutation(mut))
dna.remove_mutation(mut)
else
dna.add_mutation(mut)
if(href_list[VV_HK_MOD_QUIRKS])
if(!check_rights(R_SPAWN))
return
var/list/options = list("Clear"="Clear")
for(var/x in subtypesof(/datum/quirk))
var/datum/quirk/T = x
var/qname = initial(T.name)
options[has_quirk(T) ? "[qname] (Remove)" : "[qname] (Add)"] = T
var/result = input(usr, "Choose quirk to add/remove","Quirk Mod") as null|anything in sortList(options)
if(result)
if(result == "Clear")