-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
misc_floor.dm
218 lines (179 loc) · 6.27 KB
/
misc_floor.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
/turf/simulated/floor/vault
icon = 'icons/turf/floors.dmi'
icon_state = "rockvault"
smooth = SMOOTH_FALSE
/turf/simulated/wall/vault
icon = 'icons/turf/walls.dmi'
icon_state = "rockvault"
smooth = SMOOTH_FALSE
/turf/simulated/floor/bluegrid
icon = 'icons/turf/floors.dmi'
icon_state = "bcircuit"
/turf/simulated/floor/bluegrid/telecomms
nitrogen = 100
oxygen = 0
temperature = 80
/turf/simulated/floor/bluegrid/telecomms/server
name = "server base"
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
/turf/simulated/floor/greengrid/airless
icon_state = "gcircuit"
name = "airless floor"
oxygen = 0
nitrogen = 0
temperature = TCMB
/turf/simulated/floor/greengrid/airless/Initialize(mapload)
. = ..()
name = "floor"
/turf/simulated/floor/redgrid
icon = 'icons/turf/floors.dmi'
icon_state = "rcircuit"
/turf/simulated/floor/beach
name = "beach"
icon = 'icons/misc/beach.dmi'
var/water_overlay_image
/turf/simulated/floor/beach/crowbar_act()
return
/turf/simulated/floor/beach/sand
name = "sand"
icon_state = "sand"
/turf/simulated/floor/beach/roughsand
name = "Sand"
icon_state = "rough_sand1"
/turf/simulated/floor/beach/roughsand/dense //made simulated versions to fix lighting issues
density = TRUE
/turf/simulated/floor/beach/roughsand/New() //a simulated version of the unsimulated beach sand
icon_state = "rough_sand[rand(1, 6)]"
..()
/turf/simulated/floor/beach/roughcoastline/New()
..()
if(water_overlay_image)
var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = water_overlay_image, layer = ABOVE_MOB_LAYER)
overlay_image.plane = GAME_PLANE
add_overlay(overlay_image)
/turf/simulated/floor/beach/roughcoastline
name = "Coastline"
icon_state = "beach"
water_overlay_image = "water_coast"
/turf/simulated/floor/beach/roughcoastline/dense //for boundary "walls"
density = TRUE
/turf/simulated/floor/beach/coastline
name = "coastline"
icon = 'icons/misc/beach2.dmi'
icon_state = "sandwater"
/turf/simulated/floor/beach/coastline_t
name = "coastline"
desc = "Tide's high tonight. Charge your batons."
icon_state = "sandwater_t"
/turf/simulated/floor/beach/coastline_b
name = "coastline"
icon_state = "sandwater_b"
/turf/simulated/floor/beach/water // TODO - Refactor water so they share the same parent type - Or alternatively component something like that
name = "water"
icon_state = "water"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/obj/machinery/poolcontroller/linkedcontroller = null
/turf/simulated/floor/beach/water/Initialize(mapload)
. = ..()
var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = "water5", layer = ABOVE_MOB_LAYER)
overlay_image.plane = GAME_PLANE
overlays += overlay_image
/turf/simulated/floor/beach/water/Entered(atom/movable/AM, atom/OldLoc)
. = ..()
if(!linkedcontroller)
return
if(ismob(AM))
linkedcontroller.mobinpool += AM
/turf/simulated/floor/beach/water/Exited(atom/movable/AM, atom/newloc)
. = ..()
if(!linkedcontroller)
return
if(ismob(AM))
linkedcontroller.mobinpool -= AM
/turf/simulated/floor/beach/water/InitializedOn(atom/A)
if(!linkedcontroller)
return
if(istype(A, /obj/effect/decal/cleanable)) // Better a typecheck than looping through thousands of turfs everyday
linkedcontroller.decalinpool += A
/turf/simulated/floor/noslip
name = "high-traction floor"
icon_state = "noslip"
floor_tile = /obj/item/stack/tile/noslip
broken_states = list("noslip-damaged1","noslip-damaged2","noslip-damaged3")
burnt_states = list("noslip-scorched1","noslip-scorched2")
slowdown = -0.3
/turf/simulated/floor/noslip/MakeSlippery()
return
/turf/simulated/floor/noslip/lavaland
oxygen = 14
nitrogen = 23
temperature = 300
planetary_atmos = TRUE
/turf/simulated/floor/lubed
name = "slippery floor"
icon_state = "floor"
/turf/simulated/floor/lubed/Initialize(mapload)
. = ..()
MakeSlippery(TURF_WET_LUBE, INFINITY)
/turf/simulated/floor/lubed/pry_tile(obj/item/C, mob/user, silent = FALSE) //I want to get off Mr Honk's Wild Ride
if(ishuman(user))
var/mob/living/carbon/human/H = user
to_chat(H, "<span class='warning'>You lose your footing trying to pry off the tile!</span>")
H.slip("the floor", 0, 5, tilesSlipped = 4, walkSafely = 0, slipAny = 1)
return
//Clockwork floor: Slowly heals toxin damage on nearby servants.
/turf/simulated/floor/clockwork
name = "clockwork floor"
desc = "Tightly-pressed brass tiles. They emit minute vibration."
icon = 'icons/obj/clockwork_objects.dmi'
icon_state = "clockwork_floor"
baseturf = /turf/simulated/floor/clockwork
var/dropped_brass
var/uses_overlay = TRUE
var/obj/effect/clockwork/overlay/floor/realappearence
/turf/simulated/floor/clockwork/Initialize(mapload)
. = ..()
if(uses_overlay)
new /obj/effect/temp_visual/ratvar/floor(src)
new /obj/effect/temp_visual/ratvar/beam(src)
realappearence = new /obj/effect/clockwork/overlay/floor(src)
realappearence.linked = src
/turf/simulated/floor/clockwork/BeforeChange()
if(uses_overlay && realappearence)
QDEL_NULL(realappearence)
return ..()
/turf/simulated/floor/clockwork/ReplaceWithLattice()
. = ..()
for(var/obj/structure/lattice/L in src)
L.ratvar_act()
/turf/simulated/floor/clockwork/crowbar_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_use_check(user, 0))
return
user.visible_message("<span class='notice'>[user] begins slowly prying up [src]...</span>", "<span class='notice'>You begin painstakingly prying up [src]...</span>")
if(!I.use_tool(src, user, 70, volume = I.tool_volume))
return
user.visible_message("<span class='notice'>[user] pries up [src]!</span>", "<span class='notice'>You pry up [src]!</span>")
make_plating()
/turf/simulated/floor/clockwork/make_plating()
if(!dropped_brass)
new /obj/item/stack/tile/brass(src)
dropped_brass = TRUE
if(baseturf == type)
return
return ..()
/turf/simulated/floor/clockwork/narsie_act()
..()
if(istype(src, /turf/simulated/floor/clockwork)) //if we haven't changed type
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
/turf/simulated/floor/clockwork/reebe
name = "cogplate"
desc = "Warm brass plating. You can feel it gently vibrating, as if machinery is on the other side."
icon_state = "reebe"
baseturf = /turf/simulated/floor/clockwork/reebe
uses_overlay = FALSE