/
human.dm
2752 lines (2456 loc) · 89 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
name = "human"
real_name = "human"
voice_name = "human"
icon = 'mob.dmi'
icon_state = "m-none"
var/r_hair = 0.0
var/g_hair = 0.0
var/b_hair = 0.0
var/h_style = "Short Hair"
var/datum/sprite_accessory/hair/hair_style
var/r_facial = 0.0
var/g_facial = 0.0
var/b_facial = 0.0
var/f_style = "Shaved"
var/datum/sprite_accessory/facial_hair/facial_hair_style
var/r_eyes = 0.0
var/g_eyes = 0.0
var/b_eyes = 0.0
var/s_tone = 0.0
var/species = "Human"
age = 30.0
var/used_skillpoints = 0
var/skill_specialization = null
var/list/skills = null
// var/b_type
var/obj/item/clothing/suit/wear_suit = null
var/obj/item/clothing/under/w_uniform = null
var/obj/item/clothing/shoes/shoes = null
var/obj/item/weapon/belt = null
var/obj/item/clothing/gloves/gloves = null
var/obj/item/clothing/glasses/glasses = null
var/obj/item/clothing/head/head = null
var/obj/item/clothing/ears/l_ear = null
var/obj/item/clothing/ears/r_ear = null
var/obj/item/weapon/card/id/wear_id = null
var/obj/item/weapon/r_store = null
var/obj/item/weapon/l_store = null
var/obj/item/weapon/s_store = null
var/icon/stand_icon = null
var/icon/lying_icon = null
var/last_b_state = 1.0
var/image/face_standing = null
var/image/face_lying = null
var/hair_icon_state = "hair_a"
var/face_icon_state = "bald"
var/list/body_standing = list()
var/list/body_lying = list()
var/mutantrace = null
var/bloodloss = 0
var/datum/reagents/vessel
var/pale = 0
var/examine_text = ""
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
nodamage = 1
universal_speak = 1
/mob/living/carbon/human/New()
..()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
if(!dna)
dna = new /datum/dna(null)
new /datum/organ/external/chest(src)
new /datum/organ/external/groin(src)
new /datum/organ/external/head(src)
new /datum/organ/external/l_arm(src)
new /datum/organ/external/r_arm(src)
new /datum/organ/external/r_leg(src)
new /datum/organ/external/l_leg(src)
new /datum/organ/external/l_hand(src)
new /datum/organ/external/l_foot(src)
new /datum/organ/external/r_hand(src)
new /datum/organ/external/r_foot(src)
var/datum/organ/external/part = organs["chest"]
part.children = list(organs["r_leg"],organs["l_leg"],organs["r_arm"],organs["l_arm"],organs["groin"],organs["head"])
part = organs["head"]
part.parent = organs["chest"]
part = organs["groin"]
part.parent = organs["chest"]
part = organs["r_leg"]
part.children = list(organs["r_foot"])
part.parent = organs["chest"]
part = organs["l_leg"]
part.children = list(organs["l_foot"])
part.parent = organs["chest"]
part = organs["r_arm"]
part.children = list(organs["r_hand"])
part.parent = organs["chest"]
part = organs["l_arm"]
part.children = list(organs["l_hand"])
part.parent = organs["chest"]
part = organs["r_foot"]
part.parent = organs["r_leg"]
part = organs["l_foot"]
part.parent = organs["l_leg"]
part = organs["r_hand"]
part.parent = organs["r_arm"]
part = organs["l_hand"]
part.parent = organs["l_arm"]
var/g = "m"
if (gender == MALE)
g = "m"
else if (gender == FEMALE)
g = "f"
else
gender = MALE
g = "m"
spawn(1)
stand_icon = new /icon('human.dmi', "body_[g]_s")
lying_icon = new /icon('human.dmi', "body_[g]_l")
icon = stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
spawn(10) // Failsafe for.. weirdness.
update_clothing()
update_body()
vessel = new/datum/reagents(600)
vessel.my_atom = src
vessel.add_reagent("blood",560)
spawn(1)
fixblood()
..()
spawn(5) // Failsafe for.. weirdness.
update_clothing()
update_body()
/*var/known_languages = list()
known_languages.Add("english")*/
// organStructure = new /obj/effect/organstructure/human(src)
/mob/living/carbon/human/proc/fixblood()
for(var/datum/reagent/blood/B in vessel.reagent_list)
if(B.id == "blood")
B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null,"virus2"=(virus2 ? virus2.getcopy() : null),"antibodies"=0)
/mob/living/carbon/human/proc/drip(var/amt as num)
if(!amt)
return
var/amm = 0.1 * amt
var/turf/T = get_turf(src)
var/list/obj/effect/decal/cleanable/blood/drip/nums = list()
var/list/iconL = list("1","2","3","4","5")
vessel.remove_reagent("blood",amm)
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
nums += G
iconL.Remove(G.icon_state)
if(nums.len >= 3)
var/obj/effect/decal/cleanable/blood/drip/D = pick(nums)
D.blood_DNA[dna.unique_enzymes] = dna.b_type
if(virus2)
D.virus2 = virus2.getcopy()
return
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
this.icon_state = pick(iconL)
this.blood_DNA = list()
this.blood_DNA[dna.unique_enzymes] = dna.b_type
this.blood_owner = src
if(virus2)
this.virus2 = virus2.getcopy()
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if (ismob(AM))
var/mob/tmob = AM
//BubbleWrap - Should stop you pushing a restrained person out of the way
if(istype(tmob, /mob/living/carbon/human))
for(var/mob/M in range(tmob, 1))
if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "\red [tmob] is restrained, you cannot push past"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "\red [tmob] is restraining [M], you cannot push past"
now_pushing = 0
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
if(Metroid.Victim == tmob)
Metroid.UpdateFeed()
return
/*if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
if(prob(40) && !(mutations & FAT))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return*/
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
spawn(0)
..()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = 0
return
return
/mob/living/carbon/human/movement_delay()
var/tally = 0
var/mob/M = pulling
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if(analgesic) return -1
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
var/health_deficiency = traumatic_shock
if(health_deficiency >= 40) tally += (health_deficiency / 25)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/50
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
var/datum/organ/external/o = organs["[organ]"]
if(o.broken)
tally += 6
if(wear_suit)
tally += wear_suit.slowdown
if(shoes)
tally += shoes.slowdown
/*if(mutations & FAT)
tally += 1.5*/
if(bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
if (stuttering < 10)
stuttering = 10
if(shock_stage >= 10) tally += 3
if(tally < 0)
tally = 0
if(mutations & mRun)
tally = 0
if(istype(M) && M.lying) //Pulling lying down people is slower
tally += 3
return tally
/mob/living/carbon/human/Stat()
..()
statpanel("Status")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
if (client.statpanel == "Status")
if (internal)
if (!internal.air_contents)
del(internal)
else
stat("Internal Atmosphere Info", internal.name)
stat("Tank Pressure", internal.air_contents.return_pressure())
stat("Distribution Pressure", internal.distribute_pressure)
if (mind)
if (mind.special_role == "Changeling" && changeling)
stat("Chemical Storage", changeling.chem_charges)
stat("Genetic Damage Time", changeling.geneticdamage)
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
stat("Energy Charge", round(wear_suit:cell:charge/100))
/mob/living/carbon/human/ex_act(severity)
flick("flash", flash)
// /obj/item/clothing/suit/bomb_suit(src)
// /obj/item/clothing/head/bomb_hood(src)
/*
if (stat == 2 && client)
gib()
return
else if (stat == 2 && !client)
gibs(loc, viruses)
del(src)
return
*/
var/shielded = 0
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
b_loss += 500
if (!prob(getarmor(null, "bomb")))
gib()
return
else
var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(target, 200, 4)
//return
// var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src)))
//user.throw_at(target, 200, 4)
if (2.0)
if (!shielded)
b_loss += 60
f_loss += 60
if (!prob(getarmor(null, "bomb")))
b_loss = b_loss/1.5
f_loss = f_loss/1.5
if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))
ear_damage += 30
ear_deaf += 120
if(3.0)
b_loss += 30
if (!prob(getarmor(null, "bomb")))
b_loss = b_loss/2
if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))
ear_damage += 15
ear_deaf += 60
if (prob(50) && !shielded)
Paralyse(10)
for(var/name in organs)
var/datum/organ/external/temp = organs[name]
var/au_msg = "Explosion" // for autopsy
switch(temp.name)
if("head")
temp.take_damage(b_loss * 0.2, f_loss * 0.2, 0, used_weapon = au_msg)
if("chest")
temp.take_damage(b_loss * 0.4, f_loss * 0.4, 0, used_weapon = au_msg)
if("l_arm")
temp.take_damage(b_loss * 0.05, f_loss * 0.05, 0, used_weapon = au_msg)
if("r_arm")
temp.take_damage(b_loss * 0.05, f_loss * 0.05, 0, used_weapon = au_msg)
if("l_leg")
temp.take_damage(b_loss * 0.05, f_loss * 0.05, 0, used_weapon = au_msg)
if("r_leg")
temp.take_damage(b_loss * 0.05, f_loss * 0.05, 0, used_weapon = au_msg)
UpdateDamageIcon()
/mob/living/carbon/human/blob_act()
if(stat == 2) return
show_message("\red The blob attacks you!")
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
apply_damage(rand(30,40), BRUTE, affecting, run_armor_check(affecting, "melee"))
UpdateDamageIcon()
return
/mob/living/carbon/human/u_equip(obj/item/W as obj)
if (W == wear_suit)
W = s_store
if (W)
u_equip(W)
if (client)
client.screen -= W
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
wear_suit = null
else if (W == w_uniform)
W = r_store
if (W)
u_equip(W)
if (client)
client.screen -= W
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
W = l_store
if (W)
u_equip(W)
if (client)
client.screen -= W
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
W = wear_id
if (W)
u_equip(W)
if (client)
client.screen -= W
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
W = belt
if (W)
u_equip(W)
if (client)
client.screen -= W
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
w_uniform = null
else if (W == gloves)
gloves = null
else if (W == glasses)
glasses = null
else if (W == head)
var/obj/item/prev_head = W
head = null
if(prev_head && (prev_head.flags & BLOCKHAIR))
// rebuild face
del(face_standing)
del(face_lying)
else if (W == l_ear)
l_ear = null
else if (W == r_ear)
r_ear = null
else if (W == shoes)
shoes = null
else if (W == belt)
belt = null
else if (W == wear_mask)
var/obj/item/prev_mask = W
if(internal)
if (internals)
internals.icon_state = "internal0"
internal = null
wear_mask = null
if(prev_mask && (prev_mask.flags & BLOCKHAIR))
// rebuild face
del(face_standing)
del(face_lying)
else if (W == wear_id)
wear_id = null
else if (W == r_store)
r_store = null
else if (W == l_store)
l_store = null
else if (W == s_store)
s_store = null
else if (W == back)
back = null
else if (W == handcuffed)
handcuffed = null
else if (W == r_hand)
r_hand = null
else if (W == l_hand)
l_hand = null
update_clothing()
/mob/living/carbon/human/db_click(text, t1)
var/obj/item/W = equipped()
var/emptyHand = (W == null)
if ((!emptyHand) && (!istype(W, /obj/item)))
return
if (emptyHand)
usr.next_move = usr.prev_move
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
switch(text)
if("mask")
if (wear_mask)
if (emptyHand)
wear_mask.DblClick()
return
if (!( istype(W, /obj/item/clothing/mask) ))
return
u_equip(W)
wear_mask = W
if(wear_mask && (wear_mask.flags & BLOCKHAIR))
del(face_standing)
del(face_lying)
W.equipped(src, text)
if("back")
if (back)
if (emptyHand)
back.DblClick()
return
if (!istype(W, /obj/item))
return
if (!( W.flags & ONBACK ))
return
if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
return
u_equip(W)
back = W
W.equipped(src, text)
/* if("headset")
if (ears)
if (emptyHand)
ears.DblClick()
return
if (!( istype(W, /obj/item/device/radio/headset) ))
return
u_equip(W)
w_radio = W
W.equipped(src, text) */
if("o_clothing")
if (wear_suit)
if (emptyHand)
wear_suit.DblClick()
return
if (!( istype(W, /obj/item/clothing/suit) ))
return
/*if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
src << "\red You're too fat to wear the [W.name]!"
return*/
u_equip(W)
wear_suit = W
W.equipped(src, text)
if("gloves")
if (gloves)
if (emptyHand)
gloves.DblClick()
return
if (!( istype(W, /obj/item/clothing/gloves) ))
return
u_equip(W)
gloves = W
W.equipped(src, text)
if("shoes")
if (shoes)
if (emptyHand)
shoes.DblClick()
return
if (!( istype(W, /obj/item/clothing/shoes) ))
return
u_equip(W)
shoes = W
W.equipped(src, text)
if("belt")
if (belt)
if (emptyHand)
belt.DblClick()
return
if (!W || !W.flags || !( W.flags & ONBELT ))
return
u_equip(W)
belt = W
W.equipped(src, text)
if("eyes")
if (glasses)
if (emptyHand)
glasses.DblClick()
return
if (!( istype(W, /obj/item/clothing/glasses) ))
return
u_equip(W)
glasses = W
W.equipped(src, text)
if("head")
if (head)
if (emptyHand)
head.DblClick()
return
if (( istype(W, /obj/item/weapon/paper) ))
u_equip(W)
head = W
else if (!( istype(W, /obj/item/clothing/head) ))
return
u_equip(W)
head = W
if(head && (head.flags & BLOCKHAIR))
del(face_standing)
del(face_lying)
if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src)
W.equipped(src, text)
if("l_ear")
if (l_ear)
if (emptyHand)
l_ear.DblClick()
return
else if(emptyHand)
return
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
return
if(istype(W,/obj/item/clothing/ears) && W:twoeared && r_ear)
return
u_equip(W)
l_ear = W
if(istype(W,/obj/item/clothing/ears) && W:twoeared)
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
equip_if_possible(O, slot_ears)
W.equipped(src, text)
if("r_ear")
if (r_ear)
if (emptyHand)
r_ear.DblClick()
return
else if(emptyHand)
return
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
return
if(istype(W,/obj/item/clothing/ears) && W:twoeared && l_ear)
return
u_equip(W)
r_ear = W
if(istype(W,/obj/item/clothing/ears) && W:twoeared)
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
equip_if_possible(O, slot_ears)
W.equipped(src, text)
if("i_clothing")
if (w_uniform)
if (emptyHand)
w_uniform.DblClick()
return
if (!( istype(W, /obj/item/clothing/under) ))
return
/*if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
src << "\red You're too fat to wear the [W.name]!"
return*/
u_equip(W)
w_uniform = W
W.equipped(src, text)
if("id")
if (wear_id)
if (emptyHand)
wear_id.DblClick()
return
if (!w_uniform)
return
if (!istype(W, /obj/item/weapon/card/id) && !istype(W, /obj/item/device/pda) )
return
u_equip(W)
wear_id = W
W.equipped(src, text)
if("storage1")
if (l_store)
if (emptyHand)
l_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
return
u_equip(W)
l_store = W
if("storage2")
if (r_store)
if (emptyHand)
r_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
return
u_equip(W)
r_store = W
if("suit storage")
if (s_store)
if (emptyHand)
s_store.DblClick()
return
var/confirm
if (wear_suit)
if(!wear_suit.allowed)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
return
if (istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/pen))
confirm = 1
if (is_type_in_list(W, wear_suit.allowed))
confirm = 1
if (!confirm) return
else
u_equip(W)
s_store = W
update_clothing()
return
/mob/living/carbon/human/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
var/datum/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
if(!affecting || affecting.destroyed) return
if (istype(O, /obj/effect/immovablerod))
affecting.take_damage(101, 0)
else
affecting.take_damage((istype(O, /obj/effect/meteor/small) ? 10 : 25), 30)
UpdateDamageIcon()
updatehealth()
return
/mob/living/carbon/human/Move(a, b, flag)
if (buckled)
return
if (restrained())
pulling = null
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
pulling = null
return
else
if(Debug)
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
pulling = null
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/t = M.pulling
M.pulling = null
//this is the gay blood on floor shit -- Added back -- Skie
if (M.lying && (prob(M.getBruteLoss() / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
pulling = null
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
pulling = null
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/human/update_clothing()
..()
if (monkeyizing)
return
overlays = null
// lol
var/fat = ""
if (mutations & FAT)
fat = "fat"
if (mutations & HULK)
overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat]_[gender][!lying ? "_s" : "_l"]")
if (mutations & COLD_RESISTANCE)
overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]")
if (mutations & TK)
overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]")
if (mutations & LASER)
overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]")
if (mutantrace)
switch(mutantrace)
if("golem","metroid")
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat][!lying ? "_s" : "_l"]")
if(face_standing)
del(face_standing)
if(face_lying)
del(face_lying)
if(stand_icon)
del(stand_icon)
if(lying_icon)
del(lying_icon)
if("lizard")
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]")
if(face_standing)
del(face_standing)
if(face_lying)
del(face_lying)
if(stand_icon)
del(stand_icon)
if(lying_icon)
del(lying_icon)
if("plant")
if(stat != 2) //if not dead, that is
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]")
else
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d")
if(face_standing)
del(face_standing)
if(face_lying)
del(face_lying)
if(stand_icon)
del(stand_icon)
if(lying_icon)
del(lying_icon)
else
if(!face_standing || !face_lying)
update_face()
if(!stand_icon || !lying_icon)
update_body()
if(buckled)
if(istype(buckled, /obj/structure/stool/bed/chair))
lying = 0
else
lying = 1
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
if (!w_uniform)
for (var/obj/item/thing in list(r_store, l_store, wear_id, belt))
if (thing)
u_equip(thing)
if (client)
client.screen -= thing
if (thing)
thing.loc = loc
thing.dropped(src)
thing.layer = initial(thing.layer)
//if (zone_sel)
// zone_sel.overlays = null
// zone_sel.overlays += body_standing
// zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting))
if (lying)
icon = lying_icon
overlays += body_lying
if (face_lying)
overlays += face_lying
else
icon = stand_icon
overlays += body_standing
if (face_standing)
overlays += face_standing
// Uniform
if(w_uniform)
/*if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL))
src << "\red You burst out of the [w_uniform.name]!"
var/obj/item/clothing/c = w_uniform
u_equip(c)
if(client)
client.screen -= c
if(c)
c:loc = loc
c:dropped(src)
c:layer = initial(c:layer)*/
if(w_uniform)//I should really not need these
w_uniform.screen_loc = ui_iclothing
if(istype(w_uniform, /obj/item/clothing/under))
var/t1 = w_uniform.color
if (!t1)
t1 = icon_state
if (mutations & FAT)
overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER)
else
overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER)
if (w_uniform.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]")
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
if (wear_id)
if(wear_id.over_jumpsuit)
overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = MOB_LAYER)
if (client)
client.screen -= hud_used.intents
client.screen -= hud_used.mov_int
//Screenlocs for these slots are handled by the huds other_update()
//because theyre located on the 'other' inventory bar.
// Gloves