forked from goonstation/goonstation
/
Reagents-Misc.dm
4265 lines (3776 loc) · 132 KB
/
Reagents-Misc.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
//Contains exotic or special reagents.
ABSTRACT_TYPE(/datum/reagent/cement)
ABSTRACT_TYPE(/datum/reagent/concrete)
datum
reagent
nitroglycerin // Yes, this is a bad idea.
name = "nitroglycerin"
id = "nitroglycerin"
description = "A miracle worker in treating cardiac failure. Very, very volatile and sensitive compound. Do not run while handling this. Do not throw this. Do not splash this."
reagent_state = LIQUID
fluid_r = 220
fluid_g = 220
fluid_b = 255
transparency = 128
volatility = 3
minimum_reaction_temperature = -INFINITY
random_chem_blacklisted = 1
// These figures are for new nitro explosions
// brisance = 0.4
// power = (12.5V)^(2/3)
// 0.1 -> 1
// 1 -> 5
// 10 -> 25
// 100 -> 116
// 1000 -> 538
// explosive properties
// relatively inert as a solid (T <= 14°C)
// rather explosive as a liquid (14 °C < T <= 50 °C)
// explodes instantly as a gas (50 °C < T)
proc/explode(var/list/covered_turf, expl_reason)
var/turf/T = pick(covered_turf)
message_admins("Nitroglycerin explosion (volume = [volume]) due to [expl_reason] at [log_loc(T)].")
var/context = "???"
if(holder?.my_atom) // Erik: Fix for Cannot read null.fingerprints_full
var/list/fh = holder.my_atom.fingerprints_full
if (length(fh)) //Wire: Fix for: bad text or out of bounds
context = "Fingerprints: [jointext(fh, "")]"
logTheThing(LOG_COMBAT, usr, "is associated with a nitroglycerin explosion (volume = [volume]) due to [expl_reason] at [log_loc(T)]. Context: [context].")
explosion_new(usr, T, (12.5 * min(volume, 1000))**(2/3), 0.4) // Because people were being shit // okay its back but harder to handle // okay sci can have a little radius, as a treat
holder.del_reagent("nitroglycerin")
reaction_temperature(exposed_temperature, exposed_volume)
if (exposed_temperature <= T0C + 14)
reagent_state = SOLID
else if (exposed_temperature <= T0C + 50)
if (reagent_state == SOLID)
var/delta = exposed_temperature - holder.last_temp
if (delta > 5 && prob(delta * 5))
explode(holder.covered_turf(), "rapid thawing")
return
reagent_state = LIQUID
else
explode(holder.covered_turf(), "temperature change to gaseous form")
reaction_turf(var/turf/T, var/volume)
if(reagent_state == LIQUID || prob(2 * volume - min(14 + T0C - holder.total_temperature, 100) * 0.1))
explode(list(T), "splash on turf")
reaction_mob(var/mob/M, var/method=TOUCH, var/volume, var/paramslist = 0, var/raw_volume)
. = ..()
if(reagent_state == LIQUID || prob(2 * raw_volume - min(14 + T0C - holder.total_temperature, 100) * 0.1))
explode(list(get_turf(M)), "splash on [key_name(M)]")
reaction_obj(var/obj/O, var/volume)
return_if_overlay_or_effect(O)
if(reagent_state == LIQUID || prob(2 * volume - min(14 + T0C - holder.total_temperature, 100) * 0.1))
explode(list(get_turf(O)), "splash on [key_name(O)]")
physical_shock(var/force)
if (reagent_state == SOLID && force >= 4 && prob(force - min(14 + T0C - holder.total_temperature, 100) * 0.1))
explode(list(get_turf(holder.my_atom)), "physical trauma (force [force], usr: [key_name(usr)]) in solid state")
else if (reagent_state == LIQUID && prob(force * 6))
explode(list(get_turf(holder.my_atom)), "physical trauma (force [force], usr: [key_name(usr)]) in liquid state")
on_transfer(var/datum/reagents/source, var/datum/reagents/target, var/trans_volume)
var/datum/reagent/nitroglycerin/target_ng = target.get_reagent("nitroglycerin")
logTheThing(LOG_COMBAT, usr, "caused physical shock to nitroglycerin by transferring [trans_volume]u from [source.my_atom] to [target.my_atom].")
// mechanical dropper transfer (1u): solid at 14°C: 0%, liquid: 0%
// classic dropper transfer (5u): solid at 14°C: 0% (due to min force cap), liquid: 15%
// beaker transfer (10u): solid at -36°C: 0%, solid: 5%, liquid: 30%
// the only safe way to transfer nitroglycerin is by freezing it
// thenagain, it may explode when being thawed unless heated *very* slowly
target_ng.physical_shock(0.5 * trans_volume)
copper_nitrate
name = "copper nitrate"
id = "copper_nitrate"
description = "An intermediary which sublimates at 180 °C."
reagent_state = SOLID
fluid_r = 0
fluid_g = 0
fluid_b = 255
transparency = 255
silver_nitrate
name = "silver nitrate"
id = "silver_nitrate"
description = "A versatile precursor with some minor caustic applications."
reagent_state = SOLID
fluid_r = 220
fluid_g = 220
fluid_b = 220
transparency = 255
// silver salts are toxic
overdose = 10
reaction_mob(var/mob/M, var/method=TOUCH, var/volume_passed)
. = ..()
if (!volume_passed)
return
if (!isliving(M))
return
if (method == TOUCH)
var/mob/living/H = M
var/cauterised
if (volume_passed >= 10)
// reduce bleeding
if (H.bleeding)
H.bleeding--
cauterised = 1
// minor burning
if (volume_passed >= 50)
H.TakeDamage("chest", 0, 5, 0, DAMAGE_BURN)
else
H.TakeDamage("chest", 0, 2, 0, DAMAGE_BURN)
if (cauterised)
boutput(H, SPAN_NOTICE("The silver nitrate burns like hell as it cauterises some of your wounds."))
else
boutput(H, SPAN_NOTICE("The silver nitrate burns like hell."))
silver_fulminate
name = "silver fulminate"
id = "silver_fulminate"
description = "A very volatile mixture that can react given the slightest stimulus."
reagent_state = SOLID
fluid_r = 128
fluid_g = 128
fluid_b = 128
minimum_reaction_temperature = -INFINITY
proc/pop(var/turf/T, var/amount=5)
playsound(T, 'sound/weapons/Gunshot.ogg', rand(1, min(amount*10, 50)), 1)
proc/explode()
var/list/covered = holder.covered_turf()
for(var/turf/t in covered)
pop(t, (volume/covered.len))
// can act as primary explosive
var/datum/reagents/silver_fulminate_holder = holder
var/silver_fulminate_volume = volume
silver_fulminate_holder.del_reagent("silver_fulminate")
silver_fulminate_holder.temperature_reagents(silver_fulminate_holder.total_temperature + silver_fulminate_volume*20,400,3500,500, 1)
reaction_temperature(var/exposed_temperature, var/exposed_volume)
if (exposed_temperature >= T0C + 30)
explode()
else
var/delta = exposed_temperature - holder.last_temp
if (delta > 5 && prob(delta*5))
explode()
reaction_turf(var/turf/T, var/amount)
// adding a slight delay solely to make silver fulminate foam way more fun
spawn(rand(0, 5))
if (src && T)
pop(T, amount)
reaction_mob(var/mob/M, var/method=TOUCH, var/amount_passed)
. = ..()
if (method == TOUCH)
pop(get_turf(M), max(amount_passed,0.01))
reaction_obj(var/obj/O, var/amount)
pop(get_turf(O), amount)
physical_shock(var/force)
if (volume <= holder.total_volume/4) //be somewhat stable to shock if prepared like bang snaps
if (prob(max(0,force-12)*12)) //safe to run with, but not sprint. 24% chance to pop on your face when thrown
explode()
else
if (prob(force*5))
explode()
on_transfer(var/datum/reagents/source, var/datum/reagents/target, var/transferred_volume)
var/datum/reagent/silver_fulminate/target_silver_fulminate = target.get_reagent("silver_fulminate")
if (target_silver_fulminate)
// 10 or more units in one place explode
if (target_silver_fulminate.volume >= 10)
target_silver_fulminate.explode()
else
// transferring single units is safe, anything more has a decent chance of reacting
target_silver_fulminate.physical_shock(round(0.45 * transferred_volume))
on_mob_life(var/mob/M, var/mult = 1)
if (!M)
M = holder.my_atom
if (probmult(volume))
explode()
..()
return
aranesp
name = "aranesp"
id = "aranesp"
description = "An illegal performance enhancing drug. Side effects might include chest pain, seizures, swelling, headache, fever... ... ..."
fluid_r = 120
fluid_g = 255
fluid_b = 240
transparency = 215
value = 41 // 17 18 6
viscosity = 0.4
threshold = THRESHOLD_INIT
cross_threshold_over()
if(ismob(holder?.my_atom))
var/mob/M = holder.my_atom
APPLY_ATOM_PROPERTY(M, PROP_MOB_STAMINA_REGEN_BONUS, "aranesp", 15)
M.add_stam_mod_max("aranesp", 25)
..()
cross_threshold_under()
if(ismob(holder?.my_atom))
var/mob/M = holder.my_atom
REMOVE_ATOM_PROPERTY(M, PROP_MOB_STAMINA_REGEN_BONUS, "aranesp")
M.remove_stam_mod_max("aranesp")
..()
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (prob(90))
M.take_toxin_damage(1 * mult)
if (probmult(5)) M.emote(pick("twitch", "shake", "tremble","quiver", "twitch_v"))
if (probmult(8)) boutput(M, SPAN_NOTICE("You feel [pick("really buff", "on top of the world","like you're made of steel", "energized", "invigorated", "full of energy")]!"))
if (prob(5))
boutput(M, SPAN_ALERT("You cannot breathe!"))
M.setStatusMin("stunned", 2 SECONDS * mult)
M.take_oxygen_deprivation(15 * mult)
M.losebreath += (1 * mult)
..()
return
anti_fart
name = "simethicone"
id = "anti_fart"
description = "This strange liquid seems to have no bubbles on the surface."
reagent_state = LIQUID
honk_fart
name = "honkfartium"
id = "honk_fart"
description = "This always-bubbling liquid looks pretty funny."
reagent_state = LIQUID
fluid_r = 255
fluid_g = 182
fluid_b = 193
transparency = 200
//new name for old stimulants
omegazine
name = "omegazine"
id = "omegazine"
description = "A dangerous chemical that allows for seemingly superhuman feats for a short time ..."
random_chem_blacklisted = 1
reagent_state = LIQUID
fluid_r = 120
fluid_g = 0
fluid_b = 140
transparency = 200
value = 66 // vOv
//addiction_prob = 25
stun_resist = 100
threshold = THRESHOLD_INIT
cross_threshold_over()
if(ismob(holder?.my_atom))
var/mob/M = holder.my_atom
APPLY_ATOM_PROPERTY(M, PROP_MOB_STAMINA_REGEN_BONUS, "omegazine", 500)
M.add_stam_mod_max("omegazine", 500)
..()
cross_threshold_under()
if(ismob(holder?.my_atom))
var/mob/M = holder.my_atom
REMOVE_ATOM_PROPERTY(M, PROP_MOB_STAMINA_REGEN_BONUS, "omegazine")
M.remove_stam_mod_max("omegazine")
..()
on_mob_life(var/mob/living/M, var/mult = 1)
if (!M) M = holder.my_atom
if (src.volume > 5)
if (M.get_oxygen_deprivation())
M.take_oxygen_deprivation(-5 * mult)
if (M.get_toxin_damage())
M.take_toxin_damage(-5 * mult)
M.delStatus("slowed")
M.delStatus("disorient")
if (M.misstep_chance)
M.change_misstep_chance(-INFINITY)
M.HealDamage("All", 10 * mult, 10 * mult)
M.dizziness = max(0,M.dizziness-10)
M.changeStatus("drowsy", -20 SECONDS)
M.sleeping = 0
else
M.take_toxin_damage(2 * mult)
random_brute_damage(M, 1 * mult)
if (probmult(10))
M.setStatusMin("stunned", 4 SECONDS)
..()
return
hairgrownium //It..grows hair. Not to be confused with the previous hair growth reagent, "wacky monkey cheeseonium"
name = "hairgrownium"
id = "hairgrownium"
description = "A mysterious chemical purported to help grow hair. Often found on late-night TV infomercials."
fluid_r = 100
fluid_b = 100
fluid_g = 255
transparency = 205
penetrates_skin = 1 // why wouldn't it, really
value = 20 // 2 9 9
viscosity = 0.2
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (probmult(10) && ishuman(M))
var/mob/living/carbon/human/H = M
var/list/hair_styles = concrete_typesof(/datum/customization_style/hair)-concrete_typesof(/datum/customization_style/hair/gimmick)
var/hair_type = pick(hair_styles)
H.bioHolder.mobAppearance.customization_first = new hair_type
hair_type = pick(hair_styles)
H.bioHolder.mobAppearance.customization_second = new hair_type
hair_type = pick(hair_styles)
H.bioHolder.mobAppearance.customization_third = new hair_type
H.update_colorful_parts()
boutput(H, SPAN_NOTICE("Your scalp feels itchy!"))
..()
return
super_hairgrownium //moustache madness
name = "super hairgrownium"
id = "super_hairgrownium"
description = "A mysterious and powerful chemical purported to cause rapid hair growth."
fluid_r = 100
fluid_b = 100
fluid_g = 255
transparency = 205
penetrates_skin = 1 // why wouldn't it, really
value = 34 // 20 13 1
viscosity = 0.3
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (ishuman(M))
var/somethingchanged = 0
var/mob/living/carbon/human/H = M
if (H.bioHolder.mobAppearance.customization_first.id != "80s")
H.bioHolder.mobAppearance.customization_first = new /datum/customization_style/hair/long/eighties
somethingchanged = 1
if (H.gender == MALE && H.bioHolder.mobAppearance.customization_second.id != "longbeard")
H.bioHolder.mobAppearance.customization_second = new /datum/customization_style/beard/longbeard
somethingchanged = 1
if (!(H.wear_mask && istype(H.wear_mask, /obj/item/clothing/mask/moustache)) && volume >= 3)
somethingchanged = 1
for (var/obj/item/clothing/O in H)
if (istype(O,/obj/item/clothing/mask))
H.u_equip(O)
if (O)
O.set_loc(H.loc)
O.dropped(H)
O.layer = initial(O.layer)
var/obj/item/clothing/mask/moustache/moustache = new /obj/item/clothing/mask/moustache(H)
H.equip_if_possible(moustache, SLOT_WEAR_MASK)
H.set_clothing_icon_dirty()
holder?.remove_reagent(src.id, 3)
if (somethingchanged) boutput(H, SPAN_ALERT("Hair bursts forth from every follicle on your head!"))
H.update_colorful_parts()
..()
return
unstable_omega_hairgrownium
name = "unstable omega hairgrownium"
id = "unstable_omega_hairgrownium"
description = "An unstable variation of a mysterious extremely powerful chemical purported to help grow unusual hair. This one is bubbling intensely."
fluid_r = 40
fluid_b = 40
fluid_g = 255
transparency = 205
penetrates_skin = 1
value = 61 // 20 34 3 1 3
viscosity = 0.2
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (probmult(35) && ishuman(M))
var/mob/living/carbon/human/H = M
if (H.reagents && H.reagents.has_reagent("stable_omega_hairgrownium"))
omega_hairgrownium_drop_hair(H)
else
omega_hairgrownium_grow_hair(H, 1)
..()
return
stable_omega_hairgrownium
name = "stable omega hairgrownium"
id = "stable_omega_hairgrownium"
description = "A mysterious extremely powerful chemical purported to help grow unusual hair."
fluid_r = 140
fluid_b = 140
fluid_g = 255
transparency = 205
penetrates_skin = 1
value = 59 // 20 34 3 1 1
viscosity = 0.2
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (probmult(35) && ishuman(M))
var/mob/living/carbon/human/H = M
if (H.reagents && H.reagents.has_reagent("unstable_omega_hairgrownium"))
omega_hairgrownium_drop_hair(H)
else
omega_hairgrownium_grow_hair(H, 0)
..()
return
anima //This stuff is not done. Don't use it. Don't spoil it.
name = "anima"
id = "anima"
description = "Anima ... The animating force of the universe."
reagent_state = LIQUID
fluid_r = 120
fluid_g = 10
fluid_b = 190
transparency = 255
depletion_rate = 0.05
value = 539 // 2 3 28 6 500
viscosity = 0.4
// last number: for 50u you take 100 points of health (assuming this is the first time it's been made by those people) so 2 points per 1u
// that number is the value of those 2 points
on_add()
// Marq fix for cannot read null.my_atom
if (!holder)
return
var/atom/A = holder.my_atom
if (A)
animate_flash_color_fill(A,"#5C0E80",-1, 10)
if (hascall(holder.my_atom,"addOverlayComposition"))
holder.my_atom:addOverlayComposition(/datum/overlayComposition/anima)
if (ismob(A))
if (!particleMaster.CheckSystemExists(/datum/particleSystem/swoosh, A))
particleMaster.SpawnSystem(new /datum/particleSystem/swoosh/endless(A))
return
on_remove()
var/atom/A = holder.my_atom
if (A)
animate_flash_color_fill(A,"#5C0E80", 1, 10)
if (hascall(holder.my_atom,"removeOverlayComposition"))
holder.my_atom:removeOverlayComposition(/datum/overlayComposition/anima)
if (ismob(A))
particleMaster.RemoveSystem(/datum/particleSystem/swoosh, A)
return
reaction_obj(var/obj/O, var/volume)
if (volume < 5 || istype(O, /obj/critter) || istype(O, /obj/machinery/bot) || istype(O, /obj/decal) || O.anchored || O.invisibility) return
return_if_overlay_or_effect(O)
O.visible_message(SPAN_ALERT("The [O] comes to life!"))
new /mob/living/object/ai_controlled(get_turf(O), O)
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (probmult(8))
boutput(M, SPAN_ALERT("The voices ..."))
M.playsound_local(M, pick(ghostly_sounds), 100, 1)
..()
strange_reagent
name = "strange reagent"
id = "strange_reagent"
description = "A glowing green fluid highly reminiscent of nuclear waste."
reagent_state = LIQUID
fluid_r = 160
fluid_g = 232
fluid_b = 94
transparency = 255
depletion_rate = 0.2
value = 28 // 3 3 22
viscosity = 0.5
on_add()
..()
if(ismob(src.holder?.my_atom))
RegisterSignal(holder.my_atom, COMSIG_MOB_SHOCKED_DEFIB, PROC_REF(revive))
on_remove()
..()
UnregisterSignal(holder.my_atom, COMSIG_MOB_SHOCKED_DEFIB)
proc/revive(source)
var/mob/living/M = source
var/volume_passed = holder.get_reagent_amount("strange_reagent")
if (!iscarbon(M) && !ismobcritter(M))
return
if (!volume_passed)
return
if (volume_passed < 1)
return
if (isdead(M) || istype(get_area(M),/area/afterlife/bar))
var/came_back_wrong = 0
if (M.get_brute_damage() + M.get_burn_damage() >= 150)
came_back_wrong = 1
if (ismobcritter(M))
M.full_heal() // same as with objcritters basically
else
M.take_oxygen_deprivation(-INFINITY)
M.take_toxin_damage(rand(0,15))
M.TakeDamage("chest", rand(0,15), rand(0,15), 0, DAMAGE_CRUSH)
setalive(M)
var/mob/G
if (ishuman(M)) // if they're human, let's get whoever owns the brain
var/mob/living/carbon/human/H = M
var/obj/item/organ/brain/B = H.organHolder?.get_organ("brain")
G = find_ghost_by_key(B?.owner?.key)
var/is_puritan = 0
if(ismob(G))
for (var/trait as anything in G?.client.preferences.traitPreferences.traits_selected)
if(trait == "puritan")
is_puritan = 1
if(H.traitHolder.hasTrait("puritan"))
is_puritan = 1
if (came_back_wrong || H.decomp_stage || G?.mind?.get_player()?.dnr || is_puritan) //Wire: added the dnr condition here
H.visible_message(SPAN_ALERT("<B>[H]</B> starts convulsing violently!"))
if (G?.mind?.get_player()?.dnr)
H.visible_message(SPAN_ALERT("<b>[H]</b> seems to prefer the afterlife!"))
H.make_jittery(1000)
SPAWN(rand(20, 100))
logTheThing(LOG_COMBAT, H, "is gibbed by puritan when resuscitated with strange reagent at [log_loc(H)].")
H.gib()
return
else // else just get whoever's the mind
G = find_ghost_by_key(M.mind?.key)
logTheThing(LOG_COMBAT, M, "is resuscitated with strange reagent at [log_loc(M)].")
if (G)
if (!isdead(G)) // so if they're in VR, the afterlife bar, or a ghostcritter
G.show_text(SPAN_NOTICE("You feel yourself being pulled out of your current plane of existence!"))
G.ghostize()?.mind?.transfer_to(M)
else
G.show_text(SPAN_ALERT("You feel yourself being dragged out of the afterlife!"))
G.mind?.transfer_to(M)
qdel(G)
M.visible_message(SPAN_ALERT("<b>[M]</b> seems to rise from the dead!"),SPAN_ALERT("You feel hungry..."))
else
M.visible_message(SPAN_ALERT("<b>[M]</b> shudders and stares vacantly."))
return
reaction_obj(var/obj/O, var/volume)
if (istype(O, /obj/critter))
var/obj/critter/critter = O
if (!critter.alive && critter.can_revive) //I should probably check for organic critters, but most robotic ones just blow up on death
critter.health = initial(critter.health)
critter.alive = 1
critter.icon_state = initial(critter.icon_state)
critter.set_density(initial(critter.density))
critter.on_revive()
critter.visible_message(SPAN_ALERT("[critter] seems to rise from the dead!"))
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
if (prob(10))
M.take_toxin_damage(2 * mult)
random_brute_damage(M, 2 * mult)
..()
return
carpet
name = "carpet"
id = "carpet"
description = "A covering of thick fabric used on floors. This type looks particularly gross."
reagent_state = LIQUID
fluid_r = 112
fluid_b = 69
fluid_g = 19
transparency = 255
value = 4 // 2 2
viscosity = 0.3
reaction_turf(var/turf/T, var/volume)
if (T.icon == 'icons/turf/floors.dmi' && volume >= 5)
SPAWN(1.5 SECONDS)
T.icon_state = "grimy"
return
fffoam
name = "firefighting foam"
id = "ff-foam"
description = "Carbon tetrachloride is used for fire suppression."
reagent_state = LIQUID
fluid_r = 195
fluid_g = 195
fluid_b = 175
transparency = 200
value = 3 // 1 1 1
viscosity = 0.14
reaction_turf(var/turf/target, var/volume)
var/obj/hotspot = (locate(/obj/hotspot) in target)
if (hotspot)
if (istype(target, /turf/simulated))
var/turf/simulated/T = target
if (T.air)
var/datum/gas_mixture/lowertemp = T.remove_air( TOTAL_MOLES(T.air) )
if (lowertemp)
lowertemp.temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 200 //T0C - 100
lowertemp.toxins = max(lowertemp.toxins-50,0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
var/obj/fire_foam/F = (locate(/obj/fire_foam) in target)
if (!F)
F = new /obj/fire_foam
F.set_loc(target)
SPAWN(20 SECONDS)
if (F && !F.disposed)
qdel(F)
return
reaction_obj(var/obj/item/O, var/volume)
if (istype(O))
if (O.burning)
O.combust_ended()
return
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
. = ..()
if (method == TOUCH)
var/mob/living/L = M
if (istype(L) && L.getStatusDuration("burning"))
L.changeStatus("burning", -30 SECONDS)
playsound(L, 'sound/impact_sounds/burn_sizzle.ogg', 50, TRUE, pitch = 0.8)
if (istype(L,/mob/living/critter/fire_elemental) && !ON_COOLDOWN(L, "fire_elemental_fffoam", 5 SECONDS))
L.emote("scream")
for(var/mob/O in AIviewers(M, null))
O.show_message(SPAN_ALERT("<b>[M] sputters and begins to dim!</b>"), 1)
boutput(L, SPAN_ALERT("The foam starts to smother your flames!"))
L.changeStatus("weakened", 2 SECONDS)
L.force_laydown_standup()
var/brutedmg = volume * 1.5 //elementals take 1.15x damage, 65 is 74.75. 2 maxcap pitchers goes to .50 brute under death.
brutedmg = min(brutedmg, 65) //Ideally acts like vampire with holy water, capping it so they don't instadie.
L.TakeDamage("chest", brutedmg, 0, 0, DAMAGE_BLUNT) //120u pitcher of fffoam instantly killed elementals, lol.
playsound(L, 'sound/impact_sounds/burn_sizzle.ogg', 50, TRUE, pitch = 0.5)
return
grenade_effects(var/obj/grenade, var/atom/A)
if (isliving(A))
var/mob/living/M = A
if (M.hasStatus("burning"))
M.delStatus("burning")
silicate
name = "silicate"
id = "silicate"
description = "A compound that can be used to reinforce glass."
reagent_state = LIQUID
fluid_r = 38
fluid_g = 128
fluid_b = 191
value = 3 // 1 1 1
viscosity = 0.4
reaction_obj(var/obj/O, var/volume)
if (istype(O, /obj/window))
var/obj/window/W = O
// Silicate was broken. I fixed it (Convair880).
var/static/max_reinforce = 500
if (W.health >= max_reinforce)
return
var/do_reinforce = W.health * 2
if ((W.health + do_reinforce) > max_reinforce)
do_reinforce = max(0, (max_reinforce - W.health))
W.health += do_reinforce
W.health_max = W.health
var/icon/I = icon(W.icon)
I.ColorTone( rgb(165,242,243) )
W.icon = I
src.holder.remove_reagent(src.id, src.holder.get_reagent_amount(src.id))
graphene
name = "graphene"
id = "graphene"
description = "A miniscule honeycomb lattice."
reagent_state = SOLID
fluid_r = 20
fluid_g = 20
fluid_b = 20
value = 5
graphene_compound
name = "Graphene Hardening Compound"
id = "graphene_compound"
description = "A thick industrial compound used to reinforce things."
reagent_state = LIQUID
fluid_r = 10
fluid_g = 10
fluid_b = 10
transparency = 180
viscosity = 0.8
value = 9
reaction_obj(var/obj/O, var/volume)
if (volume < 1)
return
var/colorize
if (istype(O,/obj/machinery/atmospherics/pipe/simple))
var/obj/machinery/atmospherics/pipe/simple/P = O
if(P.can_rupture)
var/max_reinforcement = 1e9
if(P.fatigue_pressure >= max_reinforcement)
return
P.fatigue_pressure = clamp(P.fatigue_pressure * (2**volume), initial(P.fatigue_pressure), max_reinforcement)
colorize = TRUE
else if (istype(O,/obj/window))
var/obj/window/W = O
var/initial_resistance = initial(W.explosion_resistance)
W.explosion_resistance = clamp(W.explosion_resistance + volume, initial_resistance, initial_resistance + 3)
colorize = TRUE
if(colorize)
var/icon/I = icon(O.icon)
I.ColorTone( rgb(20, 30, 30) )
O.icon = I
O.setTexture("hex_lattice", BLEND_ADD, "hex_lattice")
return
reaction_turf(var/turf/target, var/volume)
var/list/covered = holder.covered_turf()
var/turf/simulated/wall/T = target
var/volume_mult = 1
if (length(covered))
if (volume/length(covered) < 2) //reduce effect based on dilution
volume_mult = min(volume / 9, 1)
if(istype(T))
var/initial_resistance = initial(T.explosion_resistance)
T.explosion_resistance = clamp(T.explosion_resistance + (volume_mult*volume), initial_resistance, initial_resistance + 5)
var/icon/I = icon(T.icon)
I.ColorTone( rgb(20, 30, 30) )
T.icon = I
T.setTexture("hex_lattice", BLEND_ADD, "hex_lattice")
//foam precursor
fluorosurfactant
name = "fluorosurfactant"
id = "fluorosurfactant"
description = "A perfluoronated sulfonic acid that forms a foam when mixed with water."
reagent_state = LIQUID
fluid_r = 100
fluid_g = 255
fluid_b = 255
transparency = 30
value = 5 // 3 1 1
lube
name = "space lube"
id = "lube"
description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them."
reagent_state = LIQUID
fluid_r = 0
fluid_b = 245
fluid_g = 255
value = 3 // 1 1 1
hygiene_value = 0.25
block_slippy = -1
reaction_turf(var/turf/target, var/volume)
if (istype(target, /turf/simulated))
var/turf/simulated/simulated_target = target
simulated_target.wetify(2, 60, 60 SECONDS)
superlube
name = "organic superlubricant"
id = "superlube"
description = "Organic superlube is great stuff, but it'll try and slide away from you the first chance it gets."
reagent_state = LIQUID
fluid_r = 0
fluid_b = 245
fluid_g = 255
value = 4 // 1 1 1
hygiene_value = 0.25
block_slippy = -2
var/visible = 1
reaction_turf(var/turf/target, var/volume)
if (istype(target, /turf/simulated))
var/turf/simulated/simulated_target = target
simulated_target.wetify(3, 60, 60 SECONDS)
invisible
name = "invisible organic superlubricant"
id = "invislube"
visible = 0
slime
name = "slug slime"
id = "slime"
description = "Gross goop that sticks to everything it touches."
reagent_state = LIQUID
depletion_rate = 0.6
fluid_r = 116
fluid_b = 73
fluid_g = 226
transparency = 180
viscosity = 0.8
block_slippy = 1
reaction_turf(var/turf/target, var/volume)
if (istype(target, /turf/simulated))
var/turf/simulated/simulated_target = target
simulated_target.wetify(-1, 100, 60 SECONDS, rgb(116,226,73))
glue
name = "space glue"
id = "spaceglue"
description = "Industrial superglue that is sure to stick to everything."
reagent_state = LIQUID
depletion_rate = 0.6
fluid_r = 230
fluid_b = 60
fluid_g = 230
transparency = 180
viscosity = 0.8
block_slippy = 1
var/counter
reaction_turf(var/turf/target, var/volume)
if (istype(target, /turf/simulated))
var/turf/simulated/simulated_target = target
simulated_target.wetify(-2, 100, 60 SECONDS)
on_mob_life(var/mob/M, var/mult = 1, var/method, var/volume_passed)
if (!M) M = holder.my_atom
if (!counter) counter = 1
switch(counter += (1 * mult))
if(20 to INFINITY)
M.druggy = max(M.druggy, 15)
if (M.canmove && prob(20))
M.change_misstep_chance(5 * mult)
if(probmult(5)) M.emote(pick("twitch","drool","moan"))
..()
return
reaction_obj(obj/O, volume)
if(volume < 5)
return
if(isgrab(O))
return
if(O.GetComponent(/datum/component/glued) || O.GetComponent(/datum/component/glue_ready))
return
if(O.invisibility >= INVIS_ALWAYS_ISH)
return
var/silent = FALSE
var/list/covered = holder.covered_turf()
if (length(covered) > 5)
silent = TRUE
volume /= max(length(covered), 1)
if(istype(holder, /datum/reagents/fluid_group))
volume = min(volume, src.volume / (2 + 3 / length(covered)))
if(volume < 5)
return
O.AddComponent(/datum/component/glue_ready, volume * 20 SECONDS, 5 SECONDS)
var/turf/T = get_turf(O)
if(!silent)
T.visible_message(SPAN_NOTICE("\The [O] is coated in a layer of glue!"))
if(istype(holder, /datum/reagents/fluid_group))
holder.remove_reagent(src.id, min(volume, src.volume - 4))
// metal foaming agent
// this is lithium hydride. Add other recipies (e.g. MiH + H2O -> MiOH + H2) eventually
// two different foaming agents is overly complicated imo - IM
/*foaming_agent
name = "foaming agent"
id = "foaming_agent"
description = "A agent that yields metallic foam when mixed with light metal and a strong acid."
reagent_state = SOLID
fluid_r = 100
fluid_g = 90
fluid_b = 90
transparency = 255*/
ammonia
name = "ammonia"
id = "ammonia"
description = "A caustic substance commonly used in fertilizer or household cleaners."
reagent_state = GAS
fluid_r = 255
fluid_g = 255
fluid_b = 180
transparency = 75
value = 2 // 1c + 1c
hygiene_value = 0.25
on_plant_life(var/obj/machinery/plantpot/P)
P.growth += 4
if (prob(66))
P.health++
P.reagents.remove_any(4)
diethylamine
name = "diethylamine"
id = "diethylamine"
description = "A secondary amine, useful as a plant nutrient and as building block for other compounds."
reagent_state = LIQUID
fluid_r = 60
fluid_g = 50
fluid_b = 0
transparency = 255
value = 4 // 2c + 1c + heat
on_plant_life(var/obj/machinery/plantpot/P)
if (prob(66))
P.growth+=2
acetone
name = "acetone"
id = "acetone"
description = "Pure 100% nail polish remover, also works as an industrial solvent."
reagent_state = LIQUID
fluid_r = 200
fluid_g = 200
fluid_b = 200
transparency = 20
value = 5 // 3c + 1c + 1c
hygiene_value = 0.75
on_mob_life(var/mob/M, var/mult = 1)
if (!M) M = holder.my_atom
M.take_toxin_damage(1.5 * mult)
..()
return
proc/unglue_attached_to(atom/A)
var/atom/Aloc = isturf(A) ? A : A.loc
for(var/atom/movable/AM in Aloc)
var/datum/component/glued/glued_comp = AM.GetComponent(/datum/component/glued)
// possible idea for a future change: instead of direct deletion just decrease dries_up_time and only delete if <= current time
if(glued_comp?.glued_to == A && !isnull(glued_comp.glue_removal_time))
qdel(glued_comp)
reaction_mob(var/mob/M, var/method=TOUCH, var/volume, var/paramslist = 0, var/raw_volume)
. = ..()
if (method == TOUCH)
remove_stickers(M, raw_volume)
unglue_attached_to(M)
reaction_obj(var/obj/O, var/volume)
remove_stickers(O, volume)
var/datum/component/glued/glued_comp = O.GetComponent(/datum/component/glued)
if(glued_comp)
qdel(glued_comp)
var/datum/component/glue_ready/glue_ready_comp = O.GetComponent(/datum/component/glue_ready)
if(glue_ready_comp)
qdel(glue_ready_comp)
unglue_attached_to(O)
reaction_turf(var/turf/T, var/volume)
remove_stickers(T, volume)
unglue_attached_to(T)