forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipe_datums.dm
383 lines (320 loc) · 9.37 KB
/
pipe_datums.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
GLOBAL_LIST_EMPTY(construction_pipe_list) //List of all pipe datums
GLOBAL_LIST_EMPTY(rpd_pipe_list) //Some pipes we don't want to be dispensable by the RPD, so we have a separate thing
/datum/pipes
var/pipe_name //What the pipe is called in the interface
var/pipe_id //Use the pipe define for this
var/pipe_type //Atmos, disposals etc.
var/pipe_category //What category of pipe
var/bendy = FALSE //Is this pipe bendy?
var/orientations //Number of orientations (for interface purposes)
var/pipe_icon //icon_state of the dispensed pipe (for interface purposes)
var/rpd_dispensable = FALSE
/datum/pipes/atmospheric
pipe_type = PIPETYPE_ATMOS
pipe_category = PIPETYPE_ATMOS
/datum/pipes/disposal
pipe_type = PIPETYPE_DISPOSAL
//Normal pipes
/datum/pipes/atmospheric/simple
pipe_name = "straight pipe"
pipe_id = PIPE_SIMPLE_STRAIGHT
orientations = 2
pipe_icon = "simple"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/bent //Why is this not atmospheric/simple/bent you ask? Because otherwise the ordering of the pipes in the UI menu gets weird
pipe_name = "bent pipe"
pipe_id = PIPE_SIMPLE_BENT
orientations = 4
bendy = TRUE
pipe_icon = "simple"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/manifold
pipe_name = "t-manifold"
pipe_id = PIPE_MANIFOLD
orientations = 4
pipe_icon = "manifold"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/manifold4w
pipe_name = "4-way manifold"
pipe_id = PIPE_MANIFOLD4W
orientations = 1
pipe_icon = "manifold4w"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/cap
pipe_name = "pipe cap"
pipe_id = PIPE_CAP
orientations = 4
pipe_icon = "cap"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/valve
pipe_name = "manual valve"
pipe_id = PIPE_MVALVE
orientations = 2
pipe_icon = "mvalve"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/valve/digital
pipe_name = "digital valve"
pipe_id = PIPE_DVALVE
pipe_icon = "dvalve"
/datum/pipes/atmospheric/tvalve
pipe_name = "manual t-valve"
pipe_id = PIPE_TVALVE
orientations = 4
pipe_icon = "tvalve"
rpd_dispensable = TRUE
/datum/pipes/atmospheric/tvalve/digital
pipe_name = "digital t-valve"
pipe_id = PIPE_DTVALVE
pipe_icon = "dtvalve"
//Supply pipes
/datum/pipes/atmospheric/simple/supply
pipe_name = "straight supply pipe"
pipe_id = PIPE_SUPPLY_STRAIGHT
pipe_category = RPD_SUPPLY_PIPING
/datum/pipes/atmospheric/bent/supply
pipe_name = "bent supply pipe"
pipe_id = PIPE_SUPPLY_BENT
pipe_category = RPD_SUPPLY_PIPING
/datum/pipes/atmospheric/manifold/supply
pipe_name = "supply T-manifold"
pipe_id = PIPE_SUPPLY_MANIFOLD
pipe_category = RPD_SUPPLY_PIPING
/datum/pipes/atmospheric/manifold4w/supply
pipe_name = "4-way supply manifold"
pipe_id = PIPE_SUPPLY_MANIFOLD4W
pipe_category = RPD_SUPPLY_PIPING
/datum/pipes/atmospheric/cap/supply
pipe_name = "supply pipe cap"
pipe_id = PIPE_SUPPLY_CAP
pipe_category = RPD_SUPPLY_PIPING
//Scrubbers pipes
/datum/pipes/atmospheric/simple/scrubbers
pipe_name = "straight scrubbers pipe"
pipe_id = PIPE_SCRUBBERS_STRAIGHT
pipe_category = RPD_SCRUBBERS_PIPING
/datum/pipes/atmospheric/bent/scrubbers
pipe_name = "bent scrubbers pipe"
pipe_id = PIPE_SCRUBBERS_BENT
pipe_category = RPD_SCRUBBERS_PIPING
/datum/pipes/atmospheric/manifold/scrubbers
pipe_name = "scrubbers t-manifold"
pipe_id = PIPE_SCRUBBERS_MANIFOLD
pipe_category = RPD_SCRUBBERS_PIPING
/datum/pipes/atmospheric/manifold4w/scrubbers
pipe_name = "4-way scrubbers manifold"
pipe_id = PIPE_SCRUBBERS_MANIFOLD4W
pipe_category = RPD_SCRUBBERS_PIPING
/datum/pipes/atmospheric/cap/scrubbers
pipe_name = "scrubbers pipe cap"
pipe_id = PIPE_SCRUBBERS_CAP
pipe_category = RPD_SCRUBBERS_PIPING
//Devices
/datum/pipes/atmospheric/upa
pipe_name = "universal pipe adapter"
pipe_id = PIPE_UNIVERSAL
orientations = 2
pipe_icon = "universal"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/connector
pipe_name = "connector"
pipe_id = PIPE_CONNECTOR
orientations = 4
pipe_icon = "connector"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/unaryvent
pipe_name = "unary vent"
pipe_id = PIPE_UVENT
orientations = 4
pipe_icon = "uvent"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/scrubber
pipe_name = "scrubber"
pipe_id = PIPE_SCRUBBER
orientations = 4
pipe_icon = "scrubber"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/pump
pipe_name = "pump"
pipe_id = PIPE_PUMP
orientations = 4
pipe_icon = "pump"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/volume_pump
pipe_name = "volume pump"
pipe_id = PIPE_VOLUME_PUMP
orientations = 4
pipe_icon = "volumepump"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/gate
pipe_name = "passive gate"
pipe_id = PIPE_PASSIVE_GATE
orientations = 4
pipe_icon = "passivegate"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/filter
pipe_name = "gas filter"
pipe_id = PIPE_GAS_FILTER
orientations = 4
pipe_icon = "filter"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/mixer
pipe_name = "gas mixer"
pipe_id = PIPE_GAS_MIXER
orientations = 4
pipe_icon = "mixer"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/sensor
pipe_name = "gas sensor"
pipe_id = PIPE_GAS_SENSOR
orientations = 1
pipe_icon = "sensor"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/meter
pipe_name = "meter"
pipe_id = PIPE_METER
orientations = 1
pipe_icon = "meter"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/passive_vent
pipe_name = "passive vent"
pipe_id = PIPE_PASV_VENT
orientations = 4
pipe_icon = "passive vent"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/dual_vent_pump
pipe_name = "dual-port vent pump"
pipe_id = PIPE_DP_VENT
orientations = 2
pipe_icon = "dual-port vent"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
/datum/pipes/atmospheric/injector
pipe_name = "air injector"
pipe_id = PIPE_INJECTOR
orientations = 4
pipe_icon = "injector"
pipe_category = RPD_DEVICES
rpd_dispensable = TRUE
//Heat exchange pipes
/datum/pipes/atmospheric/simple/he
pipe_name = "straight h/e pipe"
pipe_id = PIPE_HE_STRAIGHT
pipe_icon = "he"
pipe_category = RPD_HEAT_PIPING
/datum/pipes/atmospheric/bent/he
pipe_name = "bent h/e pipe"
pipe_id = PIPE_HE_BENT
pipe_icon = "he"
bendy = TRUE
pipe_category = RPD_HEAT_PIPING
/datum/pipes/atmospheric/he_junction
pipe_name = "junction"
pipe_id = PIPE_JUNCTION
orientations = 4
pipe_icon = "junction"
pipe_category = RPD_HEAT_PIPING
rpd_dispensable = TRUE
/datum/pipes/atmospheric/heat_exchanger
pipe_name = "heat exchanger"
pipe_id = PIPE_HEAT_EXCHANGE
orientations = 4
pipe_icon = "heunary"
pipe_category = RPD_HEAT_PIPING
rpd_dispensable = TRUE
//DISPOSALS PIPES
/datum/pipes/disposal/straight
pipe_name = "straight disposals pipe"
pipe_id = PIPE_DISPOSALS_STRAIGHT
orientations = 2
pipe_icon = "pipe-s"
rpd_dispensable = TRUE
/datum/pipes/disposal/bent
pipe_name = "bent disposals pipe"
pipe_id = PIPE_DISPOSALS_BENT
orientations = 4
pipe_icon = "pipe-c"
rpd_dispensable = TRUE
/datum/pipes/disposal/junction
pipe_name = "disposals junction"
pipe_id = PIPE_DISPOSALS_JUNCTION_RIGHT
orientations = 4
pipe_icon = "pipe-j1"
rpd_dispensable = TRUE
/datum/pipes/disposal/y_junction
pipe_name = "disposals y-junction"
pipe_id = PIPE_DISPOSALS_Y_JUNCTION
orientations = 4
pipe_icon = "pipe-y"
rpd_dispensable = TRUE
/datum/pipes/disposal/trunk
pipe_name = "disposals trunk"
pipe_id = PIPE_DISPOSALS_TRUNK
orientations = 4
pipe_icon = "pipe-t"
rpd_dispensable = TRUE
/datum/pipes/disposal/bin
pipe_name = "disposals pipe bin"
pipe_id = PIPE_DISPOSALS_BIN
orientations = 1
pipe_icon = "disposal"
rpd_dispensable = TRUE
/datum/pipes/disposal/outlet
pipe_name = "disposals outlet"
pipe_id = PIPE_DISPOSALS_OUTLET
orientations = 4
pipe_icon = "outlet"
rpd_dispensable = TRUE
/datum/pipes/disposal/chute
pipe_name = "disposals chute"
pipe_id = PIPE_DISPOSALS_CHUTE
orientations = 4
pipe_icon = "intake"
rpd_dispensable = TRUE
/datum/pipes/disposal/sortjunction
pipe_name = "disposals sort junction"
pipe_id = PIPE_DISPOSALS_SORT_RIGHT
orientations = 4
pipe_icon = "pipe-j1s"
rpd_dispensable = TRUE
//Pipes the RPD can't dispense. Since these don't use an interface, we don't need to bother with setting an icon. We do, however, want to name these for other purposes
/datum/pipes/atmospheric/circulator
pipe_name = "circulator / heat exchanger"
pipe_id = PIPE_CIRCULATOR
pipe_icon = "circ"
/datum/pipes/atmospheric/insulated
pipe_name = "insulated pipe"
pipe_id = PIPE_INSULATED_STRAIGHT
pipe_icon = "insulated"
/datum/pipes/atmospheric/insulated/bent
pipe_name = "bent insulated pipe"
pipe_id = PIPE_INSULATED_BENT
/datum/pipes/disposal/left_sortjunction
pipe_name = "disposals sort junction left"
pipe_id = PIPE_DISPOSALS_SORT_LEFT
pipe_icon = "pipe-j2s"
/datum/pipes/disposal/left_junction
pipe_name = "disposals junction"
pipe_id = PIPE_DISPOSALS_JUNCTION_LEFT
pipe_icon = "pipe-j2"
/proc/get_pipe_name(pipe_id, pipe_type)
for(var/datum/pipes/P in GLOB.construction_pipe_list)
if(P.pipe_id == pipe_id && P.pipe_type == pipe_type)
return P.pipe_name
return "unknown pipe"
/proc/get_pipe_icon(pipe_id)
for(var/datum/pipes/P in GLOB.construction_pipe_list)
if(P.pipe_id == pipe_id)
return P.pipe_icon
return "unknown icon"