SHOW:
|
|
- or go back to the newest paste.
1 | --button | |
2 | local a = "1" | |
3 | local b = Window:new(-1,-1,200,200) | |
4 | local c = Label:new(10,5,140,16, "JWARD's Mod options") | |
5 | local d = Label:new(10,25,121,16, "more to come") | |
6 | local e = Label:new(10,85,170,16,"#") | |
7 | local f = Label:new(135,5,88,16, "#") | |
8 | local g = Label:new(10,95,180,16, "#") | |
9 | local h = Label:new(10,105,170,16,"#") | |
10 | local i = Label:new(10,125,180,16,"#") | |
11 | local j = Label:new(10,135,170,16,"antisave breaking") | |
12 | ||
13 | local Close = Button:new(10, 174, 60, 16, "Close") | |
14 | local on = Button:new(10, 150, 15, 15, "on") | |
15 | local off = Button:new(35, 150, 15, 15, "off") | |
16 | ||
17 | Close:action(function() interface.closeWindow(b) end) | |
18 | b:onTryExit(function() interface.closeWindow(b) end) | |
19 | ||
20 | --on off old save option thingy | |
21 | on:action( | |
22 | function() | |
23 | elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 0) | |
24 | elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.1) | |
25 | elements.property(elements.DEFAULT_PT_ACID, "Description", "Dissolves almost everything.") | |
26 | elements.property(elements.DEFAULT_PT_ACID, "Flammable", 40) | |
27 | elements.property(elements.DEFAULT_PT_INSL, "Hardness", 10) | |
28 | elements.property(elements.DEFAULT_PT_INSL, "Flammable", 7) | |
29 | elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 77) | |
30 | elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.DEFAULT_PT_NONE) | |
31 | elements.property(elements.DEFAULT_PT_WATR, "Hardness", 20) | |
32 | elements.property(elements.DEFAULT_PT_WATR, "Weight", 30) | |
33 | elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 20) | |
34 | elements.property(elements.DEFAULT_PT_DSTW, "Weight", 30) | |
35 | elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 20) | |
36 | elements.property(elements.DEFAULT_PT_SLTW, "Weight", 35) | |
37 | elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 20) | |
38 | elements.property(elements.DEFAULT_PT_BUBW, "Weight", 30) | |
39 | elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", elements.DEFAULT_PT_OIL) | |
40 | elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 0) | |
41 | elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0.001) | |
42 | elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", DEFAULT_PT_GAS) | |
43 | elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", elements.DEFAULT_PT_FIRE) | |
44 | elements.property(elements.DEFAULT_PT_GAS, "Temperature", 273.15) | |
45 | elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 573) | |
46 | elements.property(elements.DEFAULT_PT_GAS, "HighPressure", 6) | |
47 | elements.property(elements.DEFAULT_PT_BCOL, "HighTemperatureTransition", NT) | |
48 | elements.property(elements.DEFAULT_PT_BCOL, "HighTemperature", ITL) | |
49 | elements.property(elements.DEFAULT_PT_COAL, "HighTemperatureTransition", NT) | |
50 | elements.property(elements.DEFAULT_PT_COAL, "HighTemperature", ITL) | |
51 | elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 333) | |
52 | elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS) | |
53 | elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", NT) | |
54 | elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", ITL) | |
55 | elements.property(elements.DEFAULT_PT_DESL, "Weight", 15) | |
56 | elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 2) | |
57 | end | |
58 | ) | |
59 | ||
60 | ||
61 | off:action( | |
62 | function() | |
63 | elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 1.2) | |
64 | elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.62) | |
65 | elements.property(elements.DEFAULT_PT_ACID, "Description", "Bubbling caustic liquid.") | |
66 | elements.property(elements.DEFAULT_PT_ACID, "Flammable", 0) | |
67 | elements.property(elements.DEFAULT_PT_INSL, "Hardness", 0) | |
68 | elements.property(elements.DEFAULT_PT_INSL, "Flammable", 0) | |
69 | elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76) | |
70 | elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2) | |
71 | elements.property(elements.DEFAULT_PT_WATR, "Hardness", 0.25) | |
72 | elements.property(elements.DEFAULT_PT_WATR, "Weight", 32) | |
73 | elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 0) | |
74 | elements.property(elements.DEFAULT_PT_DSTW, "Weight", 32) | |
75 | elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 0) | |
76 | elements.property(elements.DEFAULT_PT_SLTW, "Weight", 32) | |
77 | elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 0) | |
78 | elements.property(elements.DEFAULT_PT_BUBW, "Weight", 32) | |
79 | elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", 256) | |
80 | elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15) | |
81 | elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0) | |
82 | elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL) | |
83 | elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", NT) | |
84 | elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15) | |
85 | elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000) | |
86 | elements.property(elements.DEFAULT_PT_BCOL, "HighTemperatureTransition", elements.JWARD_PT_COKE) | |
87 | elements.property(elements.DEFAULT_PT_BCOL, "HighTemperature", 773.15) | |
88 | elements.property(elements.DEFAULT_PT_COAL, "HighTemperatureTransition", elements.JWARD_PT_COKE) | |
89 | elements.property(elements.DEFAULT_PT_COAL, "HighTemperature", 773.15) | |
90 | elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15) | |
91 | elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS) | |
92 | elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV) | |
93 | elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15) | |
94 | elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", 255.15) | |
95 | elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE) | |
96 | elements.property(elements.DEFAULT_PT_DESL, "Weight", 12) | |
97 | elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 256) | |
98 | end | |
99 | ) | |
100 | ||
101 | ||
102 | ||
103 | b:addComponent(Close); | |
104 | b:addComponent(on); | |
105 | b:addComponent(off); | |
106 | ||
107 | local Button1 = Button:new(613, 113, 15, 15, "JW", "Options for jward's mods") | |
108 | ||
109 | Button1:action(function() interface.showWindow(b) end) | |
110 | ||
111 | bb = Label:new(10,45,138,16, "#") | |
112 | cc = Label:new(10,55,60,16, "#") | |
113 | dd = Label:new(10,65,57,16, "#") | |
114 | ||
115 | b:addComponent(bb) | |
116 | b:addComponent(dd) | |
117 | b:addComponent(cc) | |
118 | b:addComponent(c) | |
119 | b:addComponent(d) | |
120 | b:addComponent(e) | |
121 | b:addComponent(f) | |
122 | b:addComponent(g) | |
123 | b:addComponent(h) | |
124 | b:addComponent(i) | |
125 | b:addComponent(j) | |
126 | ||
127 | interface.addComponent(Button1) | |
128 | ||
129 | local a1 = "2" | |
130 | local b1 = Window:new(-1,-1,200,200) | |
131 | local c1 = Label:new(10,5,80,16, "SECRET MODE") | |
132 | local d1 = Label:new(10,15,121,16, "Created By RadioActiveLua") | |
133 | local f1 = Label:new(135,5,88,16, ("RAM V."..a)) | |
134 | ||
135 | local Close1 = Button:new(10, 174, 60, 16, "Close") | |
136 | ||
137 | local Start1 = Button:new(10, 194, 60, 16, "Enter") | |
138 | ||
139 | Close1:action(function() interface.closeWindow(b1) end) | |
140 | b1:onTryExit(function() interface.closeWindow(b1) end) | |
141 | ||
142 | b1:addComponent(Close1); | |
143 | --default editing | |
144 | elements.property(elements.DEFAULT_PT_ACID, "Flammable", 0) | |
145 | elements.property(elements.DEFAULT_PT_DMND, "MenuSection", 9) | |
146 | elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 1) | |
147 | elements.property(elements.DEFAULT_PT_MORT, "MenuSection", 8) | |
148 | elements.property(elements.DEFAULT_PT_INSL, "Hardness", 0) | |
149 | elements.property(elements.DEFAULT_PT_INSL, "Flammable", 0) | |
150 | elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76) | |
151 | elements.property(elements.DEFAULT_PT_WATR, "Hardness", 0.25) | |
152 | elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 0) | |
153 | elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 0) | |
154 | elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 0) | |
155 | elements.property(elements.DEFAULT_PT_WATR, "Weight", 32) | |
156 | elements.property(elements.DEFAULT_PT_DSTW, "Weight", 32) | |
157 | elements.property(elements.DEFAULT_PT_SLTW, "Weight", 32) | |
158 | elements.property(elements.DEFAULT_PT_BUBW, "Weight", 32) | |
159 | elements.property(elements.DEFAULT_PT_ACID, "Weight", 32) | |
160 | elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 1.2) | |
161 | elements.property(elements.DEFAULT_PT_ACID, "Description", "Bubbling caustic liquid.") | |
162 | elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.62) | |
163 | elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 256) | |
164 | ||
165 | --petrol | |
166 | local antifrzz = elements.allocate("JWARD", "AFRZ") | |
167 | local petrolgas = elements.allocate("JWARD", "PTLV") | |
168 | local petrol = elements.allocate("JWARD", "PTRL") | |
169 | elements.element(elements.JWARD_PT_PTRL, elements.element(elements.DEFAULT_PT_GEL)) | |
170 | elements.property(elements.JWARD_PT_PTRL, "Name", "PTRL") | |
171 | elements.property(elements.JWARD_PT_PTRL, "Description", "Petrol. Highly flammable liquid.") | |
172 | elements.property(elements.JWARD_PT_PTRL, "Colour", 0x0A4A5C) | |
173 | elements.property(elements.JWARD_PT_PTRL, "MenuSection", SC_LIQUID) | |
174 | elements.property(elements.JWARD_PT_PTRL, "Gravity", 0.6) | |
175 | elements.property(elements.JWARD_PT_PTRL, "Flammable", 65) | |
176 | elements.property(elements.JWARD_PT_PTRL, "Explosive", 0) | |
177 | elements.property(elements.JWARD_PT_PTRL, "Loss", 0.8) | |
178 | elements.property(elements.JWARD_PT_PTRL, "AirLoss", 0.94) | |
179 | elements.property(elements.JWARD_PT_PTRL, "AirDrag", 0.02) | |
180 | elements.property(elements.JWARD_PT_PTRL, "Advection", 0.8) | |
181 | elements.property(elements.JWARD_PT_PTRL, "Weight", 12) | |
182 | elements.property(elements.JWARD_PT_PTRL, "Diffusion", 0) | |
183 | elements.property(elements.JWARD_PT_PTRL, "Meltable", 0) | |
184 | elements.property(elements.JWARD_PT_PTRL, "Hardness", 0) | |
185 | elements.property(elements.JWARD_PT_PTRL, "Falldown", 2) | |
186 | elements.property(elements.JWARD_PT_PTRL, "Properties", TYPE_LIQUID) | |
187 | elements.property(elements.JWARD_PT_PTRL, "State", ST_LIQUID) | |
188 | elements.property(elements.JWARD_PT_PTRL, "Temperature", 295.15) | |
189 | elements.property(elements.JWARD_PT_PTRL, "HeatConduct", 78) | |
190 | elements.property(elements.JWARD_PT_PTRL, "HighTemperature", 333.15) | |
191 | elements.property(elements.JWARD_PT_PTRL, "HighTemperatureTransition", elements.JWARD_PT_PTLV) | |
192 | elements.property(elements.JWARD_PT_PTRL, "LowTemperature", 225.15) | |
193 | elements.property(elements.JWARD_PT_PTRL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE) | |
194 | ||
195 | elements.element(elements.JWARD_PT_PTLV, elements.element(elements.DEFAULT_PT_HYGN)) | |
196 | elements.property(elements.JWARD_PT_PTLV, "Name", "PTLV") | |
197 | elements.property(elements.JWARD_PT_PTLV, "Description", "petrol gas") | |
198 | elements.property(elements.JWARD_PT_PTLV, "Colour", 0x0A4A5C) | |
199 | elements.property(elements.JWARD_PT_PTLV, "MenuVisible", 0) | |
200 | elements.property(elements.JWARD_PT_PTLV, "Gravity", -0.02) | |
201 | elements.property(elements.JWARD_PT_PTLV, "Flammable", 100) | |
202 | elements.property(elements.JWARD_PT_PTLV, "Explosive", 1) | |
203 | elements.property(elements.JWARD_PT_PTLV, "Loss", 0.75) | |
204 | elements.property(elements.JWARD_PT_PTLV, "AirLoss", 0.97) | |
205 | elements.property(elements.JWARD_PT_PTLV, "AirDrag", 0.01) | |
206 | elements.property(elements.JWARD_PT_PTLV, "Advection", 1) | |
207 | elements.property(elements.JWARD_PT_PTLV, "Weight", 0) | |
208 | elements.property(elements.JWARD_PT_PTLV, "Diffusion", 0.7) | |
209 | elements.property(elements.JWARD_PT_PTLV, "Meltable", 0) | |
210 | elements.property(elements.JWARD_PT_PTLV, "Hardness", 0) | |
211 | elements.property(elements.JWARD_PT_PTLV, "Falldown", 0) | |
212 | elements.property(elements.JWARD_PT_PTLV, "Properties", TYPE_GAS) | |
213 | elements.property(elements.JWARD_PT_PTLV, "State", ST_GAS) | |
214 | elements.property(elements.JWARD_PT_PTLV, "Temperature", 343.15) | |
215 | elements.property(elements.JWARD_PT_PTLV, "HeatConduct", 80) | |
216 | elements.property(elements.JWARD_PT_PTLV, "LowTemperature", 333.14) | |
217 | elements.property(elements.JWARD_PT_PTLV, "LowTemperatureTransition", elements.JWARD_PT_PTRL) | |
218 | ||
219 | elements.element(elements.JWARD_PT_AFRZ, elements.element(elements.DEFAULT_PT_GEL)) | |
220 | elements.property(elements.JWARD_PT_AFRZ, "Name", "AFRZ") | |
221 | elements.property(elements.JWARD_PT_AFRZ, "Description", "antifreeze, keeps your fuel nice and toasty. methnol") | |
222 | elements.property(elements.JWARD_PT_AFRZ, "Colour", 0x0C3F5B) | |
223 | elements.property(elements.JWARD_PT_AFRZ, "MenuSection", SC_LIQUID) | |
224 | elements.property(elements.JWARD_PT_AFRZ, "Gravity", 0.6) | |
225 | elements.property(elements.JWARD_PT_AFRZ, "Flammable", 65) | |
226 | elements.property(elements.JWARD_PT_AFRZ, "Explosive", 0) | |
227 | elements.property(elements.JWARD_PT_AFRZ, "Loss", 0.8) | |
228 | elements.property(elements.JWARD_PT_AFRZ, "AirLoss", 0.94) | |
229 | elements.property(elements.JWARD_PT_AFRZ, "AirDrag", 0.02) | |
230 | elements.property(elements.JWARD_PT_AFRZ, "Advection", 0.8) | |
231 | elements.property(elements.JWARD_PT_AFRZ, "Weight", 12) | |
232 | elements.property(elements.JWARD_PT_AFRZ, "Diffusion", 0) | |
233 | elements.property(elements.JWARD_PT_AFRZ, "Meltable", 0) | |
234 | elements.property(elements.JWARD_PT_AFRZ, "Hardness", 0) | |
235 | elements.property(elements.JWARD_PT_AFRZ, "Falldown", 2) | |
236 | elements.property(elements.JWARD_PT_AFRZ, "Properties", TYPE_LIQUID) | |
237 | elements.property(elements.JWARD_PT_AFRZ, "State", ST_LIQUID) | |
238 | elements.property(elements.JWARD_PT_AFRZ, "Temperature", 295.15) | |
239 | elements.property(elements.JWARD_PT_AFRZ, "HeatConduct", 78) | |
240 | function AFRZ(i,x,y,s,n) | |
241 | warm = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) | |
242 | warm2 = tpt.get_property("temp",x,y) | |
243 | if warm == petrol and warm2 < 276 then | |
244 | tpt.set_property('temp', 296 ,x, y) | |
245 | end | |
246 | if warm == tpt.el.desl.id and warm2 < 276 then | |
247 | tpt.set_property('temp', 296 ,x, y) | |
248 | end | |
249 | if warm == BioDiesel and warm2 < 276 then | |
250 | tpt.set_property('temp', 296 ,x, y) | |
251 | end | |
252 | if warm == jetfuel and warm2 < 276 then | |
253 | tpt.set_property('temp', 296 ,x, y) | |
254 | end | |
255 | if warm == tpt.el.ice.id and warm2 < 276 then | |
256 | tpt.set_property('temp', 296 ,x, y) | |
257 | end | |
258 | end | |
259 | tpt.element_func(AFRZ, tpt.element('AFRZ')) | |
260 | ||
261 | --diesel & bio diesel | |
262 | local Dieselgas = elements.allocate("JWARD", "DSLV") | |
263 | local potash_lye = elements.allocate("JWARD", "PLYE") | |
264 | local cooking_oil = elements.allocate("JWARD", "COIL") | |
265 | local BioDiesel = elements.allocate("JWARD", "BDSL") | |
266 | ||
267 | elements.element(elements.JWARD_PT_DSLV, elements.element(elements.DEFAULT_PT_HYGN)) | |
268 | elements.property(elements.JWARD_PT_DSLV, "Name", "DSLV") | |
269 | elements.property(elements.JWARD_PT_DSLV, "Description", "diesel gas") | |
270 | elements.property(elements.JWARD_PT_DSLV, "Colour", 0x440000) | |
271 | elements.property(elements.JWARD_PT_DSLV, "MenuVisible", 0) | |
272 | elements.property(elements.JWARD_PT_DSLV, "Gravity", -0.02) | |
273 | elements.property(elements.JWARD_PT_DSLV, "Flammable", 100) | |
274 | elements.property(elements.JWARD_PT_DSLV, "Explosive", 1) | |
275 | elements.property(elements.JWARD_PT_DSLV, "Loss", 0.75) | |
276 | elements.property(elements.JWARD_PT_DSLV, "AirLoss", 0.97) | |
277 | elements.property(elements.JWARD_PT_DSLV, "AirDrag", 0.01) | |
278 | elements.property(elements.JWARD_PT_DSLV, "Advection", 1) | |
279 | elements.property(elements.JWARD_PT_DSLV, "Weight", 0) | |
280 | elements.property(elements.JWARD_PT_DSLV, "Diffusion", 0.7) | |
281 | elements.property(elements.JWARD_PT_DSLV, "Meltable", 0) | |
282 | elements.property(elements.JWARD_PT_DSLV, "Hardness", 0) | |
283 | elements.property(elements.JWARD_PT_DSLV, "Falldown", 0) | |
284 | elements.property(elements.JWARD_PT_DSLV, "Properties", TYPE_GAS) | |
285 | elements.property(elements.JWARD_PT_DSLV, "State", ST_GAS) | |
286 | elements.property(elements.JWARD_PT_DSLV, "Temperature", 483.15) | |
287 | elements.property(elements.JWARD_PT_DSLV, "HeatConduct", 80) | |
288 | elements.property(elements.JWARD_PT_DSLV, "LowTemperature", 473.15) | |
289 | elements.property(elements.JWARD_PT_DSLV, "LowTemperatureTransition", elements.DEFAULT_PT_DESL) | |
290 | ||
291 | elements.element(elements.JWARD_PT_COIL, elements.element(elements.DEFAULT_PT_GEL)) | |
292 | elements.property(elements.JWARD_PT_COIL, "Name", "COIL") | |
293 | elements.property(elements.JWARD_PT_COIL, "Description", "Cooking oil") | |
294 | elements.property(elements.JWARD_PT_COIL, "Colour", 0xA57214) | |
295 | elements.property(elements.JWARD_PT_COIL, "MenuSection", 7) | |
296 | elements.property(elements.JWARD_PT_COIL, "Gravity", 0.6) | |
297 | elements.property(elements.JWARD_PT_COIL, "Flammable", 1) | |
298 | elements.property(elements.JWARD_PT_COIL, "Explosive", 0) | |
299 | elements.property(elements.JWARD_PT_COIL, "Loss", 0.7) | |
300 | elements.property(elements.JWARD_PT_COIL, "AirLoss", 0.91) | |
301 | elements.property(elements.JWARD_PT_COIL, "AirDrag", 0.02) | |
302 | elements.property(elements.JWARD_PT_COIL, "Advection", 0.9) | |
303 | elements.property(elements.JWARD_PT_COIL, "Weight", 10) | |
304 | elements.property(elements.JWARD_PT_COIL, "Meltable", 0) | |
305 | elements.property(elements.JWARD_PT_COIL, "Hardness", 86) | |
306 | elements.property(elements.JWARD_PT_COIL, "Falldown", 2) | |
307 | elements.property(elements.JWARD_PT_COIL, "Properties", TYPE_LIQUID) | |
308 | elements.property(elements.JWARD_PT_COIL, "State", ST_LIQUID) | |
309 | elements.property(elements.JWARD_PT_COIL, "Temperature", 295.15) | |
310 | elements.property(elements.JWARD_PT_COIL, "HeatConduct", 100) | |
311 | function COIL(i,x,y,s,n) | |
312 | cx = math.random(-3,3) | |
313 | cy = math.random(-5,1) | |
314 | reaction = tpt.get_property("temp",x,y) | |
315 | bio = tpt.get_property("type",x + math.random(-2,2), y + math.random(-2,2)) | |
316 | bioo = tpt.get_property("type",x + math.random(-2,2), y + math.random(-2,2)) | |
317 | biooo = tpt.get_property("type",x + cy, y + cx) | |
318 | local noncatalyst = tpt.get_property("life",x,y) | |
319 | if reaction > 363.15 and biooo ~= true then | |
320 | tpt.delete(x,y) | |
321 | tpt.create(x + cx, y + cy, 'COIL') | |
322 | end | |
323 | if bio == potash_lye and bioo == antifrzz then | |
324 | tpt.parts[i].type = tpt.element('BDSL') | |
325 | end | |
326 | end | |
327 | tpt.element_func(COIL, tpt.element('COIL')) | |
328 | ||
329 | elements.element(elements.JWARD_PT_BDSL, elements.element(elements.DEFAULT_PT_GEL)) | |
330 | elements.property(elements.JWARD_PT_BDSL, "Name", "BDSL") | |
331 | elements.property(elements.JWARD_PT_BDSL, "Description", "Bio Diesel. Made from cooking oil.") | |
332 | elements.property(elements.JWARD_PT_BDSL, "Colour", 0x331000) | |
333 | elements.property(elements.JWARD_PT_BDSL, "MenuSection", SC_LIQUID) | |
334 | elements.property(elements.JWARD_PT_BDSL, "Gravity", 0.6) | |
335 | elements.property(elements.JWARD_PT_BDSL, "Flammable", 35) | |
336 | elements.property(elements.JWARD_PT_BDSL, "Explosive", 0) | |
337 | elements.property(elements.JWARD_PT_BDSL, "Loss", 0.8) | |
338 | elements.property(elements.JWARD_PT_BDSL, "AirLoss", 0.94) | |
339 | elements.property(elements.JWARD_PT_BDSL, "AirDrag", 0.02) | |
340 | elements.property(elements.JWARD_PT_BDSL, "Advection", 0.8) | |
341 | elements.property(elements.JWARD_PT_BDSL, "Weight", 12) | |
342 | elements.property(elements.JWARD_PT_BDSL, "Diffusion", 0) | |
343 | elements.property(elements.JWARD_PT_BDSL, "Meltable", 0) | |
344 | elements.property(elements.JWARD_PT_BDSL, "Hardness", 0) | |
345 | elements.property(elements.JWARD_PT_BDSL, "Falldown", 2) | |
346 | elements.property(elements.JWARD_PT_BDSL, "Properties", TYPE_LIQUID) | |
347 | elements.property(elements.JWARD_PT_BDSL, "State", ST_LIQUID) | |
348 | elements.property(elements.JWARD_PT_BDSL, "Temperature", 295.15) | |
349 | elements.property(elements.JWARD_PT_BDSL, "HeatConduct", 99) | |
350 | function BDSL(i,x,y,s,n) | |
351 | findcoil = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) | |
352 | if findcoil == cooking_oil then | |
353 | tpt.set_property('life', 2 ,x, y) | |
354 | end | |
355 | end | |
356 | tpt.element_func(BDSL, tpt.element('BDSL')) | |
357 | ||
358 | elements.element(elements.JWARD_PT_PLYE, elements.element(elements.DEFAULT_PT_BCOL)) | |
359 | elements.property(elements.JWARD_PT_PLYE, "Name", "PLYE") | |
360 | elements.property(elements.JWARD_PT_PLYE, "Description", "potash lye") | |
361 | elements.property(elements.JWARD_PT_PLYE, "Colour", 0xCCCCCC) | |
362 | elements.property(elements.JWARD_PT_PLYE, "MenuSection", 8) | |
363 | elements.property(elements.JWARD_PT_PLYE, "Gravity", .35) | |
364 | elements.property(elements.JWARD_PT_PLYE, "Flammable", 0) | |
365 | elements.property(elements.JWARD_PT_PLYE, "Explosive", 0) | |
366 | elements.property(elements.JWARD_PT_PLYE, "Loss", 0.15) | |
367 | elements.property(elements.JWARD_PT_PLYE, "AirLoss", 0.96) | |
368 | elements.property(elements.JWARD_PT_PLYE, "AirDrag", 0.03) | |
369 | elements.property(elements.JWARD_PT_PLYE, "Advection", 0.4) | |
370 | elements.property(elements.JWARD_PT_PLYE, "Weight", 60) | |
371 | elements.property(elements.JWARD_PT_PLYE, "Diffusion", 0) | |
372 | elements.property(elements.JWARD_PT_PLYE, "Falldown", 1) | |
373 | elements.property(elements.JWARD_PT_PLYE, "Hardness", 0) | |
374 | elements.property(elements.JWARD_PT_PLYE, "HeatConduct", 62) | |
375 | elements.property(elements.JWARD_PT_PLYE, "Properties", elem.PROP_DEADLY) | |
376 | function PLYE(i,x,y,s,n) | |
377 | cy = math.random(-1,1) | |
378 | cx = math.random(-1,1) | |
379 | reaction = tpt.get_property("type",x+cx,y+cy) | |
380 | if reaction == tpt.el.acid.id then | |
381 | tpt.create(x, y + 2, 'hygn') | |
382 | tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'SLTW') | |
383 | tpt.delete(x,y) | |
384 | end | |
385 | end | |
386 | tpt.element_func(PLYE, tpt.element('PLYE')) | |
387 | ||
388 | --o0o NITROGEN o0o-- | |
389 | local nitrogen = elements.allocate("JWARD", "N2") | |
390 | local Diazane = elements.allocate("JWARD", "N2H4") | |
391 | local DinitrogenTetroxide = elements.allocate("JWARD", "N2O4") | |
392 | local nitrous = elements.allocate("JWARD", "N2O") | |
393 | local need4speed = elements.allocate("JWARD", "LN2O") | |
394 | elements.element(elements.JWARD_PT_LN2O, elements.element(elements.DEFAULT_PT_GEL)) | |
395 | elements.property(elements.JWARD_PT_LN2O, "Name", "LN2O") | |
396 | elements.property(elements.JWARD_PT_LN2O, "Description", "Liquid Nitrous Oxide. Burns very quickly and very hot.") | |
397 | elements.property(elements.JWARD_PT_LN2O, "Colour", 0x33C1F5) | |
398 | elements.property(elements.JWARD_PT_LN2O, "MenuSection", 7) | |
399 | elements.property(elements.JWARD_PT_LN2O, "Gravity", 0.8) | |
400 | elements.property(elements.JWARD_PT_LN2O, "Flammable", 6000) | |
401 | elements.property(elements.JWARD_PT_LN2O, "Explosive", 0) | |
402 | elements.property(elements.JWARD_PT_LN2O, "Loss", 0.5) | |
403 | elements.property(elements.JWARD_PT_LN2O, "AirLoss", 0.94) | |
404 | elements.property(elements.JWARD_PT_LN2O, "AirDrag", 0.03) | |
405 | elements.property(elements.JWARD_PT_LN2O, "Advection", 0.7) | |
406 | elements.property(elements.JWARD_PT_LN2O, "Weight", 43) | |
407 | elements.property(elements.JWARD_PT_LN2O, "Diffusion", 0) | |
408 | elements.property(elements.JWARD_PT_LN2O, "Meltable", 0) | |
409 | elements.property(elements.JWARD_PT_LN2O, "Hardness", 0) | |
410 | elements.property(elements.JWARD_PT_LN2O, "Falldown", 2) | |
411 | elements.property(elements.JWARD_PT_LN2O, "Properties", TYPE_LIQUID) | |
412 | elements.property(elements.JWARD_PT_LN2O, "State", ST_LIQUID) | |
413 | elements.property(elements.JWARD_PT_LN2O, "Temperature", 174) | |
414 | elements.property(elements.JWARD_PT_LN2O, "HeatConduct", 58) | |
415 | elements.property(elements.JWARD_PT_LN2O, "HighTemperature", 184) | |
416 | elements.property(elements.JWARD_PT_LN2O, "HighTemperatureTransition", elements.JWARD_PT_N2O) | |
417 | ||
418 | elements.element(elements.JWARD_PT_N2O, elements.element(elements.DEFAULT_PT_CO2)) | |
419 | elements.property(elements.JWARD_PT_N2O, "Name", "N2O") | |
420 | elements.property(elements.JWARD_PT_N2O, "Description", "Nitrous Oxide. Highly flammable RACE CAR oxidizer!!!.") | |
421 | elements.property(elements.JWARD_PT_N2O, "Colour", 0x43DAFF) | |
422 | elements.property(elements.JWARD_PT_N2O, "MenuSection", 6) | |
423 | elements.property(elements.JWARD_PT_N2O, "Gravity", 0) | |
424 | elements.property(elements.JWARD_PT_N2O, "Flammable", 5500) | |
425 | elements.property(elements.JWARD_PT_N2O, "Explosive", 0) | |
426 | elements.property(elements.JWARD_PT_N2O, "Loss", 0.7) | |
427 | elements.property(elements.JWARD_PT_N2O, "AirLoss", 0.91) | |
428 | elements.property(elements.JWARD_PT_N2O, "AirDrag", 0.02) | |
429 | elements.property(elements.JWARD_PT_N2O, "Advection", 0.9) | |
430 | elements.property(elements.JWARD_PT_N2O, "Weight", 0) | |
431 | elements.property(elements.JWARD_PT_N2O, "Diffusion", 1.5) | |
432 | elements.property(elements.JWARD_PT_N2O, "Meltable", 0) | |
433 | elements.property(elements.JWARD_PT_N2O, "Hardness", 0) | |
434 | elements.property(elements.JWARD_PT_N2O, "Falldown", 0) | |
435 | elements.property(elements.JWARD_PT_N2O, "Properties", TYPE_GAS) | |
436 | elements.property(elements.JWARD_PT_N2O, "State", ST_GAS) | |
437 | elements.property(elements.JWARD_PT_N2O, "Temperature", 295.15) | |
438 | elements.property(elements.JWARD_PT_N2O, "HeatConduct", 80) | |
439 | elements.property(elements.JWARD_PT_N2O, "LowTemperature", 184.67) | |
440 | elements.property(elements.JWARD_PT_N2O, "LowTemperatureTransition", elements.JWARD_PT_LN2O) | |
441 | function N2O(i,x,y,s,n) | |
442 | reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) | |
443 | if reaction == tpt.el.oxyg.id then | |
444 | tpt.parts[i].type = tpt.element('N2O4') | |
445 | reaction = nil | |
446 | end | |
447 | end | |
448 | tpt.element_func(N2O,nitrous) | |
449 | ||
450 | elements.element(elements.JWARD_PT_N2O4, elements.element(elements.DEFAULT_PT_GEL)) | |
451 | elements.property(elements.JWARD_PT_N2O4, "Name", "N2O4") | |
452 | elements.property(elements.JWARD_PT_N2O4, "Description", "Dinitrogen Tetroxide rocket oxidizer") | |
453 | elements.property(elements.JWARD_PT_N2O4, "Colour", 0x30CEC6) | |
454 | elements.property(elements.JWARD_PT_N2O4, "MenuSection", 5) | |
455 | elements.property(elements.JWARD_PT_N2O4, "Gravity", 0.8) | |
456 | elements.property(elements.JWARD_PT_N2O4, "Flammable", 7500) | |
457 | elements.property(elements.JWARD_PT_N2O4, "Explosive", 1) | |
458 | elements.property(elements.JWARD_PT_N2O4, "Loss", 0.7) | |
459 | elements.property(elements.JWARD_PT_N2O4, "AirLoss", 0.91) | |
460 | elements.property(elements.JWARD_PT_N2O4, "AirDrag", 0.03) | |
461 | elements.property(elements.JWARD_PT_N2O4, "Advection", 0.6) | |
462 | elements.property(elements.JWARD_PT_N2O4, "Weight", 46) | |
463 | elements.property(elements.JWARD_PT_N2O4, "Diffusion", 1.5) | |
464 | elements.property(elements.JWARD_PT_N2O4, "Meltable", 0) | |
465 | elements.property(elements.JWARD_PT_N2O4, "Hardness", 0) | |
466 | elements.property(elements.JWARD_PT_N2O4, "Falldown", 2) | |
467 | elements.property(elements.JWARD_PT_N2O4, "Properties", TYPE_LIQUID) | |
468 | elements.property(elements.JWARD_PT_N2O4, "State", ST_LIQUID) | |
469 | elements.property(elements.JWARD_PT_N2O4, "Temperature", 295.15) | |
470 | elements.property(elements.JWARD_PT_N2O4, "HeatConduct", 78) | |
471 | function N2O4(i,x,y,s,n) | |
472 | rocket = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) | |
473 | if rocket == Diazane then | |
474 | tpt.create(x+math.random(-1,1), y+math.random(-1,1), 'plsm') | |
475 | end | |
476 | end | |
477 | tpt.element_func(N2O4,DinitrogenTetroxide) | |
478 | ||
479 | elements.element(elements.JWARD_PT_N2H4, elements.element(elements.DEFAULT_PT_GEL)) | |
480 | elements.property(elements.JWARD_PT_N2H4, "Name", "N2H4") | |
481 | elements.property(elements.JWARD_PT_N2H4, "Description", "Hydrazine rocket fuel") | |
482 | elements.property(elements.JWARD_PT_N2H4, "Colour", 0xB6F064) | |
483 | elements.property(elements.JWARD_PT_N2H4, "MenuSection", 5) | |
484 | elements.property(elements.JWARD_PT_N2H4, "Gravity", 0.8) | |
485 | elements.property(elements.JWARD_PT_N2H4, "Flammable", 1) | |
486 | elements.property(elements.JWARD_PT_N2H4, "Explosive", 1) | |
487 | elements.property(elements.JWARD_PT_N2H4, "Loss", 0.7) | |
488 | elements.property(elements.JWARD_PT_N2H4, "AirLoss", 0.91) | |
489 | elements.property(elements.JWARD_PT_N2H4, "AirDrag", 0.03) | |
490 | elements.property(elements.JWARD_PT_N2H4, "Advection", 0.6) | |
491 | elements.property(elements.JWARD_PT_N2H4, "Weight", 46) | |
492 | elements.property(elements.JWARD_PT_N2H4, "Diffusion", 1.5) | |
493 | elements.property(elements.JWARD_PT_N2H4, "Meltable", 0) | |
494 | elements.property(elements.JWARD_PT_N2H4, "Hardness", 0) | |
495 | elements.property(elements.JWARD_PT_N2H4, "Falldown", 2) | |
496 | elements.property(elements.JWARD_PT_N2H4, "Properties", TYPE_LIQUID) | |
497 | elements.property(elements.JWARD_PT_N2H4, "State", ST_LIQUID) | |
498 | elements.property(elements.JWARD_PT_N2H4, "Temperature", 295.15) | |
499 | elements.property(elements.JWARD_PT_N2H4, "HeatConduct", 83) | |
500 | N2H4Update = function(i, x, y, s, n) | |
501 | local clife = tpt.get_property('life', x, y) | |
502 | if clife > 1 then | |
503 | for cx = -1, 1, 2 do | |
504 | for cy = -1, 1, 2 do | |
505 | tpt.create(x + cx, y + cy, 'fire') | |
506 | tpt.set_property('temp', 1700, x, y) | |
507 | tpt.set_pressure(x, y, 2, 2, 200) | |
508 | end | |
509 | end | |
510 | tpt.set_property('life', clife - 1, x, y) | |
511 | elseif clife == 1 then | |
512 | tpt.set_property('type', 0, x, y) | |
513 | elseif s > 0 then | |
514 | for cx = -1, 1, 2 do | |
515 | for cy = -1, 1, 2 do | |
516 | if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then | |
517 | tpt.set_property('life', 500, x, y) | |
518 | return true | |
519 | end | |
520 | end | |
521 | end | |
522 | end | |
523 | end | |
524 | tpt.element_func(N2H4Update, tpt.element('N2H4')) | |
525 | ||
526 | elements.element(elements.JWARD_PT_N2, elements.element(elements.DEFAULT_PT_CO2)) | |
527 | elements.property(elements.JWARD_PT_N2, "Name", "N2") | |
528 | elements.property(elements.JWARD_PT_N2, "Description", "Nitrogen Gas. Combines with WATR to make N2O + H2.") | |
529 | elements.property(elements.JWARD_PT_N2, "Colour", 0x5E52FF) | |
530 | elements.property(elements.JWARD_PT_N2, "MenuSection", SC_GAS) | |
531 | elements.property(elements.JWARD_PT_N2, "Gravity", 0) | |
532 | elements.property(elements.JWARD_PT_N2, "Flammable", 0) | |
533 | elements.property(elements.JWARD_PT_N2, "Explosive", 1) | |
534 | elements.property(elements.JWARD_PT_N2, "Loss", 0.3) | |
535 | elements.property(elements.JWARD_PT_N2, "AirLoss", 0.99) | |
536 | elements.property(elements.JWARD_PT_N2, "AirDrag", 0.01) | |
537 | elements.property(elements.JWARD_PT_N2, "Advection", 2.0) | |
538 | elements.property(elements.JWARD_PT_N2, "Weight", 0) | |
539 | elements.property(elements.JWARD_PT_N2, "Diffusion", 2.75) | |
540 | elements.property(elements.JWARD_PT_N2, "State", ST_GAS) | |
541 | elements.property(elements.JWARD_PT_N2, "Properties", elem.TYPE_GAS) | |
542 | elements.property(elements.JWARD_PT_N2, "LowTemperatureTransition", elements.DEFAULT_PT_LN2) | |
543 | elements.property(elements.JWARD_PT_N2, "LowTemperature", 76) | |
544 | elements.property(elements.JWARD_PT_N2, "HeatConduct", 80) | |
545 | function N2(i,x,y,s,n) | |
546 | water = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) | |
547 | if water == tpt.el.dstw.id then | |
548 | tpt.parts[i].type = tpt.element('N2O') | |
549 | water = nil | |
550 | end | |
551 | end | |
552 | tpt.element_func(N2,nitrogen) | |
553 | --extra | |
554 | local propane = elements.allocate("JWARD", "PROP") | |
555 | elements.element(elements.JWARD_PT_PROP, elements.element(elements.DEFAULT_PT_CO2)) | |
556 | elements.property(elements.JWARD_PT_PROP, "Name", "PRPN") | |
557 | elements.property(elements.JWARD_PT_PROP, "Description", "Propane. Explodes very easily.") | |
558 | elements.property(elements.JWARD_PT_PROP, "Colour", 0xF4A26A) | |
559 | elements.property(elements.JWARD_PT_PROP, "MenuSection", 5) | |
560 | elements.property(elements.JWARD_PT_PROP, "Gravity", -0.02) | |
561 | elements.property(elements.JWARD_PT_PROP, "Flammable", 3000) | |
562 | elements.property(elements.JWARD_PT_PROP, "Explosive", 2.5) | |
563 | elements.property(elements.JWARD_PT_PROP, "Loss", 0.75) | |
564 | elements.property(elements.JWARD_PT_PROP, "AirLoss", 0.97) | |
565 | elements.property(elements.JWARD_PT_PROP, "AirDrag", 0.01) | |
566 | elements.property(elements.JWARD_PT_PROP, "Advection", 1) | |
567 | elements.property(elements.JWARD_PT_PROP, "Weight", 0) | |
568 | elements.property(elements.JWARD_PT_PROP, "Diffusion", 0.7) | |
569 | elements.property(elements.JWARD_PT_PROP, "Meltable", 0) | |
570 | elements.property(elements.JWARD_PT_PROP, "Hardness", 0) | |
571 | elements.property(elements.JWARD_PT_PROP, "Falldown", 0) | |
572 | elements.property(elements.JWARD_PT_PROP, "Properties", TYPE_GAS) | |
573 | elements.property(elements.JWARD_PT_PROP, "State", ST_GAS) | |
574 | elements.property(elements.JWARD_PT_PROP, "Temperature", 295.15) | |
575 | elements.property(elements.JWARD_PT_PROP, "HeatConduct", 95) | |
576 | elements.property(elements.JWARD_PT_PROP, "HighTemperature", 353.15) | |
577 | elements.property(elements.JWARD_PT_PROP, "HighTemperatureTransition", tpt.el.fire.id) | |
578 | elements.property(elements.JWARD_PT_PROP, "LowTemperatureTransition", NT) | |
579 | ||
580 | --kerosene | |
581 | local KEROSENEGAS = elements.allocate("JWARD", "KERV") | |
582 | local KEROSENE = elements.allocate("JWARD", "KERO") | |
583 | elements.element(elements.JWARD_PT_KERO, elements.element(elements.DEFAULT_PT_GEL)) | |
584 | elements.property(elements.JWARD_PT_KERO, "Name", "KERO") | |
585 | elements.property(elements.JWARD_PT_KERO, "Description", "KERO BURNS HOT AND QUICK") | |
586 | elements.property(elements.JWARD_PT_KERO, "Colour", 0x01B3D7) | |
587 | elements.property(elements.JWARD_PT_KERO, "MenuSection", 5) | |
588 | elements.property(elements.JWARD_PT_KERO, "Gravity", .04) | |
589 | elements.property(elements.JWARD_PT_KERO, "Flammable", 500) | |
590 | elements.property(elements.JWARD_PT_KERO, "Explosive", 1) | |
591 | elements.property(elements.JWARD_PT_KERO, "Loss", 1) | |
592 | elements.property(elements.JWARD_PT_KERO, "AirLoss", .5) | |
593 | elements.property(elements.JWARD_PT_KERO, "AirDrag", .01) | |
594 | elements.property(elements.JWARD_PT_KERO, "Advection", .01) | |
595 | elements.property(elements.JWARD_PT_KERO, "Weight", 5) | |
596 | elements.property(elements.JWARD_PT_KERO, "State", ST_liquid) | |
597 | elements.property(elements.JWARD_PT_KERO, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY) | |
598 | elements.property(elements.JWARD_PT_KERO, "HighTemperature", 393.15) | |
599 | elements.property(elements.JWARD_PT_KERO, "HighTemperatureTransition", elements.JWARD_PT_KERV) | |
600 | function KERO(i,x,y,s,n) | |
601 | reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) | |
602 | if reaction == petrol then | |
603 | tpt.parts[i].type = tpt.element('JETB') | |
604 | reaction = nil | |
605 | end | |
606 | end | |
607 | tpt.element_func(KERO,KEROSENE) | |
608 | ||
609 | elements.element(elements.JWARD_PT_KERV, elements.element(elements.DEFAULT_PT_HYGN)) | |
610 | elements.property(elements.JWARD_PT_KERV, "Name", "KERV") | |
611 | elements.property(elements.JWARD_PT_KERV, "Description", "kerosene gas") | |
612 | elements.property(elements.JWARD_PT_KERV, "Colour", 0x01B3D7) | |
613 | elements.property(elements.JWARD_PT_KERV, "MenuVisible", 0) | |
614 | elements.property(elements.JWARD_PT_KERV, "Gravity", -0.02) | |
615 | elements.property(elements.JWARD_PT_KERV, "Flammable", 600) | |
616 | elements.property(elements.JWARD_PT_KERV, "Explosive", 1) | |
617 | elements.property(elements.JWARD_PT_KERV, "Loss", 0.75) | |
618 | elements.property(elements.JWARD_PT_KERV, "AirLoss", 0.97) | |
619 | elements.property(elements.JWARD_PT_KERV, "AirDrag", 0.01) | |
620 | elements.property(elements.JWARD_PT_KERV, "Advection", 1) | |
621 | elements.property(elements.JWARD_PT_KERV, "Weight", 0) | |
622 | elements.property(elements.JWARD_PT_KERV, "Diffusion", 0.7) | |
623 | elements.property(elements.JWARD_PT_KERV, "Meltable", 0) | |
624 | elements.property(elements.JWARD_PT_KERV, "Hardness", 0) | |
625 | elements.property(elements.JWARD_PT_KERV, "Falldown", 0) | |
626 | elements.property(elements.JWARD_PT_KERV, "Properties", TYPE_GAS) | |
627 | elements.property(elements.JWARD_PT_KERV, "State", ST_GAS) | |
628 | elements.property(elements.JWARD_PT_KERV, "Temperature", 403.15) | |
629 | elements.property(elements.JWARD_PT_KERV, "HeatConduct", 195) | |
630 | elements.property(elements.JWARD_PT_KERV, "LowTemperature", 393.15) | |
631 | elements.property(elements.JWARD_PT_KERV, "LowTemperatureTransition", elements.JWARD_PT_KERO) | |
632 | ||
633 | --jetfuel | |
634 | local JETFUEL = elements.allocate("JWARD", "JETB") | |
635 | elements.element(elements.JWARD_PT_JETB, elements.element(elements.DEFAULT_PT_GEL)) | |
636 | elements.property(elements.JWARD_PT_JETB, "Name", "JETB") | |
637 | elements.property(elements.JWARD_PT_JETB, "Description", "Jet b type fuel-blend of Kero and Ptrl for jet engines") | |
638 | elements.property(elements.JWARD_PT_JETB, "Colour", 0x676601) | |
639 | elements.property(elements.JWARD_PT_JETB, "MenuSection", 5) | |
640 | elements.property(elements.JWARD_PT_JETB, "Gravity", .04) | |
641 | elements.property(elements.JWARD_PT_JETB, "Flammable", 5000) | |
642 | elements.property(elements.JWARD_PT_JETB, "Explosive", 1) | |
643 | elements.property(elements.JWARD_PT_JETB, "Loss", 0.8) | |
644 | elements.property(elements.JWARD_PT_JETB, "AirLoss", 0.94) | |
645 | elements.property(elements.JWARD_PT_JETB, "AirDrag", 0.02) | |
646 | elements.property(elements.JWARD_PT_JETB, "Advection", 0.8) | |
647 | elements.property(elements.JWARD_PT_JETB, "HighTemperature", 353.15) | |
648 | elements.property(elements.JWARD_PT_JETB, "Weight", 13) | |
649 | elements.property(elements.JWARD_PT_JETB, "State", ST_liquid) | |
650 | elements.property(elements.JWARD_PT_JETB, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY) | |
651 | elements.property(elements.JWARD_PT_JETB, "LowTemperature", 225.15) | |
652 | elements.property(elements.JWARD_PT_JETB, "LowTemperatureTransition", elements.DEFAULT_PT_ICE) | |
653 | ||
654 | --tar | |
655 | local TARGAS = elements.allocate("JWARD", "TARV") | |
656 | local TAR = elements.allocate("JWARD", "TAR") | |
657 | elements.element(elements.JWARD_PT_TAR, elements.element(elements.DEFAULT_PT_GEL)) | |
658 | elements.property(elements.JWARD_PT_TAR, "Name", "TAR") | |
659 | elements.property(elements.JWARD_PT_TAR, "Description", "tar hard to burn") | |
660 | elements.property(elements.JWARD_PT_TAR, "Colour", 0x0D0D03) | |
661 | elements.property(elements.JWARD_PT_TAR, "MenuSection", 5) | |
662 | elements.property(elements.JWARD_PT_TAR, "Gravity", .1) | |
663 | elements.property(elements.JWARD_PT_TAR, "Flammable", 2) | |
664 | elements.property(elements.JWARD_PT_TAR, "Explosive", 0) | |
665 | elements.property(elements.JWARD_PT_TAR, "Loss", 1) | |
666 | elements.property(elements.JWARD_PT_TAR, "AirLoss", .5) | |
667 | elements.property(elements.JWARD_PT_TAR, "AirDrag", .01) | |
668 | elements.property(elements.JWARD_PT_TAR, "Advection", .01) | |
669 | elements.property(elements.JWARD_PT_TAR, "Diffusion", 0.01) | |
670 | elements.property(elements.JWARD_PT_TAR, "State", ST_liquid) | |
671 | elements.property(elements.JWARD_PT_TAR, "Weight", 50) | |
672 | elements.property(elements.JWARD_PT_TAR, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY) | |
673 | elements.property(elements.JWARD_PT_TAR, "HighTemperature", 873.15) | |
674 | elements.property(elements.JWARD_PT_TAR, "HighTemperatureTransition", elements.JWARD_PT_TARV) | |
675 | ||
676 | elements.element(elements.JWARD_PT_TARV, elements.element(elements.DEFAULT_PT_HYGN)) | |
677 | elements.property(elements.JWARD_PT_TARV, "Name", "TARV") | |
678 | elements.property(elements.JWARD_PT_TARV, "Description", "tar gas") | |
679 | elements.property(elements.JWARD_PT_TARV, "Colour", 0x4C2D20) | |
680 | elements.property(elements.JWARD_PT_TARV, "MenuVisible", 0) | |
681 | elements.property(elements.JWARD_PT_TARV, "Gravity", -0.02) | |
682 | elements.property(elements.JWARD_PT_TARV, "Flammable", 10) | |
683 | elements.property(elements.JWARD_PT_TARV, "Explosive", 0) | |
684 | elements.property(elements.JWARD_PT_TARV, "Loss", 0.75) | |
685 | elements.property(elements.JWARD_PT_TARV, "AirLoss", 0.97) | |
686 | elements.property(elements.JWARD_PT_TARV, "AirDrag", 0.01) | |
687 | elements.property(elements.JWARD_PT_TARV, "Advection", 1) | |
688 | elements.property(elements.JWARD_PT_TARV, "Weight", 0) | |
689 | elements.property(elements.JWARD_PT_TARV, "Diffusion", 0.7) | |
690 | elements.property(elements.JWARD_PT_TARV, "Meltable", 0) | |
691 | elements.property(elements.JWARD_PT_TARV, "Hardness", 0) | |
692 | elements.property(elements.JWARD_PT_TARV, "Falldown", 0) | |
693 | elements.property(elements.JWARD_PT_TARV, "Properties", TYPE_GAS) | |
694 | elements.property(elements.JWARD_PT_TARV, "State", ST_GAS) | |
695 | elements.property(elements.JWARD_PT_TARV, "Temperature", 403.15) | |
696 | elements.property(elements.JWARD_PT_TARV, "HeatConduct", 195) | |
697 | elements.property(elements.JWARD_PT_TARV, "LowTemperature", 873.15) | |
698 | elements.property(elements.JWARD_PT_TARV, "LowTemperatureTransition", elements.JWARD_PT_TAR) | |
699 | ||
700 | --wax | |
701 | local WAXGAS = elements.allocate("JWARD", "WAXV") | |
702 | elements.element(elements.JWARD_PT_WAXV, elements.element(elements.DEFAULT_PT_HYGN)) | |
703 | elements.property(elements.JWARD_PT_WAXV, "Name", "WAXV") | |
704 | elements.property(elements.JWARD_PT_WAXV, "Description", "wax gas") | |
705 | elements.property(elements.JWARD_PT_WAXV, "Colour", 0xF0F0BB) | |
706 | elements.property(elements.JWARD_PT_WAXV, "MenuSection", SC_GAS) | |
707 | elements.property(elements.JWARD_PT_WAXV, "Gravity", -0.02) | |
708 | elements.property(elements.JWARD_PT_WAXV, "Flammable", 500) | |
709 | elements.property(elements.JWARD_PT_WAXV, "Explosive", 0) | |
710 | elements.property(elements.JWARD_PT_WAXV, "Loss", 0.75) | |
711 | elements.property(elements.JWARD_PT_WAXV, "AirLoss", 0.97) | |
712 | elements.property(elements.JWARD_PT_WAXV, "AirDrag", 0.01) | |
713 | elements.property(elements.JWARD_PT_WAXV, "Advection", 1) | |
714 | elements.property(elements.JWARD_PT_WAXV, "Weight", 0) | |
715 | elements.property(elements.JWARD_PT_WAXV, "Diffusion", 0.7) | |
716 | elements.property(elements.JWARD_PT_WAXV, "Meltable", 0) | |
717 | elements.property(elements.JWARD_PT_WAXV, "Hardness", 0) | |
718 | elements.property(elements.JWARD_PT_WAXV, "Falldown", 0) | |
719 | elements.property(elements.JWARD_PT_WAXV, "Properties", TYPE_GAS) | |
720 | elements.property(elements.JWARD_PT_WAXV, "State", ST_GAS) | |
721 | elements.property(elements.JWARD_PT_WAXV, "Temperature", 833.15) | |
722 | elements.property(elements.JWARD_PT_WAXV, "HeatConduct", 195) | |
723 | elements.property(elements.JWARD_PT_WAXV, "LowTemperature", 823.15) | |
724 | elements.property(elements.JWARD_PT_WAXV, "LowTemperatureTransition", elements.DEFAULT_PT_WAX) | |
725 | ||
726 | --coke | |
727 | local CoalCoke = elements.allocate("JWARD", "COKE") | |
728 | elements.element(elements.JWARD_PT_COKE, elements.element(elements.DEFAULT_PT_BCOL)) | |
729 | elements.property(elements.JWARD_PT_COKE, "Name", "COKE") | |
730 | elements.property(elements.JWARD_PT_COKE, "Description", "COAL COKE. Burns for a long time and hot.") | |
731 | elements.property(elements.JWARD_PT_COKE, "Colour", 0xAAAAAA) | |
732 | elements.property(elements.JWARD_PT_COKE, "MenuSection", 5) | |
733 | elements.property(elements.JWARD_PT_COKE, "Gravity", .35) | |
734 | elements.property(elements.JWARD_PT_COKE, "Flammable", 0) | |
735 | elements.property(elements.JWARD_PT_COKE, "Explosive", 0) | |
736 | elements.property(elements.JWARD_PT_COKE, "Loss", 0.15) | |
737 | elements.property(elements.JWARD_PT_COKE, "AirLoss", 0.96) | |
738 | elements.property(elements.JWARD_PT_COKE, "AirDrag", 0.03) | |
739 | elements.property(elements.JWARD_PT_COKE, "Advection", 0.4) | |
740 | elements.property(elements.JWARD_PT_COKE, "Weight", 78) | |
741 | elements.property(elements.JWARD_PT_COKE, "Diffusion", 0) | |
742 | elements.property(elements.JWARD_PT_COKE, "Falldown", 1) | |
743 | COKEUpdate = function(i, x, y, s, n) | |
744 | local clife = tpt.get_property('life', x, y) | |
745 | if clife > 1 then | |
746 | for cx = -1, 1, 2 do | |
747 | for cy = -1, 1, 2 do | |
748 | tpt.create(x + cx, y + cy, 'fire') | |
749 | tpt.set_property('temp', 1700, x, y) | |
750 | end | |
751 | end | |
752 | tpt.set_property('life', clife - 1, x, y) | |
753 | elseif clife == 1 then | |
754 | tpt.set_property('type', 0, x, y) | |
755 | elseif s > 0 then | |
756 | for cx = -1, 1, 2 do | |
757 | for cy = -1, 1, 2 do | |
758 | if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then | |
759 | tpt.set_property('life', 500, x, y) | |
760 | return true | |
761 | end | |
762 | end | |
763 | end | |
764 | end | |
765 | end | |
766 | tpt.element_func(COKEUpdate, tpt.element('coke')) | |
767 | ||
768 | local CreosoteGas = elements.allocate("JWARD", "CRTV") | |
769 | elements.element(elements.JWARD_PT_CRTV, elements.element(elements.DEFAULT_PT_HYGN)) | |
770 | elements.property(elements.JWARD_PT_CRTV, "Name", "CRTV") | |
771 | elements.property(elements.JWARD_PT_CRTV, "Description", "creosote gas") | |
772 | elements.property(elements.JWARD_PT_CRTV, "Colour", 0x585117) | |
773 | elements.property(elements.JWARD_PT_CRTV, "MenuVisible", 0) | |
774 | elements.property(elements.JWARD_PT_CRTV, "Gravity", -0.02) | |
775 | elements.property(elements.JWARD_PT_CRTV, "Explosive", 0) | |
776 | elements.property(elements.JWARD_PT_CRTV, "Loss", 0.75) | |
777 | elements.property(elements.JWARD_PT_CRTV, "AirDrag", 0.01) | |
778 | elements.property(elements.JWARD_PT_CRTV, "Advection", 1) | |
779 | elements.property(elements.JWARD_PT_CRTV, "Weight", 0) | |
780 | elements.property(elements.JWARD_PT_CRTV, "Diffusion", 0.7) | |
781 | elements.property(elements.JWARD_PT_CRTV, "Hardness", 0) | |
782 | elements.property(elements.JWARD_PT_CRTV, "Falldown", 0) | |
783 | elements.property(elements.JWARD_PT_CRTV, "Properties", TYPE_GAS) | |
784 | elements.property(elements.JWARD_PT_CRTV, "State", ST_GAS) | |
785 | elements.property(elements.JWARD_PT_CRTV, "Temperature", 883.15) | |
786 | elements.property(elements.JWARD_PT_CRTV, "HeatConduct", 195) | |
787 | elements.property(elements.JWARD_PT_CRTV, "LowTemperature", 871) | |
788 | elements.property(elements.JWARD_PT_CRTV, "LowTemperatureTransition", elements.JWARD_PT_CRST) | |
789 | ||
790 | local Creosote = elements.allocate("JWARD", "CRST") | |
791 | elements.element(elements.JWARD_PT_CRST, elements.element(elements.DEFAULT_PT_GEL)) | |
792 | elements.property(elements.JWARD_PT_CRST, "Name", "CRST") | |
793 | elements.property(elements.JWARD_PT_CRST, "Description", "creosote ") | |
794 | elements.property(elements.JWARD_PT_CRST, "Colour", 0x0F0E04) | |
795 | elements.property(elements.JWARD_PT_CRST, "MenuSection", SC_LIQUID) | |
796 | elements.property(elements.JWARD_PT_CRST, "Gravity", .04) | |
797 | elements.property(elements.JWARD_PT_CRST, "Flammable", 10) | |
798 | elements.property(elements.JWARD_PT_CRST, "Explosive", 0) | |
799 | elements.property(elements.JWARD_PT_CRST, "Loss", 1) | |
800 | elements.property(elements.JWARD_PT_CRST, "AirLoss", .5) | |
801 | elements.property(elements.JWARD_PT_CRST, "AirDrag", .01) | |
802 | elements.property(elements.JWARD_PT_CRST, "Advection", .01) | |
803 | elements.property(elements.JWARD_PT_CRST, "Weight", 5) | |
804 | elements.property(elements.JWARD_PT_CRST, "State", ST_liquid) | |
805 | elements.property(elements.JWARD_PT_CRST, "Properties", elem.TYPE_LIQUID) | |
806 | elements.property(elements.JWARD_PT_CRST, "HighTemperature", 872) | |
807 | elements.property(elements.JWARD_PT_CRST, "HighTemperatureTransition", elements.JWARD_PT_CRTV) | |
808 | --crude oil | |
809 | local OILCRUDE = elements.allocate("JWARD", "OILC") | |
810 | elements.element(elements.JWARD_PT_OILC, elements.element(elements.DEFAULT_PT_GEL)) | |
811 | elements.property(elements.JWARD_PT_OILC, "Name", "OILC") | |
812 | elements.property(elements.JWARD_PT_OILC, "Description", "Crude oil can be distilled, didn't name it coil for a reason") | |
813 | elements.property(elements.JWARD_PT_OILC, "Colour", 0x35350D) | |
814 | elements.property(elements.JWARD_PT_OILC, "MenuSection", 7) | |
815 | elements.property(elements.JWARD_PT_OILC, "Gravity", .04) | |
816 | - | elements.property(elements.JWARD_PT_OILC, "Explosive", 1) |
816 | + | |
817 | elements.property(elements.JWARD_PT_OILC, "Explosive", 0) | |
818 | elements.property(elements.JWARD_PT_OILC, "Loss", 1) | |
819 | elements.property(elements.JWARD_PT_OILC, "AirLoss", .5) | |
820 | elements.property(elements.JWARD_PT_OILC, "AirDrag", .01) | |
821 | elements.property(elements.JWARD_PT_OILC, "Advection", .01) | |
822 | elements.property(elements.JWARD_PT_OILC, "Weight", 5) | |
823 | elements.property(elements.JWARD_PT_OILC, "State", ST_liquid) | |
824 | elements.property(elements.JWARD_PT_OILC, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY) | |
825 | function OILC(i,x,y,s,n) | |
826 | dis = tpt.get_property('temp', x, y) | |
827 | - | tpt.set_property('life', math.random(2,9), x, y) |
827 | + | |
828 | tpt.set_property('tmp', math.random(2,9), x, y) | |
829 | - | petrol = tpt.get_property('life', x, y) |
829 | + | |
830 | - | diesel = tpt.get_property('life', x, y) |
830 | + | oillife = tpt.get_property('tmp', x, y) |
831 | - | WAXGAS = tpt.get_property('life', x, y) |
831 | + | if oillife == 9 then |
832 | - | COKE = tpt.get_property('life', x, y) |
832 | + | tpt.parts[i].type = tpt.element('crtv') |
833 | - | TARGAS = tpt.get_property('life', x, y) |
833 | + | oillife = nil |
834 | - | KEROGAS = tpt.get_property('life', x, y) |
834 | + | |
835 | - | GAS = tpt.get_property('life', x, y) |
835 | + | if oillife == 8 then |
836 | - | CRGAS = tpt.get_property('life', x, y) |
836 | + | tpt.parts[i].type = tpt.element('gas') |
837 | - | if CRGAS == 9 then |
837 | + | oillife = nil |
838 | - | tpt.create(x, y + 1, 'crtv') |
838 | + | |
839 | - | tpt.set_property('type', 0, x, y) |
839 | + | if oillife == 7 then |
840 | tpt.parts[i].type = tpt.element('kerv') | |
841 | - | if GAS == 8 then |
841 | + | oillife = nil |
842 | - | tpt.create(x, y + 1, 'gas') |
842 | + | |
843 | - | tpt.set_property('type', 0, x, y) |
843 | + | if oillife == 6 then |
844 | tpt.parts[i].type = tpt.element('ptlv') | |
845 | - | if KEROGAS == 7 then |
845 | + | oillife = nil |
846 | - | tpt.create(x, y + 1, 'kerv') |
846 | + | |
847 | - | tpt.set_property('type', 0, x, y) |
847 | + | if oillife == 5 then |
848 | tpt.parts[i].type = tpt.element('dslv') | |
849 | - | if petrol == 6 then |
849 | + | oillife = nil |
850 | - | tpt.create(x, y + 1, 'ptlv') |
850 | + | |
851 | - | tpt.set_property('type', 0, x, y) |
851 | + | if oillife == 4 then |
852 | tpt.parts[i].type = tpt.element('waxv') | |
853 | - | if diesel == 5 then |
853 | + | oillife = nil |
854 | - | tpt.create(x, y + 1, 'dslv') |
854 | + | |
855 | - | tpt.set_property('type', 0, x, y) |
855 | + | if oillife == 3 then |
856 | tpt.parts[i].type = tpt.element('coke') | |
857 | - | if WAXGAS == 4 then |
857 | + | oillife = nil |
858 | - | tpt.create(x, y + 1, 'waxv') |
858 | + | |
859 | - | tpt.set_property('type', 0, x, y) |
859 | + | if oillife == 2 then |
860 | tpt.parts[i].type = tpt.element('tarv') | |
861 | - | if COKE == 3 then |
861 | + | oillife = nil |
862 | - | tpt.create(x, y + 1, 'coke') |
862 | + | |
863 | - | tpt.set_property('type', 0, x, y) |
863 | + | |
864 | tpt.element_func(OILC,OILCRUDE) | |
865 | - | if TARGAS == 2 then |
865 | + | |
866 | - | tpt.create(x, y + 1, 'tarv') |
866 | + | |
867 | - | tpt.set_property('type', 0, x , y) |
867 | + | |
868 | elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15) | |
869 | elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0) | |
870 | elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL) | |
871 | elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15) | |
872 | elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000) | |
873 | elements.property(elements.DEFAULT_PT_BCOL, "HighTemperatureTransition", elements.JWARD_PT_COKE) | |
874 | elements.property(elements.DEFAULT_PT_BCOL, "HighTemperature", 773.15) | |
875 | elements.property(elements.DEFAULT_PT_COAL, "HighTemperatureTransition", elements.JWARD_PT_COKE) | |
876 | elements.property(elements.DEFAULT_PT_COAL, "HighTemperature", 773.15) | |
877 | elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2) | |
878 | elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15) | |
879 | elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS) | |
880 | elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV) | |
881 | elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15) | |
882 | elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", 255.15) | |
883 | elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE) | |
884 | elements.property(elements.DEFAULT_PT_DESL, "Weight", 12) | |
885 | elements.property(elements.DEFAULT_PT_MWAX, "HighTemperatureTransition", elements.JWARD_PT_WAXV) | |
886 | elements.property(elements.DEFAULT_PT_MWAX, "HighTemperature", 823.15) | |
887 | elements.property(elements.DEFAULT_PT_WAX, "HeatConduct", 25) |