-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy path_open.dm
802 lines (680 loc) · 25.4 KB
/
_open.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
/turf/open
plane = FLOOR_PLANE
FASTDMM_PROP(\
pipe_astar_cost = 1.5\
)
var/slowdown = 0 //negative for faster, positive for slower
var/postdig_icon_change = FALSE
var/postdig_icon
var/wet
var/footstep = null
var/barefootstep = null
var/clawfootstep = null
var/heavyfootstep = null
/// Determines the type of damage overlay that will be used for the tile
var/damaged_dmi = null
var/broken = FALSE
var/burnt = FALSE
/// Returns a list of every turf state considered "broken".
/// Will be randomly chosen if a turf breaks at runtime.
/turf/open/proc/broken_states()
return list()
/// Returns a list of every turf state considered "burnt".
/// Will be randomly chosen if a turf is burnt at runtime.
/turf/open/proc/burnt_states()
return list()
/turf/open/break_tile()
if(isnull(damaged_dmi) || broken)
return FALSE
broken = TRUE
update_appearance()
return TRUE
/turf/open/burn_tile()
if(isnull(damaged_dmi) || burnt)
return FALSE
burnt = TRUE
update_appearance()
return TRUE
/turf/open/update_overlays()
if(isnull(damaged_dmi))
return ..()
. = ..()
if(broken)
. += mutable_appearance(damaged_dmi, pick(broken_states()))
else if(burnt)
var/list/burnt_states = burnt_states()
if(burnt_states.len)
. += mutable_appearance(damaged_dmi, pick(burnt_states))
else
. += mutable_appearance(damaged_dmi, pick(broken_states()))
//direction is direction of travel of A
/turf/open/zPassIn(direction)
if(direction != DOWN)
return FALSE
for(var/obj/on_us in contents)
if(on_us.obj_flags & BLOCK_Z_IN_DOWN)
return FALSE
return TRUE
//direction is direction of travel of an atom
/turf/open/zPassOut(direction)
if(direction != UP)
return FALSE
for(var/obj/on_us in contents)
if(on_us.obj_flags & BLOCK_Z_OUT_UP)
return FALSE
return TRUE
//direction is direction of travel of air
/turf/open/zAirIn(direction, turf/source)
return (direction == DOWN)
//direction is direction of travel of air
/turf/open/zAirOut(direction, turf/source)
return (direction == UP)
/turf/open/update_icon()
. = ..()
update_visuals()
/**
* Replace an open turf with another open turf while avoiding the pitfall of replacing plating with a floor tile, leaving a hole underneath.
* This replaces the current turf if it is plating and is passed plating, is tile and is passed tile.
* It places the new turf on top of itself if it is plating and is passed a tile.
* It also replaces the turf if it is tile and is passed plating, essentially destroying the over turf.
* Flags argument is passed directly to ChangeTurf or place_on_top
*/
/turf/open/proc/replace_floor(turf/open/new_floor_path, flags)
if (!overfloor_placed && initial(new_floor_path.overfloor_placed))
place_on_top(new_floor_path, flags = flags)
return
ChangeTurf(new_floor_path, flags = flags)
/turf/open/indestructible
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "floor"
footstep = FOOTSTEP_FLOOR
barefootstep = FOOTSTEP_HARD_BAREFOOT
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
tiled_dirt = TRUE
/turf/open/indestructible/Melt()
to_be_destroyed = FALSE
return src
/turf/open/indestructible/singularity_act()
return
/turf/open/indestructible/TerraformTurf(path, new_baseturf, flags, defer_change = FALSE, ignore_air = FALSE)
return
/turf/open/indestructible/plating
name = "plating"
icon_state = "plating"
overfloor_placed = FALSE
underfloor_accessibility = UNDERFLOOR_INTERACTABLE
footstep = FOOTSTEP_PLATING
barefootstep = FOOTSTEP_HARD_BAREFOOT
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/indestructible/sound
name = "squeaky floor"
footstep = null
barefootstep = null
clawfootstep = null
heavyfootstep = null
var/sound
/turf/open/indestructible/sound/Entered(atom/movable/AM)
..()
if(sound && ismob(AM))
playsound(src,sound,50,TRUE)
/turf/open/indestructible/necropolis
name = "necropolis floor"
desc = "It's regarding you suspiciously."
icon = 'icons/turf/floors.dmi'
icon_state = "necro1"
baseturfs = /turf/open/indestructible/necropolis
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
footstep = FOOTSTEP_LAVA
barefootstep = FOOTSTEP_LAVA
clawfootstep = FOOTSTEP_LAVA
heavyfootstep = FOOTSTEP_LAVA
tiled_dirt = FALSE
/turf/open/indestructible/necropolis/Initialize(mapload)
. = ..()
if(prob(12))
icon_state = "necro[rand(2,3)]"
/turf/open/indestructible/necropolis/air
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
/turf/open/indestructible/carpet
name = "carpet"
desc = "Soft velvet carpeting. Feels good between your toes."
icon = 'icons/turf/floors/carpet.dmi'
icon_state = "carpet-255"
base_icon_state = "carpet"
flags_1 = NONE
bullet_bounce_sound = null
footstep = FOOTSTEP_CARPET
barefootstep = FOOTSTEP_CARPET_BAREFOOT
clawfootstep = FOOTSTEP_CARPET_BAREFOOT
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
tiled_dirt = FALSE
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET
canSmoothWith = SMOOTH_GROUP_CARPET
/turf/open/indestructible/carpet/black
icon = 'icons/turf/floors/carpet_black.dmi'
icon_state = "carpet_black-255"
base_icon_state = "carpet_black"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_BLACK
canSmoothWith = SMOOTH_GROUP_CARPET_BLACK
/turf/open/indestructible/carpet/blue
icon = 'icons/turf/floors/carpet_blue.dmi'
icon_state = "carpet_blue-255"
base_icon_state = "carpet_blue"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_BLUE
canSmoothWith = SMOOTH_GROUP_CARPET_BLUE
/turf/open/indestructible/carpet/cyan
icon = 'icons/turf/floors/carpet_cyan.dmi'
icon_state = "carpet_cyan-255"
base_icon_state = "carpet_cyan"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_CYAN
canSmoothWith = SMOOTH_GROUP_CARPET_CYAN
/turf/open/indestructible/carpet/green
icon = 'icons/turf/floors/carpet_green.dmi'
icon_state = "carpet_green-255"
base_icon_state = "carpet_green"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_GREEN
canSmoothWith = SMOOTH_GROUP_CARPET_GREEN
/turf/open/indestructible/carpet/orange
icon = 'icons/turf/floors/carpet_orange.dmi'
icon_state = "carpet_orange-255"
base_icon_state = "carpet_orange"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_ORANGE
canSmoothWith = SMOOTH_GROUP_CARPET_ORANGE
/turf/open/indestructible/carpet/purple
icon = 'icons/turf/floors/carpet_purple.dmi'
icon_state = "carpet_purple-255"
base_icon_state = "carpet_purple"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_PURPLE
canSmoothWith = SMOOTH_GROUP_CARPET_PURPLE
/turf/open/indestructible/carpet/red
icon = 'icons/turf/floors/carpet_red.dmi'
icon_state = "carpet_red-255"
base_icon_state = "carpet_red"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_RED
canSmoothWith = SMOOTH_GROUP_CARPET_RED
/turf/open/indestructible/carpet/plainblue
icon = 'icons/turf/floors/carpet_plainblue.dmi'
icon_state = "carpet_plainblue-255"
base_icon_state = "carpet_plainblue"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_PLAIN_BLUE
canSmoothWith = SMOOTH_GROUP_CARPET_PLAIN_BLUE
/turf/open/indestructible/carpet/plaingreen
icon = 'icons/turf/floors/carpet_plaingreen.dmi'
icon_state = "carpet_plaingreen-255"
base_icon_state = "carpet_plaingreen"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_PLAIN_GREEN
canSmoothWith = SMOOTH_GROUP_CARPET_PLAIN_GREEN
/turf/open/indestructible/carpet/plainpurple
icon = 'icons/turf/floors/carpet_plainpurple.dmi'
icon_state = "carpet_plainpurple-255"
base_icon_state = "carpet_plainpurple"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_PLAIN_PURPLE
canSmoothWith = SMOOTH_GROUP_CARPET_PLAIN_PURPLE
/turf/open/indestructible/carpet/royalblack
icon = 'icons/turf/floors/carpet_royalblack.dmi'
icon_state = "carpet_royalblack-255"
base_icon_state = "carpet_royalblack"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_ROYAL_BLACK
canSmoothWith = SMOOTH_GROUP_CARPET_ROYAL_BLACK
/turf/open/indestructible/carpet/royalblue
icon = 'icons/turf/floors/carpet_royalblue.dmi'
icon_state = "carpet_royalblue-255"
base_icon_state = "carpet_royalblue"
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_ROYAL_BLUE
canSmoothWith = SMOOTH_GROUP_CARPET_ROYAL_BLUE
// /turf/open/indestructible/carpet/royal/green
// icon = 'icons/turf/floors/carpet_green.dmi'
// icon_state = "carpet"
// smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_ROYAL_GREEN
// canSmoothWith = SMOOTH_GROUP_CARPET_ROYAL_GREEN
// /turf/open/indestructible/carpet/royal/purple
// icon = 'icons/turf/floors/carpet_purple.dmi'
// icon_state = "carpet"
// smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_CARPET_ROYAL_PURPLE
// canSmoothWith = SMOOTH_GROUP_CARPET_ROYAL_PURPLE
/turf/open/indestructible/grass
name = "grass patch"
desc = "Yep, it's grass."
icon_state = "grass1"
bullet_bounce_sound = null
footstep = FOOTSTEP_GRASS
barefootstep = FOOTSTEP_GRASS
clawfootstep = FOOTSTEP_GRASS
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
tiled_dirt = FALSE
/turf/open/indestructible/grass/sand
name = "sand"
desc = "Course, rough, irritating, gets everywhere."
icon = 'icons/turf/floors.dmi'
icon_state = "asteroid"
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/indestructible/grass/dirt
name = "dirt"
desc = "Upon closer examination, it's still dirt."
icon = 'icons/turf/floors.dmi'
icon_state = "dirt"
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/indestructible/grass/dirt/dark
icon_state = "greenerdirt"
/turf/open/indestructible/grass/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
desc = "Looks cold."
icon_state = "snow"
bullet_sizzle = TRUE
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/indestructible/grass/basalt
name = "volcanic floor"
desc = "Feels hot"
icon = 'icons/turf/floors.dmi'
icon_state = "basalt"
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/indestructible/grass/water
name = "water"
desc = "Shallow water."
icon = 'icons/turf/floors.dmi'
icon_state = "riverwater_motion"
slowdown = 1
bullet_sizzle = TRUE
bullet_bounce_sound = null //needs a splashing sound one day.
footstep = FOOTSTEP_WATER
barefootstep = FOOTSTEP_WATER
clawfootstep = FOOTSTEP_WATER
heavyfootstep = FOOTSTEP_WATER
/turf/open/indestructible/grass/beach
name = "sand"
icon = 'icons/misc/beach.dmi'
icon_state = "sand"
bullet_bounce_sound = null
/turf/open/indestructible/grass/beach/coast_t
name = "coastline"
icon_state = "sandwater_t"
/turf/open/indestructible/grass/beach/coast_b
name = "coastline"
icon_state = "sandwater_b"
/turf/open/indestructible/grass/beach/water
name = "water"
icon_state = "water"
slowdown = 1
bullet_sizzle = TRUE
footstep = FOOTSTEP_WATER
barefootstep = FOOTSTEP_WATER
clawfootstep = FOOTSTEP_WATER
heavyfootstep = FOOTSTEP_WATER
/turf/open/floor/grass/fairy //like grass but fae-er
name = "fairygrass patch"
desc = "Something about this grass makes you want to frolic. Or get high."
icon_state = "fairygrass"
floor_tile = /obj/item/stack/tile/fairygrass
light_range = 2
light_power = 0.80
light_color = "#33CCFF"
color = "#33CCFF"
/turf/open/floor/grass/fairy/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_LIGHT_EATER_ACT, PROC_REF(on_light_eater))
/turf/open/floor/grass/fairy/proc/on_light_eater(obj/machinery/light/source, datum/light_eater)
SIGNAL_HANDLER
visible_message("Dark energies lash out and corrupt [src].")
TerraformTurf(/turf/open/floor/grass/fairy/dark)
return COMPONENT_BLOCK_LIGHT_EATER
/turf/open/floor/grass/fairy/white
name = "white fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/white
light_color = "#FFFFFF"
color = "#FFFFFF"
/turf/open/floor/grass/fairy/red
name = "red fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/red
light_color = "#FF3333"
color = "#FF3333"
/turf/open/floor/grass/fairy/yellow
name = "yellow fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/yellow
light_color = "#FFFF66"
color = "#FFFF66"
/turf/open/floor/grass/fairy/green
name = "green fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/green
light_color = "#99FF99"
color = "#99FF99"
/turf/open/floor/grass/fairy/blue
floor_tile = /obj/item/stack/tile/fairygrass/blue
name = "blue fairygrass patch"
/turf/open/floor/grass/fairy/purple
name = "purple fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/purple
light_color = "#D966FF"
color = "#D966FF"
/turf/open/floor/grass/fairy/pink
name = "pink fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/pink
light_color = "#FFB3DA"
color = "#FFB3DA"
/turf/open/floor/grass/fairy/dark
name = "dark fairygrass patch"
floor_tile = /obj/item/stack/tile/fairygrass/dark
light_power = -1
light_color = "#21007F"
color = "#21007F"
/turf/open/floor/grass/fairy/dark/on_light_eater(obj/machinery/light/source, datum/light_eater)
return
/turf/open/floor/grass/fairy/Initialize(mapload)
. = ..()
icon_state = "fairygrass[rand(1,4)]"
update_appearance(UPDATE_ICON)
/turf/open/indestructible/boss //you put stone tiles on this and use it as a base
name = "necropolis floor"
icon = 'icons/turf/boss_floors.dmi'
icon_state = "boss"
baseturfs = /turf/open/indestructible/boss
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
/turf/open/indestructible/boss/air
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
/turf/open/indestructible/hierophant
icon = 'icons/turf/floors/hierophant_floor.dmi'
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
baseturfs = /turf/open/indestructible/hierophant
smoothing_flags = SMOOTH_CORNERS
tiled_dirt = FALSE
/turf/open/indestructible/hierophant/two
/turf/open/indestructible/hierophant/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
return FALSE
/turf/open/indestructible/paper
name = "notebook floor"
desc = "A floor made of invulnerable notebook paper."
icon_state = "paperfloor"
footstep = null
barefootstep = null
clawfootstep = null
heavyfootstep = null
tiled_dirt = FALSE
/turf/open/indestructible/binary
name = "tear in the fabric of reality"
can_atmos_pass = ATMOS_PASS_NO
baseturfs = /turf/open/indestructible/binary
icon_state = "binary"
footstep = null
barefootstep = null
clawfootstep = null
heavyfootstep = null
/turf/open/indestructible/airblock
icon_state = "bluespace"
blocks_air = TRUE
baseturfs = /turf/open/indestructible/airblock
/turf/open/indestructible/clock_spawn_room
name = "cogmetal floor"
desc = "Brass plating that gently radiates heat. For some reason, it reminds you of blood."
icon_state = "reebe"
baseturfs = /turf/open/indestructible/clock_spawn_room
footstep = FOOTSTEP_PLATING
barefootstep = FOOTSTEP_HARD_BAREFOOT
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/indestructible/clock_spawn_room/Entered()
..()
START_PROCESSING(SSfastprocess, src)
/turf/open/indestructible/clock_spawn_room/Destroy()
STOP_PROCESSING(SSfastprocess, src)
. = ..()
/turf/open/indestructible/clock_spawn_room/process()
if(!port_servants())
STOP_PROCESSING(SSfastprocess, src)
/turf/open/indestructible/clock_spawn_room/proc/port_servants()
. = FALSE
for(var/mob/living/L in src)
if(is_servant_of_ratvar(L) && L.stat != DEAD)
. = TRUE
L.forceMove(get_turf(pick(GLOB.servant_spawns)))
visible_message(span_warning("[L] vanishes in a flash of red!"))
L.visible_message(span_warning("[L] appears in a flash of red!"), \
"<span class='bold cult'>sas'so c'arta forbici</span><br>[span_danger("You're yanked away from [src]!")]")
playsound(src, 'sound/magic/enter_blood.ogg', 50, TRUE)
playsound(L, 'sound/magic/exit_blood.ogg', 50, TRUE)
flash_color(L, flash_color = "#C80000", flash_time = 10)
/turf/open/indestructible/brazil
name = ".."
desc = "..."
/turf/open/indestructible/brazil/Entered()
..()
START_PROCESSING(SSfastprocess, src)
/turf/open/indestructible/brazil/Destroy()
STOP_PROCESSING(SSfastprocess, src)
. = ..()
/turf/open/indestructible/brazil/process()
if(!gtfo())
STOP_PROCESSING(SSfastprocess, src)
///teleports people back to a safe station turf in case they somehow manage to end up here without the status effect
/turf/open/indestructible/brazil/proc/gtfo()
. = FALSE
for(var/mob/living/L in src)
if(!L.has_status_effect(STATUS_EFFECT_BRAZIL_PENANCE))
. = TRUE
to_chat(L, span_velvet("Get out of here, stalker."))
var/turf/safe_turf = get_safe_random_station_turf(typesof(/area/hallway) - typesof(/area/hallway/secondary)) //teleport back into a main hallway, secondary hallways include botany's techfab room which could trap someone
if(safe_turf)
L.forceMove(safe_turf)
flash_color(L, flash_color = "#000000", flash_time = 10)
/turf/open/indestructible/brazil/space
icon = 'icons/turf/space.dmi'
/turf/open/indestructible/brazil/space/Initialize(mapload)
. = ..()
icon_state = "[rand(1,25)]"
add_atom_colour(list(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,1, 1,1,1,0), FIXED_COLOUR_PRIORITY)
/turf/open/indestructible/brazil/narsie
icon_state = "cult"
/turf/open/indestructible/brazil/necropolis
icon_state = "necro1"
/turf/open/indestructible/brazil/necropolis/Initialize(mapload)
. = ..()
if(prob(12))
icon_state = "necro[rand(2,3)]"
/turf/open/indestructible/brazil/lostit
icon = 'yogstation/icons/turf/floors/ballpit.dmi'
icon_state = "ballpit-255"
base_icon_state = "ballpit"
smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_BRAZIL
canSmoothWith = SMOOTH_GROUP_BRAZIL
/turf/open/indestructible/wiki
light_range = 2
light_power = 2
/turf/open/indestructible/wiki/greenscreen
icon = 'yogstation/icons/turf/floors/wiki.dmi'
icon_state = "greenscreen"
/turf/open/indestructible/wiki/bluescreen
icon = 'yogstation/icons/turf/floors/wiki.dmi'
icon_state = "bluescreen"
/turf/open/indestructible/wiki/whitescreen
icon = 'yogstation/icons/turf/floors/wiki.dmi'
icon_state = "whitescreen"
/turf/open/indestructible/wiki/greenscreen/border
icon = 'yogstation/icons/turf/floors/wiki.dmi'
icon_state = "greenborder"
/turf/open/indestructible/wiki/title
icon = 'yogstation/icons/turf/floors/wiki.dmi'
icon_state = "title"
/turf/open/indestructible/wiki/info
icon = 'yogstation/icons/turf/floors/wiki.dmi'
icon_state = "info"
/turf/open/Initalize_Atmos(times_fired)
if(!blocks_air)
if(!istype(air,/datum/gas_mixture/turf))
air = new(2500,src)
air.copy_from_turf(src)
update_air_ref(planetary_atmos ? 1 : 2)
immediate_calculate_adjacent_turfs()
/turf/open/proc/GetHeatCapacity()
. = air.heat_capacity()
/turf/open/proc/GetTemperature()
. = air.return_temperature()
/turf/open/proc/TakeTemperature(temp)
air.set_temperature(air.return_temperature() + temp)
/turf/open/proc/freeze_turf()
for(var/obj/I in contents)
if(I.resistance_flags & FREEZE_PROOF)
return
if(!(I.obj_flags & FROZEN))
I.make_frozen_visual()
for(var/mob/living/L in contents)
if(L.bodytemperature <= 50)
L.apply_status_effect(/datum/status_effect/freon)
MakeSlippery(TURF_WET_PERMAFROST, 50)
return TRUE
/turf/open/proc/water_vapor_gas_act()
MakeSlippery(TURF_WET_WATER, min_wet_time = 100, wet_time_to_add = 50)
for(var/mob/living/simple_animal/slime/M in src)
M.apply_water()
wash(CLEAN_WASH)
for(var/am in src)
var/atom/movable/movable_content = am
if(ismopable(movable_content)) // Will have already been washed by the wash call above at this point.
continue
movable_content.wash(CLEAN_WASH)
return TRUE
/turf/open/handle_slip(mob/living/carbon/slipper, knockdown_amount, obj/slippable, lube, paralyze_amount, force_drop)
if(slipper.movement_type & (FLYING | FLOATING))
return FALSE
if(has_gravity(src))
var/obj/buckled_obj
if(slipper.buckled)
buckled_obj = slipper.buckled
if(!(lube&GALOSHES_DONT_HELP)) //can't slip while buckled unless it's lube.
return 0
else
if(!(lube & SLIP_WHEN_CRAWLING) && (!(slipper.mobility_flags & MOBILITY_STAND)) || !(slipper.status_flags & CANKNOCKDOWN)) // can't slip unbuckled mob if they're lying or can't fall.
return 0
if(slipper.m_intent == MOVE_INTENT_WALK && (lube&NO_SLIP_WHEN_WALKING))
return 0
if(!(lube&SLIDE_ICE))
to_chat(slipper, span_notice("You slipped[ slippable ? " on the [slippable.name]" : ""]!"))
playsound(slipper.loc, 'sound/misc/slip.ogg', 50, TRUE, -3)
SEND_SIGNAL(slipper, COMSIG_ON_CARBON_SLIP)
if(force_drop)
for(var/obj/item/I in slipper.held_items)
slipper.accident(I)
var/olddir = slipper.dir
slipper.moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
if(!(lube & SLIDE_ICE))
slipper.Knockdown(knockdown_amount)
slipper.Paralyze(paralyze_amount)
slipper.stop_pulling()
else
slipper.Knockdown(20)
if(buckled_obj)
buckled_obj.unbuckle_mob(slipper)
lube |= SLIDE_ICE
var/turf/target = get_ranged_target_turf(slipper, olddir, 4)
if(lube & SLIDE)
new /datum/forced_movement(slipper, target, 1, FALSE, CALLBACK(slipper, TYPE_PROC_REF(/mob/living/carbon, spin), 1, 1))
else if(lube&SLIDE_ICE)
new /datum/forced_movement(slipper, get_ranged_target_turf(slipper, olddir, 1), 1, FALSE) //spinning would be bad for ice, fucks up the next dir
return 1
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0, max_wet_time = MAXIMUM_WET_TIME, permanent)
AddComponent(/datum/component/wet_floor, wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
/turf/open/proc/MakeDry(wet_setting = TURF_WET_WATER, immediate = FALSE, amount = INFINITY)
SEND_SIGNAL(src, COMSIG_TURF_MAKE_DRY, wet_setting, immediate, amount)
/turf/open/get_dumping_location()
return src
/turf/open/proc/ClearWet()//Nuclear option of immediately removing slipperyness from the tile instead of the natural drying over time
qdel(GetComponent(/datum/component/wet_floor))
/turf/open/rad_act(pulse_strength, collectable_radiation)
. = ..()
if (air.get_moles(GAS_CO2) && air.get_moles(GAS_O2) && !(air.get_moles(GAS_HYPERNOB) >= REACTION_OPPRESSION_THRESHOLD) )
pulse_strength = min(pulse_strength,air.get_moles(GAS_CO2)*1000,air.get_moles(GAS_O2)*2000) //Ensures matter is conserved properly
air.set_moles(GAS_CO2, max(air.get_moles(GAS_CO2)-(pulse_strength * 0.001),0))
air.set_moles(GAS_O2, max(air.get_moles(GAS_O2)-(pulse_strength * 0.002),0))
air.adjust_moles(GAS_PLUOXIUM, pulse_strength * 0.004)
if (air.get_moles(GAS_H2) && !(air.get_moles(GAS_HYPERNOB) >= REACTION_OPPRESSION_THRESHOLD))
pulse_strength = min(pulse_strength, air.get_moles(GAS_H2) * 1000)
air.set_moles(GAS_H2, max(air.get_moles(GAS_H2) - (pulse_strength * 0.001), 0))
air.adjust_moles(GAS_TRITIUM, pulse_strength * 0.001)
/turf/open/ignite_turf(power, fire_color="red")
. = ..()
if(. & SUPPRESS_FIRE)
return
if(air.get_moles(GAS_O2) < 1)
return
if(turf_fire)
turf_fire.AddPower(power)
return
if(!isgroundlessturf(src))
new /obj/effect/abstract/turf_fire(src, power, fire_color)
/turf/open/extinguish_turf()
if(!air)
return
if(air.return_temperature() > T20C)
air.set_temperature(max(air.return_temperature() / 2, T20C))
air.react(src)
if(active_hotspot)
qdel(active_hotspot)
if(turf_fire)
qdel(turf_fire)
if(liquids?.fire_state > LIQUID_FIRE_STATE_NONE) //extinguish any liquids with any level of fire in our turf
liquids.liquid_group.extinguish(src)
/turf/open/proc/set_flammability(new_flammability)
if(isnull(new_flammability))
flammability = initial(flammability)
return
flammability = new_flammability
/// Builds with rods. This doesn't exist to be overriden, just to remove duplicate logic for turfs that want
/// To support floor tile creation
/// I'd make it a component, but one of these things is space. So no.
/turf/open/proc/build_with_rods(obj/item/stack/rods/used_rods, mob/user)
var/obj/structure/lattice/catwalk_bait = locate(/obj/structure/lattice, src)
var/obj/structure/lattice/catwalk/existing_catwalk = locate(/obj/structure/lattice/catwalk, src)
if(existing_catwalk)
to_chat(user, span_warning("There is already a catwalk here!"))
return
if(catwalk_bait)
if(used_rods.use(1))
qdel(catwalk_bait)
to_chat(user, span_notice("You construct a catwalk."))
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
new /obj/structure/lattice/catwalk(src)
else
to_chat(user, span_warning("You need two rods to build a catwalk!"))
return
if(used_rods.use(1))
to_chat(user, span_notice("You construct a lattice."))
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
new /obj/structure/lattice(src)
else
to_chat(user, span_warning("You need one rod to build a lattice."))
/// Very similar to build_with_rods, this exists to allow consistent behavior between different types in terms of how
/// Building floors works
/turf/open/proc/build_with_floor_tiles(obj/item/stack/tile/plasteel/used_tiles, user)
var/obj/structure/lattice/lattice = locate(/obj/structure/lattice, src)
if(!has_valid_support() && !lattice)
balloon_alert(user, "needs support, place rods!")
return
if(!used_tiles.use(1))
balloon_alert(user, "need a floor tile to build!")
return
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
var/turf/open/floor/plating/new_plating = place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
if(lattice)
qdel(lattice)
else
new_plating.lattice_underneath = FALSE
/turf/open/proc/has_valid_support()
for (var/direction in GLOB.cardinals)
if(istype(get_step(src, direction), /turf/open/floor))
return TRUE
return FALSE