-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathother_reagents.dm
2074 lines (1759 loc) · 73.4 KB
/
other_reagents.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
/datum/reagent/blood
name = "Blood"
color = COLOR_BLOOD
metabolization_rate = 5 //fast rate so it disappears fast.
taste_description = "iron"
taste_mult = 1.3
glass_icon_state = "glass_red"
glass_name = "glass of tomato juice"
glass_desc = "Are you sure this is tomato juice?"
shot_glass_icon_state = "shotglassred"
data = list(
"donor" = null,
"viruses" = null,
"blood_DNA" = null,
"blood_type" = null,
"resistances" = null,
"trace_chem" = null,
"mind" = null,
"ckey" = null,
"gender" = null,
"real_name" = null,
"cloneable" = null,
"factions" = null,
"quirks" = null
)
/datum/reagent/blood/reaction_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
var/datum/antagonist/bloodsucker/bloodsuckerdatum = IS_BLOODSUCKER(L) //bloodsucker start
if(bloodsuckerdatum)
bloodsuckerdatum.bloodsucker_blood_volume = min(bloodsuckerdatum.bloodsucker_blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM(L))
return //bloodsucker end
if(data && data["viruses"])
for(var/thing in data["viruses"])
var/datum/disease/D = thing
if((D.spread_flags & DISEASE_SPREAD_SPECIAL) || (D.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS))
continue
if((methods & (TOUCH|VAPOR)) && permeability)
if(D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS)
L.ContactContractDisease(D)
else //ingest, patch or inject
L.ForceContractDisease(D)
if(iscarbon(L))
var/mob/living/carbon/exposed_carbon = L
if(exposed_carbon.get_blood_id() == /datum/reagent/blood && (methods == INJECT || (methods == INGEST && exposed_carbon.dna && exposed_carbon.dna.species && (DRINKSBLOOD in exposed_carbon.dna.species.species_traits))))
if(data && data["blood_type"])
var/datum/blood_type/blood_type = data["blood_type"]
if(blood_type.type in exposed_carbon.dna.blood_type.compatible_types)
exposed_carbon.blood_volume = min(exposed_carbon.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM(L))
return
exposed_carbon.reagents.add_reagent(/datum/reagent/toxin, reac_volume * 0.5)
/datum/reagent/blood/on_new(list/data)
if(istype(data))
SetViruses(src, data)
var/datum/blood_type/blood_type = data["blood_type"]
if(blood_type)
color = blood_type.color
/datum/reagent/blood/on_merge(list/mix_data)
if(data && mix_data)
if(data["blood_DNA"] != mix_data["blood_DNA"])
data["cloneable"] = 0 //On mix, consider the genetic sampling unviable for pod cloning if the DNA sample doesn't match.
if(data["viruses"] || mix_data["viruses"])
var/list/mix1 = data["viruses"]
var/list/mix2 = mix_data["viruses"]
// Stop issues with the list changing during mixing.
var/list/to_mix = list()
for(var/datum/disease/advance/AD in mix1)
to_mix += AD
for(var/datum/disease/advance/AD in mix2)
to_mix += AD
var/datum/disease/advance/AD = Advance_Mix(to_mix)
if(AD)
var/list/preserve = list(AD)
for(var/D in data["viruses"])
if(!istype(D, /datum/disease/advance))
preserve += D
data["viruses"] = preserve
return 1
/datum/reagent/blood/proc/get_diseases()
. = list()
if(data && data["viruses"])
for(var/thing in data["viruses"])
var/datum/disease/D = thing
. += D
/datum/reagent/blood/reaction_turf(turf/T, reac_volume)//splash the blood all over the place
if(!istype(T))
return
if(reac_volume < 3)
return
var/obj/effect/decal/cleanable/blood/B = locate() in T //find some blood here
if(!B)
B = new(T)
if(data["blood_DNA"])
B.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
/datum/reagent/liquidgibs
name = "Liquid gibs"
color = "#FF9966"
description = "You don't even want to think about what's in here."
taste_description = "gross iron"
shot_glass_icon_state = "shotglassred"
/datum/reagent/polysmorphblood
name = "Polysmorph blood"
color = "#96BB00"
description = "The blood of a polysmorph"
taste_description = "acidic"
/datum/reagent/vaccine
//data must contain virus type
name = "Vaccine"
color = "#C81040" // rgb: 200, 16, 64
taste_description = "slime"
/datum/reagent/vaccine/reaction_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(islist(data) && (((methods & INGEST) && reac_volume >= 5) || (methods & INJECT)))//drinking it requires at least 5u, injection doesn't
for(var/thing in L.diseases)
var/datum/disease/D = thing
if(D.GetDiseaseID() in data)
D.cure()
L.disease_resistances |= data
/datum/reagent/vaccine/on_merge(list/data)
if(istype(data))
src.data |= data.Copy()
/datum/reagent/water
name = "Water"
description = "An ubiquitous chemical substance that is composed of hydrogen and oxygen."
color = "#00B8FF" // rgb: 170, 170, 170, 77 (alpha)
taste_description = "water"
evaporation_rate = 4 // water goes fast
glass_icon_state = "glass_clear"
glass_name = "glass of water"
glass_desc = "The father of all refreshments."
shot_glass_icon_state = "shotglassclear"
compatible_biotypes = ALL_BIOTYPES
default_container = /obj/item/reagent_containers/glass/beaker/waterbottle/large
/*
* Water reaction to turf
*/
/datum/reagent/water/reaction_turf(turf/open/T, reac_volume)
if(!istype(T))
return
if(reac_volume >= 5)
T.MakeSlippery(TURF_WET_WATER, 120 SECONDS, min(reac_volume * 3 SECONDS, 300 SECONDS)) //yogs
for(var/mob/living/simple_animal/slime/M in T)
M.apply_water()
T.extinguish_turf()
var/obj/effect/acid/A = (locate(/obj/effect/acid) in T)
if(A)
A.acid_level = max(A.acid_level - reac_volume*50, 0)
/*
* Water reaction to an object
*/
/datum/reagent/water/reaction_obj(obj/O, reac_volume)
O.extinguish()
O.acid_level = 0
// Monkey cube
if(istype(O, /obj/item/reagent_containers/food/snacks/monkeycube))
var/obj/item/reagent_containers/food/snacks/monkeycube/cube = O
cube.Expand()
// Dehydrated carp
else if(istype(O, /obj/item/toy/plush/carpplushie/dehy_carp))
var/obj/item/toy/plush/carpplushie/dehy_carp/dehy = O
dehy.Swell() // Makes a carp
else if(istype(O, /obj/item/stack/sheet/hairlesshide))
var/obj/item/stack/sheet/hairlesshide/HH = O
new /obj/item/stack/sheet/wetleather(get_turf(HH), HH.amount)
qdel(HH)
/*
* Water reaction to a mob
*/
/datum/reagent/water/reaction_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)//Splashing people with water can help put them out!
if(!istype(M))
return
if(methods & TOUCH)
// some nice cold water to WAKE THE FUCK UP
// 20 units of water = 1 hug of antisleep
M.AdjustUnconscious(-reac_volume*0.3 SECONDS)
M.AdjustSleeping(-reac_volume*0.5 SECONDS)
// this function allows lower volumes to still do something without preventing higher volumes from causing too much wetness
M.adjust_wet_stacks(3*log(2, (reac_volume*M.get_permeability(null, TRUE) + 10) / 10))
M.extinguish_mob() // permeability affects the negative fire stacks but not the extinguishing
// if preternis, update wetness instantly when applying more water instead of waiting for the next life tick
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/species/preternis/P = H.dna?.species
if(istype(P))
P.handle_wetness(H)
..()
/datum/reagent/water/on_mob_life(mob/living/carbon/M)
. = ..()
var/body_temperature_difference = BODYTEMP_NORMAL - M.bodytemperature
M.adjust_bodytemperature(min(3,body_temperature_difference))
if(M.blood_volume)
M.blood_volume += 0.1 // water is good for you!
/datum/reagent/water/holywater
name = "Holy Water"
description = "Water blessed by some deity."
color = "#E0E8EF" // rgb: 224, 232, 239
glass_icon_state = "glass_clear"
glass_name = "glass of holy water"
glass_desc = "A glass of holy water."
self_consuming = TRUE //divine intervention won't be limited by the lack of a liver
/datum/reagent/water/holywater/on_mob_metabolize(mob/living/L)
..()
ADD_TRAIT(L, TRAIT_HOLY, type)
/datum/reagent/water/holywater/on_mob_end_metabolize(mob/living/L)
REMOVE_TRAIT(L, TRAIT_HOLY, type)
..()
/datum/reagent/water/holywater/reaction_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(is_servant_of_ratvar(M))
to_chat(M, span_userdanger("A darkness begins to spread its unholy tendrils through your mind, purging the Justiciar's influence!"))
..()
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M)
if(M.blood_volume)
M.blood_volume += 0.1 // water is good for you!
if(!data)
data = list("misc" = 1)
data["misc"]++
M.adjust_jitter_up_to(4 SECONDS, 20 SECONDS)
if(iscultist(M))
for(var/datum/action/innate/cult/blood_magic/BM in M.actions)
to_chat(M, span_cultlarge("Your blood rites falter as holy water scours your body!"))
for(var/datum/action/innate/cult/blood_spell/BS in BM.spells)
qdel(BS)
if(data["misc"] >= 25) // 10 units, 45 seconds @ metabolism 0.4 units & tick rate 1.8 sec
M.adjust_stutter_up_to(4 SECONDS, 20 SECONDS)
M.set_dizzy_if_lower(10 SECONDS)
if(iscultist(M) && prob(20))
M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","R'ge Na'sie","Diabo us Vo'iscum","Eld' Mon Nobis"), forced = "holy water")
if(prob(10))
M.visible_message(span_danger("[M] starts having a seizure!"), span_userdanger("You have a seizure!"))
M.Unconscious(120)
to_chat(M, "<span class='cultlarge'>[pick("Your blood is your bond - you are nothing without it", "Do not forget your place", \
"All that power, and you still fail?", "If you cannot scour this poison, I shall scour your meager life!")].</span>")
else if(is_servant_of_ratvar(M) && prob(8))
switch(pick("speech", "message", "emote"))
if("speech")
clockwork_say(M, "...[text2ratvar(pick("Engine... your light grows dark...", "Where are you, master?", "He lies rusting in Error...", "Purge all untruths and... and... something..."))]")
if("message")
to_chat(M, "<span class='boldwarning'>[pick("Ratvar's illumination of your mind has begun to flicker", "He lies rusting in Reebe, derelict and forgotten. And there he shall stay", \
"You can't save him. Nothing can save him now", "It seems that Nar'sie will triumph after all")].</span>")
if("emote")
M.visible_message(span_warning("[M] [pick("whimpers quietly", "shivers as though cold", "glances around in paranoia")]."))
if(data["misc"] >= 60) // 30 units, 135 seconds
if(iscultist(M) || is_servant_of_ratvar(M))
if(iscultist(M))
M.remove_cultist(FALSE, TRUE)
else if(is_servant_of_ratvar(M))
remove_servant_of_ratvar(M)
M.remove_status_effect(/datum/status_effect/jitter)
M.remove_status_effect(/datum/status_effect/speech/stutter)
holder.remove_reagent(type, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
return
if(ishuman(M) && IS_VAMPIRE(M) && prob(80)) // Yogs Start
var/datum/antagonist/vampire/V = M.mind.has_antag_datum(ANTAG_DATUM_VAMPIRE)
if(!V.get_ability(/datum/vampire_passive/full))
switch(data)
if(1 to 4)
to_chat(M, span_warning("Something sizzles in your veins!"))
M.adjustFireLoss(0.5)
if(5 to 12)
to_chat(M, span_danger("You feel an intense burning inside of you!"))
M.adjustFireLoss(1)
if(13 to INFINITY)
M.visible_message("<span class='danger'>[M] suddenly bursts into flames!<span>", span_userdanger("You suddenly ignite in a holy fire!"))
M.adjust_fire_stacks(3)
M.ignite_mob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire
M.adjustFireLoss(3) //Hence the other damages... ain't I a bastard? // Yogs End
if(ishuman(M) && is_sinfuldemon(M) && prob(80))
switch(data)
if(1 to 4)
to_chat(M, span_warning("Your unholy blood begins to burn as holy power creeps through you."))
M.adjustFireLoss(1)
if(5 to 10)
to_chat(M, span_danger("The burning deepens and strengthens!"))
M.adjustFireLoss(2)
if(11 to 12)
to_chat(M, span_danger("Your flesh itself begins to melt apart in agony!"))
M.adjustFireLoss(3)
M.emote("scream")
if(13 to INFINITY)
M.visible_message("<span class='danger'>[M] suddenly ignites in a brilliant flash of white!<span>", span_userdanger("You suddenly ignite in a holy fire!"))
M.adjust_fire_stacks(3)
M.ignite_mob()
M.adjustFireLoss(4)
holder.remove_reagent(type, 0.4) //fixed consumption to prevent balancing going out of whack
/datum/reagent/water/holywater/reaction_turf(turf/T, reac_volume)
..()
if(!istype(T))
return
if(reac_volume>=10)
for(var/obj/effect/rune/R in T)
qdel(R)
T.Bless()
/datum/reagent/fuel/unholywater //if you somehow managed to extract this from someone, dont splash it on yourself and have a smoke
name = "Unholy Water"
description = "Something that shouldn't exist on this plane of existence."
taste_description = "suffering"
/datum/reagent/fuel/unholywater/reaction_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if((methods & (TOUCH|VAPOR)) && permeability)
M.reagents.add_reagent(type, permeability * reac_volume / 4)
return
return ..()
/datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/M)
if(iscultist(M))
M.adjust_drowsiness(-5 SECONDS)
M.AdjustAllImmobility(-40, FALSE)
M.adjustStaminaLoss(-10, 0)
M.adjustToxLoss(-2, 0)
M.adjustOxyLoss(-2, 0)
M.adjustBruteLoss(-2, 0)
M.adjustFireLoss(-2, 0)
if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL(M))
M.blood_volume += 3
else // Will deal about 90 damage when 50 units are thrown
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150)
M.adjustToxLoss(2, 0)
M.adjustFireLoss(2, 0)
M.adjustOxyLoss(2, 0)
M.adjustBruteLoss(2, 0)
holder.remove_reagent(type, 1)
return TRUE
/datum/reagent/hellwater //if someone has this in their system they've really pissed off an eldrich god
name = "Hell Water"
description = "YOUR FLESH! IT BURNS!"
taste_description = "burning"
accelerant_quality = 20
compatible_biotypes = ALL_BIOTYPES
/datum/reagent/hellwater/on_mob_life(mob/living/carbon/M)
M.fire_stacks = min(5,M.fire_stacks + 3)
M.ignite_mob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire
M.adjustToxLoss(1, 0)
M.adjustFireLoss(1, 0) //Hence the other damages... ain't I a bastard?
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5, 150)
holder.remove_reagent(type, 1)
/datum/reagent/eldritch
name = "Eldritch Essence"
description = "Strange liquid that defies the laws of physics"
taste_description = "glass"
color = "#1f8016"
compatible_biotypes = ALL_BIOTYPES
/datum/reagent/eldritch/on_mob_life(mob/living/carbon/M)
if(IS_HERETIC(M) || IS_HERETIC_MONSTER(M))
M.adjust_drowsiness(-5 SECONDS)
M.AdjustAllImmobility(-40, FALSE)
M.adjustStaminaLoss(-10, FALSE)
M.adjustToxLoss(-2, FALSE)
M.adjustOxyLoss(-2, FALSE)
M.adjustBruteLoss(-2, FALSE, FALSE, BODYPART_ANY)
M.adjustFireLoss(-2, FALSE, FALSE, BODYPART_ANY)
if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL(M))
M.blood_volume += 3
else
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150)
M.adjustToxLoss(2, FALSE)
M.adjustFireLoss(2, FALSE, FALSE, BODYPART_ANY)
M.adjustOxyLoss(2, FALSE)
M.adjustBruteLoss(2, FALSE, FALSE, BODYPART_ANY)
holder.remove_reagent(type, 1)
return TRUE
/datum/reagent/medicine/omnizine/godblood
name = "Godblood"
description = "Slowly heals all damage types. Has a rather high overdose threshold. Glows with mysterious power."
overdose_threshold = 150
/datum/reagent/lube
name = "Space Lube"
description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them. giggity."
color = "#009CA8" // rgb: 0, 156, 168
taste_description = "cherry" // by popular demand
compatible_biotypes = ALL_BIOTYPES
metabolization_rate = 2 * REAGENTS_METABOLISM // Double speed
/datum/reagent/lube/reaction_turf(turf/open/T, reac_volume)
if (!istype(T))
return
if(reac_volume >= 1)
T.MakeSlippery(TURF_WET_LUBE, 15 SECONDS, min(reac_volume * 2 SECONDS, 120))
/datum/reagent/lube/on_mob_metabolize(mob/living/L)
..()
if(isipc(L))
L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-0.8, blacklisted_movetypes=(FLYING|FLOATING))
/datum/reagent/lube/on_mob_end_metabolize(mob/living/L)
L.remove_movespeed_modifier(type)
..()
/datum/reagent/lube/on_mob_life(mob/living/carbon/C)
. = ..()
if(!isipc(C))
return
C.adjustFireLoss(3)
if(prob(10))
to_chat(C, span_warning("You slowly burn up as your internal mechanisms work faster than intended."))
/datum/reagent/spraytan
name = "Spray Tan"
description = "A substance applied to the skin to darken the skin."
color = "#FFC080" // rgb: 255, 196, 128 Bright orange
metabolization_rate = 10 * REAGENTS_METABOLISM // very fast, so it can be applied rapidly. But this changes on an overdose
overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle.
taste_description = "sour oranges"
var/saved_color
/datum/reagent/spraytan/reaction_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(ishuman(M))
if(methods & (PATCH|VAPOR))
var/mob/living/carbon/human/N = M
if(N.dna.species.id == SPECIES_HUMAN)
switch(N.skin_tone)
if("african1")
N.skin_tone = "african2"
if("indian")
N.skin_tone = "mixed2"
if("arab")
N.skin_tone = "indian"
if("asian2")
N.skin_tone = "arab"
if("asian1")
N.skin_tone = "asian2"
if("mediterranean")
N.skin_tone = "mixed1"
if("latino")
N.skin_tone = "mediterranean"
if("caucasian3")
N.skin_tone = "mediterranean"
if("caucasian2")
N.skin_tone = pick("caucasian3", "latino")
if("caucasian1")
N.skin_tone = "caucasian2"
if ("albino")
N.skin_tone = "caucasian1"
if("mixed1")
N.skin_tone = "mixed2"
if("mixed2")
N.skin_tone = "mixed3"
if("mixed3")
N.skin_tone = "african1"
if("mixed4")
N.skin_tone = "mixed3"
if(MUTCOLORS in N.dna.species.species_traits) //take current alien color and darken it slightly
var/newcolor = ""
var/string = N.dna.features["mcolor"]
var/len = length(string)
var/char = ""
var/ascii = 0
for(var/i=1, i<=len, i += length(char))
char = string[i]
ascii = text2ascii(char)
switch(ascii)
if(48)
newcolor += "0"
if(49 to 57)
newcolor += ascii2text(ascii-1) //numbers 1 to 9
if(97)
newcolor += "9"
if(98 to 102)
newcolor += ascii2text(ascii-1) //letters b to f lowercase
if(65)
newcolor +="9"
if(66 to 70)
newcolor += ascii2text(ascii+31) //letters B to F - translates to lowercase
else
break
if(ReadHSV(newcolor)[3] >= ReadHSV("#777777")[3])
N.dna.features["mcolor"] = newcolor
N.regenerate_icons()
if(methods & INGEST)
if(show_message)
to_chat(M, span_notice("That tasted horrible."))
..()
/datum/reagent/spraytan/overdose_process(mob/living/M)
metabolization_rate = 1 * REAGENTS_METABOLISM
if(ishuman(M))
var/mob/living/carbon/human/N = M
if(!HAS_TRAIT(M, TRAIT_BALD))
N.hair_style = "Spiky"
N.facial_hair_style = "Shaved"
N.facial_hair_color = "000"
N.hair_color = "000"
if(!(HAIR in N.dna.species.species_traits)) //No hair? No problem!
N.dna.species.species_traits += HAIR
if(N.dna.species.use_skintones)
saved_color = N.skin_tone
N.skin_tone = "orange"
else if(MUTCOLORS in N.dna.species.species_traits) //Aliens with custom colors simply get turned orange
saved_color = N.dna.features["mcolor"]
N.dna.features["mcolor"] = "#FF8800"
N.regenerate_icons()
if(prob(7))
if(N.w_uniform)
M.visible_message(pick("<b>[M]</b>'s collar pops up without warning.</span>", "<b>[M]</b> flexes [M.p_their()] arms."))
else
M.visible_message("<b>[M]</b> flexes [M.p_their()] arms.")
if(prob(10))
M.say(pick("Shit was SO cash.", "You are everything bad in the world.", "What sports do you play, other than 'jack off to naked drawn Japanese people?'", "Don???t be a stranger. Just hit me with your best shot.", "My name is John and I hate every single one of you."), forced = /datum/reagent/spraytan)
..()
return
/datum/reagent/spraytan/on_mob_delete(mob/living/M)
if(ishuman(M) && saved_color)
var/mob/living/carbon/human/N = M
if(N.dna.species.use_skintones)
N.skin_tone = saved_color
else if(MUTCOLORS in N.dna.species.species_traits)
N.dna.features["mcolor"] = saved_color
N.regenerate_icons()
..()
/datum/reagent/mutationtoxin
name = "Stable Mutation Toxin"
description = "A humanizing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
metabolization_rate = 0.1 //has to be low so it can metabolize for longer at the same reagent counts
taste_description = "slime"
var/datum/species/race = /datum/species/human
var/mutationtext = span_danger("The pain subsides. You feel... human.")
var/frozen = FALSE //warnings for the reagent being in/active
var/already_mutating = FALSE //no return point for mutation so we don't spam ourselves
/datum/reagent/mutationtoxin/on_mob_life(mob/living/carbon/human/H)
..()
if(!istype(H))
return
if(!data)
data = list("transfurmation" = 1)
to_chat(H, span_warning("Something begins to shift under your skin, and you feel like you are heating up...")) //I think this is the best way to say "hey you should probably cool down to avoid this"
if(H.bodytemperature >= T0C + 10 && !H.reagents.has_reagent(/datum/reagent/consumable/ice)) //if we're consuming ice, or have cooled ourselves, the toxin stops because slimes hate cold
data["transfurmation"]++
if(frozen)
frozen = FALSE
to_chat(H, span_warning("The movement beneath your skin picks up again..."))
else
data["transfurmation"]--
if(!frozen)
frozen = TRUE
to_chat(H, span_warning("The movement beneath your skin stops, for now..."))
if(!frozen) //welcome to flavor town
if(data["transfurmation"] == 10) //that's bad cable management
to_chat(H, span_warning("You feel uncomfortably warm."))
if(data["transfurmation"] == 25) //take them out
to_chat(H, span_warning("Your insides feel like jelly."))
if(data["transfurmation"] == 40) //fix. them.
to_chat(H, span_warning("Your skin is wrong. Your skin is wrong."))
if(data["transfurmation"] >= 50 && !already_mutating) //~100 seconds & 5 units at 2 seconds per process & 0.1 metabolization rate
already_mutating = TRUE
var/current_species = H.dna.species.type
var/datum/species/mutation = race
if(mutation && mutation != current_species) //the real mutation was the friends we made along the way :)
to_chat(H, span_warning("<b>You crumple in agony as your flesh wildly morphs into new forms!</b>"))
H.visible_message("<b>[H]</b> falls to the ground and screams as [H.p_their()] skin bubbles and froths!") //'froths' sounds painful when used with SKIN.
H.Knockdown(2 SECONDS)
addtimer(CALLBACK(src, PROC_REF(mutate), H), 2 SECONDS)
else
to_chat(H, span_notice("There is a sudden, relieving lack of skin shifting."))
H.reagents.del_reagent(type) //adios
return
/datum/reagent/mutationtoxin/on_mob_end_metabolize(mob/living/L)
..()
to_chat(L, span_notice("There is sudden, relieving lack of skin shifting."))
/datum/reagent/mutationtoxin/proc/mutate(mob/living/carbon/human/H)
if(QDELETED(H))
return
to_chat(H, mutationtext)
H.set_species(race)
if(HAS_TRAIT(H, TRAIT_GENELESS))
if(H.has_dna())
H.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), TRUE)
H.reagents.del_reagent(type) //adios
/datum/reagent/mutationtoxin/classic //The one from plasma on green slimes
name = "Mutation Toxin"
description = "A corruptive toxin."
color = "#13BC5E" // rgb: 19, 188, 94
race = /datum/species/jelly/slime
mutationtext = span_danger("The pain subsides. Your whole body feels like slime.")
/datum/reagent/mutationtoxin/felinid
name = "Felinid Mutation Toxin"
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/human/felinid
mutationtext = span_danger("The pain subsides. You feel... like a degenerate.")
/datum/reagent/mutationtoxin/lizard
name = "Lizard Mutation Toxin"
description = "A lizarding toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/lizard
mutationtext = span_danger("The pain subsides. You feel... scaly.")
/datum/reagent/mutationtoxin/fly
name = "Fly Mutation Toxin"
description = "An insectifying toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/fly
mutationtext = span_danger("The pain subsides. You feel... buzzy.")
/datum/reagent/mutationtoxin/moth
name = "Moth Mutation Toxin"
description = "A glowing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/moth
mutationtext = span_danger("The pain subsides. You feel... attracted to light.")
/datum/reagent/mutationtoxin/pod
name = "Podperson Mutation Toxin"
description = "A vegetalizing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/pod
mutationtext = span_danger("The pain subsides. You feel... plantlike.")
/datum/reagent/mutationtoxin/ethereal
name = "Ethereal Mutation Toxin"
description = "An electrifying toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/ethereal
mutationtext = span_danger("The pain subsides. You feel... ecstatic.")
/datum/reagent/mutationtoxin/preternis
name = "Preternis Mutation Toxin"
description = "A metallic precursor toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/preternis
mutationtext = span_danger("The pain subsides. You feel... optimized.")
/datum/reagent/mutationtoxin/polysmorph
name = "Polysmorph Mutation Toxin"
description = "An acidic toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/polysmorph
mutationtext = span_danger("The pain subsides. You feel... Alien.")
/datum/reagent/mutationtoxin/jelly
name = "Imperfect Mutation Toxin"
description = "An jellyfying toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/jelly
mutationtext = span_danger("The pain subsides. You feel... wobbly.")
/datum/reagent/mutationtoxin/golem
name = "Golem Mutation Toxin"
description = "A crystal toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/golem/random
mutationtext = span_danger("The pain subsides. You feel... rocky.")
/datum/reagent/mutationtoxin/abductor
name = "Abductor Mutation Toxin"
description = "An alien toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/abductor
mutationtext = span_danger("The pain subsides. You feel... alien.")
//BLACKLISTED RACES
/datum/reagent/mutationtoxin/skeleton
name = "Skeleton Mutation Toxin"
description = "A scary toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/skeleton
mutationtext = span_danger("The pain subsides. You feel... spooky.")
/datum/reagent/mutationtoxin/zombie
name = "Zombie Mutation Toxin"
description = "An undead toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/zombie //Not the infectious kind. The days of xenobio zombie outbreaks are long past.
mutationtext = span_danger("The pain subsides. You feel... undead.")
/datum/reagent/mutationtoxin/ash
name = "Ash Mutation Toxin"
description = "An ashen toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/lizard/ashwalker
mutationtext = span_danger("The pain subsides. You feel... savage.")
//DANGEROUS RACES
/datum/reagent/mutationtoxin/shadow
name = "Shadow Mutation Toxin"
description = "A dark toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/shadow
mutationtext = span_danger("The pain subsides. You feel... darker.")
/datum/reagent/mutationtoxin/plasma
name = "Plasma Mutation Toxin"
description = "A plasma-based toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
can_synth = FALSE //uhh no? we don't want people mass producing fire skeleton toxin?
race = /datum/species/plasmaman
mutationtext = span_danger("The pain subsides. You feel... flammable.")
/datum/reagent/slime_toxin
name = "Slime Mutation Toxin"
description = "A toxin that turns organic material into slime."
color = "#5EFF3B" //RGB: 94, 255, 59
taste_description = "slime"
metabolization_rate = 0.2
/datum/reagent/slime_toxin/on_mob_life(mob/living/carbon/human/H)
..()
if(!istype(H))
return
if(!H.dna || !H.dna.species || !(H.mob_biotypes & MOB_ORGANIC))
return
if(isjellyperson(H))
to_chat(H, span_warning("Your jelly shifts and morphs, turning you into another subspecies!"))
var/species_type = pick(subtypesof(/datum/species/jelly))
H.set_species(species_type)
H.reagents.del_reagent(type)
switch(current_cycle)
if(1 to 6)
if(prob(10))
to_chat(H, span_warning("[pick("You don't feel very well.", "Your skin feels a little slimy.")]"))
if(7 to 12)
if(prob(10))
to_chat(H, span_warning("[pick("Your appendages are melting away.", "Your limbs begin to lose their shape.")]"))
if(13 to 19)
if(prob(10))
to_chat(H, span_warning("[pick("You feel your internal organs turning into slime.", "You feel very slimelike.")]"))
if(20 to INFINITY)
var/species_type = pick(subtypesof(/datum/species/jelly))
H.set_species(species_type)
H.reagents.del_reagent(type)
to_chat(H, span_warning("You have become a jellyperson!")) // Yogs -- text macro fix
/datum/reagent/mulligan
name = "Mulligan Toxin"
description = "This toxin will rapidly change the DNA of human beings. Commonly used by Syndicate spies and assassins in need of an emergency ID change."
color = "#5EFF3B" //RGB: 94, 255, 59
metabolization_rate = INFINITY
taste_description = "slime"
/datum/reagent/mulligan/on_mob_life(mob/living/carbon/human/H)
..()
if (!istype(H))
return
to_chat(H, span_warning("<b>You grit your teeth in pain as your body rapidly mutates!</b>"))
H.visible_message("<b>[H]</b> suddenly transforms!")
randomize_human(H)
H.dna.update_dna_identity()
/datum/reagent/aslimetoxin
name = "Advanced Mutation Toxin"
description = "An advanced corruptive toxin produced by slimes."
color = "#13BC5E" // rgb: 19, 188, 94
can_synth = FALSE //sorry, wrong maintenance pill, enjoy being a dumb slime permanently
taste_description = "slime"
/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, methods = TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(!(methods & TOUCH) && prob(permeability * 100))
M.ForceContractDisease(new /datum/disease/transformation/slime(), FALSE, TRUE)
/datum/reagent/gluttonytoxin
name = "Gluttony's Blessing"
description = "An advanced corruptive toxin produced by something terrible."
color = "#5EFF3B" //RGB: 94, 255, 59
can_synth = FALSE
taste_description = "decay"
/datum/reagent/gluttonytoxin/reaction_mob(mob/living/M, methods = TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(prob(permeability * 100))
M.ForceContractDisease(new /datum/disease/transformation/morph(), FALSE, TRUE)
/datum/reagent/ghosttoxin
name = "Ghost's Curse"
description = "An advanced corruptive toxin produced by something otherwordly."
color = "#5EFF3B" //RGB: 94, 255, 59
can_synth = FALSE
taste_description = "decay"
/datum/reagent/ghosttoxin/reaction_mob(mob/living/M, methods = TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(prob(permeability * 100))
M.ForceContractDisease(new /datum/disease/transformation/ghost(), FALSE, TRUE)
/datum/reagent/serotrotium
name = "Serotrotium"
description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans."
color = "#202040" // rgb: 20, 20, 40
metabolization_rate = 0.25 * REAGENTS_METABOLISM
taste_description = "bitterness"
/datum/reagent/serotrotium/on_mob_life(mob/living/carbon/M)
if(ishuman(M))
if(prob(7))
M.emote(pick("twitch","drool","moan","gasp"))
..()
/datum/reagent/copper
name = "Copper"
description = "A highly ductile metal. Things made out of copper aren't very durable, but it makes a decent material for electrical wiring."
reagent_state = SOLID
color = "#6E3B08" // rgb: 110, 59, 8
taste_description = "metal"
/datum/reagent/copper/reaction_obj(obj/O, reac_volume)
if(istype(O, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
reac_volume = min(reac_volume, M.amount)
new/obj/item/stack/tile/bronze(get_turf(M), reac_volume)
M.use(reac_volume)
/datum/reagent/potassium
name = "Potassium"
description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water."
reagent_state = SOLID
color = "#A0A0A0" // rgb: 160, 160, 160
taste_description = "sweetness"
/datum/reagent/mercury
name = "Mercury"
description = "A curious metal that's a liquid at room temperature. Neurodegenerative and very bad for the mind."
color = "#484848" // rgb: 72, 72, 72A
taste_mult = 0 // apparently tasteless.
/datum/reagent/mercury/on_mob_life(mob/living/carbon/M)
if((M.mobility_flags & MOBILITY_MOVE) && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinals))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1)
..()
/datum/reagent/sulphur
name = "Sulphur"
description = "A sickly yellow solid mostly known for its nasty smell. It's actually much more helpful than it looks in biochemisty."
reagent_state = SOLID
color = "#BF8C00" // rgb: 191, 140, 0
taste_description = "rotten eggs"
/datum/reagent/carbon
name = "Carbon"
description = "A crumbly black solid that, while unexciting on a physical level, forms the base of all known life. Kind of a big deal."
reagent_state = SOLID
color = "#1C1300" // rgb: 30, 20, 0
taste_description = "sour chalk"
/datum/reagent/carbon/reaction_turf(turf/T, reac_volume)
if(!isspaceturf(T))
var/obj/effect/decal/cleanable/dirt/D = locate() in T.contents
if(!D)
new /obj/effect/decal/cleanable/dirt(T)
/datum/reagent/chlorine
name = "Chlorine"
description = "A pale yellow gas that's well known as an oxidizer. While it forms many harmless molecules in its elemental form it is far from harmless."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
taste_description = "chlorine"
/datum/reagent/chlorine/on_mob_life(mob/living/carbon/M)
M.take_bodypart_damage(1*REM, 0, 0, 0)
. = 1
..()
/datum/reagent/fluorine
name = "Fluorine"
description = "A comically-reactive chemical element. The universe does not want this stuff to exist in this form in the slightest."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
taste_description = "acid"
/datum/reagent/fluorine/on_mob_life(mob/living/carbon/M)
M.adjustToxLoss(1*REM, 0)
. = 1
..()
/datum/reagent/sodium
name = "Sodium"
description = "A soft silver metal that can easily be cut with a knife. It's not salt just yet, so refrain from putting in on your chips."
reagent_state = SOLID
color = "#808080" // rgb: 128, 128, 128
taste_description = "salty metal"
/datum/reagent/phosphorus
name = "Phosphorus"
description = "A ruddy red powder that burns readily. Though it comes in many colors, the general theme is always the same."
reagent_state = SOLID
color = "#832828" // rgb: 131, 40, 40
taste_description = "vinegar"
/datum/reagent/lithium
name = "Lithium"
description = "A silver metal, its claim to fame is its remarkably low density. Using it is a bit too effective in calming oneself down."
reagent_state = SOLID
color = "#808080" // rgb: 128, 128, 128
taste_description = "metal"
/datum/reagent/lithium/on_mob_life(mob/living/carbon/M)
if((M.mobility_flags & MOBILITY_MOVE) && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinals))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
..()
/datum/reagent/glycerol
name = "Glycerol"
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
color = "#808080" // rgb: 128, 128, 128
taste_description = "sweetness"
/datum/reagent/space_cleaner/sterilizine
name = "Sterilizine"
description = "Sterilizes wounds in preparation for surgery."
color = "#C8A5DC" // rgb: 200, 165, 220
taste_description = "bitterness"
toxpwr = 0
/datum/reagent/space_cleaner/sterilizine/reaction_mob(mob/living/carbon/C, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(methods & (TOUCH|VAPOR|PATCH))
for(var/s in C.surgeries)
var/datum/surgery/S = s
S.success_multiplier = max(0.2, S.success_multiplier)
// +20% success propability on each step, useful while operating in less-than-perfect conditions
..()
/datum/reagent/iron
name = "Iron"
description = "Pure iron is a metal."
reagent_state = SOLID
taste_description = "iron"
color = "#C8A5DC" // rgb: 200, 165, 220
/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
if(C.blood_volume < BLOOD_VOLUME_NORMAL(C))
C.blood_volume += 0.5
..()
/datum/reagent/iron/reaction_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(M.has_bane(BANE_IRON)) //If the target is weak to cold iron, then poison them.
if(holder && holder.chem_temp < 100) // COLD iron.
M.reagents.add_reagent(/datum/reagent/toxin, reac_volume)
..()
/datum/reagent/gold
name = "Gold"
description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known."