-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathtank_types.dm
208 lines (166 loc) · 5.96 KB
/
tank_types.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
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/// Allows carbon to toggle internals via AltClick of the equipped tank.
/obj/item/tank/internals/AltClick(mob/user)
..()
if((loc == user) && user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE))
toggle_internals(user)
/obj/item/tank/internals/examine(mob/user)
. = ..()
. += span_notice("Alt-click the tank to toggle the valve.")
/*
* Oxygen
*/
/obj/item/tank/internals/oxygen
name = "oxygen tank"
desc = "A tank of oxygen, this one is blue."
icon_state = "oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/oxygen/populate_gas()
air_contents.set_moles(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
dog_fashion = null
/obj/item/tank/internals/oxygen/red
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
dog_fashion = null
/obj/item/tank/internals/oxygen/tactical
name = "tactical oxygen tank"
desc = "A tactically colored tank of oxygen."
color = "#aeb08c"
/obj/item/tank/internals/oxygen/empty/populate_gas()
return
/*
* Anesthetic
*/
/obj/item/tank/internals/anesthetic
name = "anesthetic tank"
desc = "A tank with an N2O/O2 gas mix."
icon_state = "anesthetic"
item_state = "an_tank"
force = 10
/obj/item/tank/internals/anesthetic/populate_gas()
air_contents.set_moles(GAS_O2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
air_contents.set_moles(GAS_NITROUS, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
/*
* Air
*/
/obj/item/tank/internals/air
name = "air tank"
desc = "Mixed anyone?"
icon_state = "air"
item_state = "air"
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/populate_gas()
air_contents.set_moles(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
air_contents.set_moles(GAS_N2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
/*
* Plasma
*/
/obj/item/tank/internals/plasma
name = "plasma tank"
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
icon_state = "plasma"
flags_1 = CONDUCT_1
slot_flags = null //they have no straps!
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 8
/obj/item/tank/internals/plasma/populate_gas()
air_contents.set_moles(GAS_PLASMA, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/gun/flamethrower))
var/obj/item/gun/flamethrower/F = W
if (F.fuel_tank)
return
if(!user.transferItemToLoc(src, F))
return
src.master = F
F.fuel_tank = src
F.update_appearance(UPDATE_ICON)
else
return ..()
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/plasma/empty/populate_gas()
return
/*
* Plasmaman Plasma Tank
*/
/obj/item/tank/internals/plasmaman
name = "plasma internals tank"
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
icon_state = "plasmaman_tank"
item_state = "plasmaman_tank"
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/populate_gas()
air_contents.set_moles(GAS_PLASMA, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/plasmaman/full/populate_gas()
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/plasmaman/belt
icon_state = "plasmaman_tank_belt"
item_state = "plasmaman_tank_belt"
slot_flags = ITEM_SLOT_BELT
force = 5
volume = 6
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/plasmaman/belt/empty/populate_gas()
return
/*
* Emergency Oxygen
*/
/obj/item/tank/internals/emergency_oxygen
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
force = 4
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
volume = 1 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/tank/internals/emergency_oxygen/populate_gas()
air_contents.set_moles(GAS_O2, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 2 // should last a bit over 30 minutes if full
/obj/item/tank/internals/emergency_oxygen/engi/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_double"
item_state = "emergency_engi"
volume = 8
/obj/item/tank/internals/emergency_oxygen/double/empty/populate_gas()
return
/obj/item/tank/internals/ipc_coolant
name = "IPC coolant tank"
desc = "A tank of cold nitrogen for use as a coolant by IPCs. Not breathable."
icon_state = "ipc_coolant"
item_state = "ipc_coolant"
slot_flags = ITEM_SLOT_BELT
force = 5
volume = 6
w_class = WEIGHT_CLASS_SMALL
distribute_pressure = 8
/obj/item/tank/internals/ipc_coolant/populate_gas()
air_contents.set_moles(GAS_N2, (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * (T0C - 50)))
air_contents.set_temperature(T0C - 50)
/obj/item/tank/internals/ipc_coolant/empty/populate_gas()
return