Advertisement
KSA_MissionCtrl

droptesthi.ks 4/16

Apr 14th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.13 KB | None | 0 0
  1. //create access to all the parts
  2. set hichute to ship:partstagged("hi")[0].
  3. set lochute to ship:partstagged("lo")[0].
  4. set comms to ship:partstagged("antenna")[0].
  5. set probe to ship:partstagged("core")[0].
  6. set decoupler to ship:partstagged("drop")[0].
  7. set battlist to ship:partsdubbed("z-200 rechargeable battery bank").
  8. set caplist to ship:partsdubbed("cap-101 capacitor").
  9. set goolist to ship:partstagged("goo").
  10.  
  11. // program behavior variables
  12. set deployalt to 25000.
  13. set deployupperheight to 24000.
  14. set loweratmosphere to 18000.
  15. set deploylowerheight to 3000.
  16. set maxdropspeed to 12.
  17. set commtimeout to 30.
  18. set transmissiontimeout to 15.
  19. set lowbattlvl to 25. // for when no data is being transmitted
  20. set lowbattlvltrans to 150. // for when data is being transmitted
  21. set capactive to -1.
  22. set discharged to false.
  23. lock transtime to time:seconds.
  24.  
  25. clearscreen.
  26. abort off.
  27. print "[" + time:clock + "] Program running... confirming systems".
  28. log "[" + time:clock + "] Program running... confirming systems" to droplog.
  29. copy droplog to 0.
  30.  
  31. print "[" + time:clock + "] " + battlist:length + " Battery(s) found".
  32. log "[" + time:clock + "] " + battlist:length + " Battery(s) found" to droplog.
  33. copy droplog to 0.
  34. print "[" + time:clock + "] " + caplist:length + " Capacitor(s) found".
  35. log "[" + time:clock + "] " + caplist:length + " Capacitor(s) found" to droplog.
  36. copy droplog to 0.
  37. print "[" + time:clock + "] " + goolist:length + " Goo canister(s) found".
  38. log "[" + time:clock + "] " + goolist:length + " Goo canister(s) found" to droplog.
  39. copy droplog to 0.
  40.  
  41. print "[" + time:clock + "] Operational systems confirmed, awaiting deployment altitude".
  42. log "[" + time:clock + "] Operational systems confirmed, awaiting deployment altitude" to droplog.
  43. copy droplog to 0.
  44.  
  45. // no need to monitor systems as we are conected to power of mothership
  46. until ship:altitude > deployalt { wait 0.001. }.
  47.  
  48. // drop and begin
  49. decoupler:getmodule("moduleanchoreddecoupler"):doevent("decouple").
  50. print "[" + time:clock + "] 25km reached - deploying!".
  51. log "[" + time:clock + "] 25km reached - deploying!" to droplog.
  52. copy droplog to 0.
  53.  
  54. hichute:getmodule("realchutemodule"):doevent("deploy chute").
  55. lochute:getmodule("realchutemodule"):doevent("deploy chute").
  56. print "[" + time:clock + "] chutes armed".
  57. log "[" + time:clock + "] chutes armed" to droplog.
  58. copy droplog to 0.
  59.  
  60. for batt in battlist {
  61. set batt:resources[0]:enabled to true.
  62. }.
  63. print "[" + time:clock + "] All batteries enabled".
  64. log "[" + time:clock + "] All batteries enabled" to droplog.
  65. copy droplog to 0.
  66. print "[" + time:clock + "] Awaiting chute deployment".
  67. log "[" + time:clock + "] Awaiting chute deployment" to droplog.
  68. copy droplog to 0.
  69.  
  70. // it is possible that when calling ship:resources[0], even though additional batteries were enabled,
  71. // it was before a tick update that changed the ship:resources[0] value, so it was still the 25EC
  72. // of just the drop pod probe core that was the value returned (already slightly less than 25), which is
  73. // what triggered an unneccessary capacitor discharge at the start of the program. So wait for tick update.
  74. wait 0.1.
  75.  
  76. until hichute:getmodule("realchutemodule"):hasevent("cut chute") {
  77. if not discharged and ship:resources[0]:amount < lowbattlvl {
  78. // if a capacitor is discharging, check that it is done
  79. if capactive > -1 {
  80. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  81. } else {
  82. set capnum to 0.
  83. until capnum = caplist:length {
  84. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  85. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  86. set capactive to capnum.
  87. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  88. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  89. copy droplog to 0.
  90. break.
  91. }.
  92. set capnum to capnum + 1.
  93. }.
  94. if capnum = caplist:length {
  95. set discharged to true.
  96. Print "[" + time:clock + "] All capacitors drained".
  97. log "[" + time:clock + "] All capacitors drained" to droplog.
  98. copy droplog to 0.
  99. }.
  100. }.
  101. }.
  102. wait 0.001.
  103. }.
  104. Print "[" + time:clock + "] Chute deployment confirmed. Awaiting full deployment".
  105. log "[" + time:clock + "] Chute deployment confirmed. Awaiting full deployment" to droplog.
  106. copy droplog to 0.
  107.  
  108. // we don't care how fast we are dropping - air is too thin to rip off antenna at any speed once chute is deployed
  109. until alt:radar < deployupperheight {
  110. if not discharged and ship:resources[0]:amount < lowbattlvl {
  111. // if a capacitor is discharging, check that it is done
  112. if capactive > -1 {
  113. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  114. } else {
  115. set capnum to 0.
  116. until capnum = caplist:length {
  117. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  118. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  119. set capactive to capnum.
  120. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  121. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  122. copy droplog to 0.
  123. break.
  124. }.
  125. set capnum to capnum + 1.
  126. }.
  127. if capnum = caplist:length {
  128. set discharged to true.
  129. Print "[" + time:clock + "] All capacitors drained".
  130. log "[" + time:clock + "] All capacitors drained" to droplog.
  131. copy droplog to 0.
  132. }.
  133. }.
  134. }.
  135. wait 0.001.
  136. }.
  137. Print "[" + time:clock + "] Full chute deployment confirmed".
  138. log "[" + time:clock + "] Full chute deployment confirmed" to droplog.
  139. copy droplog to 0.
  140. comms:getmodule("modulertantenna"):doevent("activate").
  141. Print "[" + time:clock + "] Communications antenna deployed. Awaiting connection".
  142. log "[" + time:clock + "] Communications antenna deployed. Awaiting connection" to droplog.
  143. copy droplog to 0.
  144.  
  145. set timer to time:seconds.
  146. until probe:getmodule("modulespu"):getfield("spu") = "operational." {
  147. if not discharged and ship:resources[0]:amount < lowbattlvl {
  148. // if a capacitor is discharging, check that it is done
  149. if capactive > -1 {
  150. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  151. } else {
  152. set capnum to 0.
  153. until capnum = caplist:length {
  154. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  155. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  156. set capactive to capnum.
  157. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  158. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  159. copy droplog to 0.
  160. break.
  161. }.
  162. set capnum to capnum + 1.
  163. }.
  164. if capnum = caplist:length {
  165. set discharged to true.
  166. Print "[" + time:clock + "] All capacitors drained".
  167. log "[" + time:clock + "] All capacitors drained" to droplog.
  168. copy droplog to 0.
  169. }.
  170. }.
  171. }.
  172. if time:seconds - timer > commtimeout {
  173. Print "[" + time:clock + "] Communications link failed!".
  174. log "[" + time:clock + "] Communications link failed!" to droplog.
  175. copy droplog to 0.
  176. shutdown.
  177. }
  178. wait 0.001.
  179. }.
  180. Print "[" + time:clock + "] Communications link established".
  181. log "[" + time:clock + "] Communications link established" to droplog.
  182. copy droplog to 0.
  183. Print "[" + time:clock + "] First upper atmospheric experiment run commencing".
  184. log "[" + time:clock + "] First upper atmospheric experiment run commencing" to droplog.
  185. copy droplog to 0.
  186.  
  187. toggle AG4.
  188. // goo containers are only run once per atmosphere level (upper/lower)
  189. for goo in goolist {
  190. // we don't care which goo pod is run - if a goo container is unused, it will have an event available
  191. if goo:getmodule("modulescienceexperiment"):hasevent("observe mystery goo") {
  192. goo:getmodule("modulescienceexperiment"):doevent("observe mystery goo").
  193. break.
  194. }.
  195. }.
  196. Print "[" + time:clock + "] Awaiting data transmission".
  197. log "[" + time:clock + "] Awaiting data transmission" to droplog.
  198. copy droplog to 0.
  199.  
  200. set timer to time:seconds.
  201. set nodata to false.
  202. // until the comms message changes from "idle", nothing is being transmitted
  203. until comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  204. // keep tabs on our power status - release capcitor charge as necessary
  205. if not discharged and ship:resources[0]:amount < lowbattlvl {
  206. // if a capacitor is discharging, check that it is done
  207. if capactive > -1 {
  208. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  209. } else {
  210. set capnum to 0.
  211. until capnum = caplist:length {
  212. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  213. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  214. set capactive to capnum.
  215. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  216. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  217. copy droplog to 0.
  218. break.
  219. }.
  220. set capnum to capnum + 1.
  221. }.
  222. if capnum = caplist:length {
  223. set discharged to true.
  224. Print "[" + time:clock + "] All capacitors drained".
  225. log "[" + time:clock + "] All capacitors drained" to droplog.
  226. copy droplog to 0.
  227. }.
  228. }.
  229. }.
  230. // keeps tabs on our connection to Mission Control
  231. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  232. Print "[" + time:clock + "] Connection lost".
  233. log "[" + time:clock + "] Connection lost" to droplog.
  234. copy droplog to 0.
  235. shutdown.
  236. }.
  237. // if the user recycles all experiments, no data will be sent
  238. if time:seconds - timer > commtimeout {
  239. set nodata to true.
  240. break.
  241. }
  242. wait 0.001.
  243. }.
  244.  
  245. if nodata {
  246. // aborts the second run as well - no data means no data for this entire biome level
  247. Print "[" + time:clock + "] Aborting upper atmospheric runs due to no data to transmit".
  248. log "[" + time:clock + "] Aborting upper atmospheric runs due to no data to transmit" to droplog.
  249. copy droplog to 0.
  250. } else {
  251. Print "[" + time:clock + "] Data transmission has begun".
  252. log "[" + time:clock + "] Data transmission has begun" to droplog.
  253. copy droplog to 0.
  254.  
  255. until time:seconds - transtime > transmissiontimeout {
  256. if not discharged and ship:resources[0]:amount < lowbattlvltrans {
  257. // if a capacitor is discharging, check that it is done
  258. if capactive > -1 {
  259. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  260. } else {
  261. set capnum to 0.
  262. until capnum = caplist:length {
  263. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  264. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  265. set capactive to capnum.
  266. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  267. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  268. copy droplog to 0.
  269. break.
  270. }.
  271. set capnum to capnum + 1.
  272. }.
  273. if capnum = caplist:length {
  274. set discharged to true.
  275. Print "[" + time:clock + "] All capacitors drained".
  276. log "[" + time:clock + "] All capacitors drained" to droplog.
  277. copy droplog to 0.
  278. }.
  279. }.
  280. }.
  281. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  282. Print "[" + time:clock + "] Connection lost".
  283. log "[" + time:clock + "] Connection lost" to droplog.
  284. copy droplog to 0.
  285. shutdown.
  286. }.
  287. if transtime < time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  288. lock transtime to time:seconds.
  289. }.
  290. if transtime = time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "idle" {
  291. set transtime to time:seconds.
  292. }.
  293. wait 0.001.
  294. }.
  295. lock transtime to time:seconds.
  296. Print "[" + time:clock + "] Data transmission has ended".
  297. log "[" + time:clock + "] Data transmission has ended" to droplog.
  298. copy droplog to 0.
  299.  
  300. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  301. Print "[" + time:clock + "] Connection lost".
  302. log "[" + time:clock + "] Connection lost" to droplog.
  303. copy droplog to 0.
  304. shutdown.
  305. }.
  306.  
  307. // if we haven't reached the lower atmosphere yet, take a second run for additional data
  308. if alt:radar > loweratmosphere {
  309. Print "[" + time:clock + "] Second upper atmospheric experiment run commencing".
  310. log "[" + time:clock + "] Second upper atmospheric experiment run commencing" to droplog.
  311. copy droplog to 0.
  312. toggle AG4.
  313. for goo in goolist {
  314. if goo:getmodule("modulescienceexperiment"):allevents:length > 0 {
  315. goo:getmodule("modulescienceexperiment"):doevent("observe mystery goo").
  316. break.
  317. }.
  318. }.
  319. Print "[" + time:clock + "] Awaiting data transmission".
  320. log "[" + time:clock + "] Awaiting data transmission" to droplog.
  321. copy droplog to 0.
  322.  
  323. set timer to time:seconds.
  324. set nodata to false.
  325. until comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  326. if not discharged and ship:resources[0]:amount < lowbattlvl {
  327. // if a capacitor is discharging, check that it is done
  328. if capactive > -1 {
  329. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  330. } else {
  331. set capnum to 0.
  332. until capnum = caplist:length {
  333. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  334. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  335. set capactive to capnum.
  336. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  337. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  338. copy droplog to 0.
  339. break.
  340. }.
  341. set capnum to capnum + 1.
  342. }.
  343. if capnum = caplist:length {
  344. set discharged to true.
  345. Print "[" + time:clock + "] All capacitors drained".
  346. log "[" + time:clock + "] All capacitors drained" to droplog.
  347. copy droplog to 0.
  348. }.
  349. }.
  350. }.
  351. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  352. Print "[" + time:clock + "] Connection lost".
  353. log "[" + time:clock + "] Connection lost" to droplog.
  354. copy droplog to 0.
  355. shutdown.
  356. }.
  357. if time:seconds - timer > commtimeout {
  358. set nodata to true.
  359. break.
  360. }
  361. wait 0.001.
  362. }.
  363.  
  364. if nodata {
  365. Print "[" + time:clock + "] Aborting second upper atmospheric run due to no data to transmit".
  366. log "[" + time:clock + "] Aborting second upper atmospheric run due to no data to transmit" to droplog.
  367. copy droplog to 0.
  368. } else {
  369. Print "[" + time:clock + "] Data transmission has begun".
  370. log "[" + time:clock + "] Data transmission has begun" to droplog.
  371. copy droplog to 0.
  372.  
  373. until time:seconds - transtime > transmissiontimeout {
  374. if not discharged and ship:resources[0]:amount < lowbattlvltrans {
  375. // if a capacitor is discharging, check that it is done
  376. if capactive > -1 {
  377. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  378. } else {
  379. set capnum to 0.
  380. until capnum = caplist:length {
  381. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  382. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  383. set capactive to capnum.
  384. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  385. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  386. copy droplog to 0.
  387. break.
  388. }.
  389. set capnum to capnum + 1.
  390. }.
  391. if capnum = caplist:length {
  392. set discharged to true.
  393. Print "[" + time:clock + "] All capacitors drained".
  394. log "[" + time:clock + "] All capacitors drained" to droplog.
  395. copy droplog to 0.
  396. }.
  397. }.
  398. }.
  399. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  400. Print "[" + time:clock + "] Connection lost".
  401. log "[" + time:clock + "] Connection lost" to droplog.
  402. copy droplog to 0.
  403. shutdown.
  404. }.
  405. if transtime < time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  406. lock transtime to time:seconds.
  407. }.
  408. if transtime = time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "idle" {
  409. set transtime to time:seconds.
  410. }.
  411. wait 0.01.
  412. }.
  413. lock transtime to time:seconds.
  414. Print "[" + time:clock + "] Data transmission has ended".
  415. log "[" + time:clock + "] Data transmission has ended" to droplog.
  416. copy droplog to 0.
  417. }.
  418. } else {
  419. Print "[" + time:clock + "] Aborting second upper atmospheric run due to altitude".
  420. log "[" + time:clock + "] Aborting second upper atmospheric run due to altitude" to droplog.
  421. copy droplog to 0.
  422. }.
  423. }.
  424.  
  425. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  426. Print "[" + time:clock + "] Connection lost".
  427. log "[" + time:clock + "] Connection lost" to droplog.
  428. copy droplog to 0.
  429. shutdown.
  430. }.
  431.  
  432. Print "[" + time:clock + "] Advancing to lower atmosphere".
  433. log "[" + time:clock + "] Advancing to lower atmosphere" to droplog.
  434. copy droplog to 0.
  435. comms:getmodule("modulertantenna"):doevent("deactivate").
  436. Print "[" + time:clock + "] Communications antenna retracted".
  437. log "[" + time:clock + "] Communications antenna retracted" to droplog.
  438. copy droplog to 0.
  439. hichute:getmodule("realchutemodule"):doevent("cut chute").
  440. Print "[" + time:clock + "] Chute cut".
  441. log "[" + time:clock + "] Chute cut" to droplog.
  442. copy droplog to 0.
  443. Print "[" + time:clock + "] Awaiting chute deployment".
  444. log "[" + time:clock + "] Awaiting chute deployment" to droplog.
  445. copy droplog to 0.
  446.  
  447. until lochute:getmodule("realchutemodule"):hasevent("cut chute") {
  448. if not discharged and ship:resources[0]:amount < lowbattlvl {
  449. // if a capacitor is discharging, check that it is done
  450. if capactive > -1 {
  451. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  452. } else {
  453. set capnum to 0.
  454. until capnum = caplist:length {
  455. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  456. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  457. set capactive to capnum.
  458. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  459. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  460. copy droplog to 0.
  461. break.
  462. }.
  463. set capnum to capnum + 1.
  464. }.
  465. if capnum = caplist:length {
  466. set discharged to true.
  467. Print "[" + time:clock + "] All capacitors drained".
  468. log "[" + time:clock + "] All capacitors drained" to droplog.
  469. copy droplog to 0.
  470. }.
  471. }.
  472. }.
  473. wait 0.001.
  474. }.
  475. Print "[" + time:clock + "] Chute deployment confirmed. Awaiting full deployment".
  476. log "[" + time:clock + "] Chute deployment confirmed. Awaiting full deployment" to droplog.
  477. copy droplog to 0.
  478.  
  479. until alt:radar < deploylowerheight and ship:verticalspeed*-1 < maxdropspeed {
  480. if not discharged and ship:resources[0]:amount < lowbattlvl {
  481. // if a capacitor is discharging, check that it is done
  482. if capactive > -1 {
  483. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  484. } else {
  485. set capnum to 0.
  486. until capnum = caplist:length {
  487. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  488. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  489. set capactive to capnum.
  490. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  491. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  492. copy droplog to 0.
  493. break.
  494. }.
  495. set capnum to capnum + 1.
  496. }.
  497. if capnum = caplist:length {
  498. set discharged to true.
  499. Print "[" + time:clock + "] All capacitors drained".
  500. log "[" + time:clock + "] All capacitors drained" to droplog.
  501. copy droplog to 0.
  502. }.
  503. }.
  504. }.
  505. wait 0.001.
  506. }.
  507. Print "[" + time:clock + "] Full chute deployment confirmed".
  508. log "[" + time:clock + "] Full chute deployment confirmed" to droplog.
  509. copy droplog to 0.
  510. comms:getmodule("modulertantenna"):doevent("activate").
  511. Print "[" + time:clock + "] Communications antenna deployed. Awaiting connection".
  512. log "[" + time:clock + "] Communications antenna deployed. Awaiting connection" to droplog.
  513. copy droplog to 0.
  514.  
  515. set timer to time:seconds.
  516. until probe:getmodule("modulespu"):getfield("spu") = "operational." {
  517. if not discharged and ship:resources[0]:amount < lowbattlvl {
  518. // if a capacitor is discharging, check that it is done
  519. if capactive > -1 {
  520. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  521. } else {
  522. set capnum to 0.
  523. until capnum = caplist:length {
  524. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  525. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  526. set capactive to capnum.
  527. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  528. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  529. copy droplog to 0.
  530. break.
  531. }.
  532. set capnum to capnum + 1.
  533. }.
  534. if capnum = caplist:length {
  535. set discharged to true.
  536. Print "[" + time:clock + "] All capacitors drained".
  537. log "[" + time:clock + "] All capacitors drained" to droplog.
  538. copy droplog to 0.
  539. }.
  540. }.
  541. }.
  542. if time:seconds - timer > commtimeout {
  543. Print "[" + time:clock + "] Communications link failed!".
  544. log "[" + time:clock + "] Communications link failed!" to droplog.
  545. copy droplog to 0.
  546. shutdown.
  547. }
  548. wait 0.001.
  549. }.
  550. Print "[" + time:clock + "] Communications link established".
  551. log "[" + time:clock + "] Communications link established" to droplog.
  552. copy droplog to 0.
  553. Print "[" + time:clock + "] First lower atmospheric experiment run commencing".
  554. log "[" + time:clock + "] First lower atmospheric experiment run commencing" to droplog.
  555. copy droplog to 0.
  556.  
  557. toggle AG4.
  558. // goo containers are only run once per atmosphere level (upper/lower)
  559. for goo in goolist {
  560. // we don't care which goo pod is run - if a goo container is unused, it will have an event available
  561. if goo:getmodule("modulescienceexperiment"):hasevent("observe mystery goo") {
  562. goo:getmodule("modulescienceexperiment"):doevent("observe mystery goo").
  563. break.
  564. }.
  565. }.
  566. Print "[" + time:clock + "] Awaiting data transmission".
  567. log "[" + time:clock + "] Awaiting data transmission" to droplog.
  568. copy droplog to 0.
  569.  
  570. set timer to time:seconds.
  571. set nodata to false.
  572. // until the comms message changes from "idle", nothing is being transmitted
  573. until comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  574. // keep tabs on our power status - release capcitor charge as necessary
  575. if not discharged and ship:resources[0]:amount < lowbattlvl {
  576. // if a capacitor is discharging, check that it is done
  577. if capactive > -1 {
  578. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  579. } else {
  580. set capnum to 0.
  581. until capnum = caplist:length {
  582. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  583. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  584. set capactive to capnum.
  585. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  586. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  587. copy droplog to 0.
  588. break.
  589. }.
  590. set capnum to capnum + 1.
  591. }.
  592. if capnum = caplist:length {
  593. set discharged to true.
  594. Print "[" + time:clock + "] All capacitors drained".
  595. log "[" + time:clock + "] All capacitors drained" to droplog.
  596. copy droplog to 0.
  597. }.
  598. }.
  599. }.
  600. // keeps tabs on our connection to Mission Control
  601. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  602. Print "[" + time:clock + "] Connection lost".
  603. log "[" + time:clock + "] Connection lost" to droplog.
  604. copy droplog to 0.
  605. shutdown.
  606. }.
  607. // if the user recycles all experiments, no data will be sent
  608. if time:seconds - timer > commtimeout {
  609. set nodata to true.
  610. break.
  611. }
  612. wait 0.001.
  613. }.
  614.  
  615. if nodata {
  616. // aborts the second run as well - no data means no data for this entire biome level
  617. Print "[" + time:clock + "] Aborting lower atmospheric runs due to no data to transmit".
  618. log "[" + time:clock + "] Aborting lower atmospheric runs due to no data to transmit" to droplog.
  619. copy droplog to 0.
  620. } else {
  621. Print "[" + time:clock + "] Data transmission has begun".
  622. log "[" + time:clock + "] Data transmission has begun" to droplog.
  623. copy droplog to 0.
  624.  
  625. until time:seconds - transtime > transmissiontimeout {
  626. if not discharged and ship:resources[0]:amount < lowbattlvltrans {
  627. // if a capacitor is discharging, check that it is done
  628. if capactive > -1 {
  629. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  630. } else {
  631. set capnum to 0.
  632. until capnum = caplist:length {
  633. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  634. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  635. set capactive to capnum.
  636. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  637. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  638. copy droplog to 0.
  639. break.
  640. }.
  641. set capnum to capnum + 1.
  642. }.
  643. if capnum = caplist:length {
  644. set discharged to true.
  645. Print "[" + time:clock + "] All capacitors drained".
  646. log "[" + time:clock + "] All capacitors drained" to droplog.
  647. copy droplog to 0.
  648. }.
  649. }.
  650. }.
  651. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  652. Print "[" + time:clock + "] Connection lost".
  653. log "[" + time:clock + "] Connection lost" to droplog.
  654. copy droplog to 0.
  655. shutdown.
  656. }.
  657. if transtime < time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  658. lock transtime to time:seconds.
  659. }.
  660. if transtime = time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "idle" {
  661. set transtime to time:seconds.
  662. }.
  663. wait 0.001.
  664. }.
  665. lock transtime to time:seconds.
  666. Print "[" + time:clock + "] Data transmission has ended".
  667. log "[" + time:clock + "] Data transmission has ended" to droplog.
  668. copy droplog to 0.
  669.  
  670. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  671. Print "[" + time:clock + "] Connection lost".
  672. log "[" + time:clock + "] Connection lost" to droplog.
  673. copy droplog to 0.
  674. shutdown.
  675. }.
  676.  
  677. // if we'haven't landed yet, take a second run for additional data
  678. if ship:verticalspeed < 0 {
  679. Print "[" + time:clock + "] Second lower atmospheric experiment run commencing".
  680. log "[" + time:clock + "] Second lower atmospheric experiment run commencing" to droplog.
  681. copy droplog to 0.
  682. toggle AG4.
  683. for goo in goolist {
  684. if goo:getmodule("modulescienceexperiment"):allevents:length > 0 {
  685. goo:getmodule("modulescienceexperiment"):doevent("observe mystery goo").
  686. break.
  687. }.
  688. }.
  689. Print "[" + time:clock + "] Awaiting data transmission".
  690. log "[" + time:clock + "] Awaiting data transmission" to droplog.
  691. copy droplog to 0.
  692.  
  693. set timer to time:seconds.
  694. set nodata to false.
  695. until comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  696. if not discharged and ship:resources[0]:amount < lowbattlvl {
  697. // if a capacitor is discharging, check that it is done
  698. if capactive > -1 {
  699. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  700. } else {
  701. set capnum to 0.
  702. until capnum = caplist:length {
  703. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  704. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  705. set capactive to capnum.
  706. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  707. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  708. copy droplog to 0.
  709. break.
  710. }.
  711. set capnum to capnum + 1.
  712. }.
  713. if capnum = caplist:length {
  714. set discharged to true.
  715. Print "[" + time:clock + "] All capacitors drained".
  716. log "[" + time:clock + "] All capacitors drained" to droplog.
  717. copy droplog to 0.
  718. }.
  719. }.
  720. }.
  721. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  722. Print "[" + time:clock + "] Connection lost".
  723. log "[" + time:clock + "] Connection lost" to droplog.
  724. copy droplog to 0.
  725. shutdown.
  726. }.
  727. if time:seconds - timer > commtimeout {
  728. set nodata to true.
  729. break.
  730. }
  731. wait 0.001.
  732. }.
  733.  
  734. if nodata {
  735. Print "[" + time:clock + "] Aborting second lower atmospheric run due to no data to transmit".
  736. log "[" + time:clock + "] Aborting second lower atmospheric run due to no data to transmit" to droplog.
  737. copy droplog to 0.
  738. } else {
  739. Print "[" + time:clock + "] Data transmission has begun".
  740. log "[" + time:clock + "] Data transmission has begun" to droplog.
  741. copy droplog to 0.
  742.  
  743. until time:seconds - transtime > transmissiontimeout {
  744. if not discharged and ship:resources[0]:amount < lowbattlvltrans {
  745. // if a capacitor is discharging, check that it is done
  746. if capactive > -1 {
  747. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  748. } else {
  749. set capnum to 0.
  750. until capnum = caplist:length {
  751. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  752. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  753. set capactive to capnum.
  754. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  755. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  756. copy droplog to 0.
  757. break.
  758. }.
  759. set capnum to capnum + 1.
  760. }.
  761. if capnum = caplist:length {
  762. set discharged to true.
  763. Print "[" + time:clock + "] All capacitors drained".
  764. log "[" + time:clock + "] All capacitors drained" to droplog.
  765. copy droplog to 0.
  766. }.
  767. }.
  768. }.
  769. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  770. Print "[" + time:clock + "] Connection lost".
  771. log "[" + time:clock + "] Connection lost" to droplog.
  772. copy droplog to 0.
  773. shutdown.
  774. }.
  775. if transtime < time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  776. lock transtime to time:seconds.
  777. }.
  778. if transtime = time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "idle" {
  779. set transtime to time:seconds.
  780. }.
  781. wait 0.001.
  782. }.
  783. lock transtime to time:seconds.
  784. Print "[" + time:clock + "] Data transmission has ended".
  785. log "[" + time:clock + "] Data transmission has ended" to droplog.
  786. copy droplog to 0.
  787. }.
  788. }.
  789. }.
  790.  
  791. // go into a wait state if we haven't landed during the last transmission sequence
  792. if ship:verticalspeed < 0 {
  793. Print "[" + time:clock + "] Awaiting landing".
  794. until ship:verticalspeed >= 0 {
  795. if not discharged and ship:resources[0]:amount < lowbattlvl {
  796. // if a capacitor is discharging, check that it is done
  797. if capactive > -1 {
  798. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  799. } else {
  800. set capnum to 0.
  801. until capnum = caplist:length {
  802. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  803. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  804. set capactive to capnum.
  805. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  806. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  807. copy droplog to 0.
  808. break.
  809. }.
  810. set capnum to capnum + 1.
  811. }.
  812. if capnum = caplist:length {
  813. set discharged to true.
  814. Print "[" + time:clock + "] All capacitors drained".
  815. log "[" + time:clock + "] All capacitors drained" to droplog.
  816. copy droplog to 0.
  817. }.
  818. }.
  819. }.
  820. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  821. Print "[" + time:clock + "] Connection lost".
  822. log "[" + time:clock + "] Connection lost" to droplog.
  823. copy droplog to 0.
  824. shutdown.
  825. }.
  826. wait 0.001.
  827. }.
  828. }.
  829.  
  830. Print "[" + time:clock + "] Landing confirmed. First ground level experiment run commencing".
  831. log "[" + time:clock + "] Landing confirmed. First ground level experiment run commencing" to droplog.
  832. copy droplog to 0.
  833. toggle AG4.
  834. for goo in goolist {
  835. // original line below
  836. // if goo:getmodule("modulescienceexperiment"):allevents:length > 0 {
  837. // this is not the proper way to check if an event is available and when this check evaluated to true
  838. // but the event was not in that list as expected, it ended up throwing an error that killed the program
  839. // proper check below
  840. if goo:getmodule("modulescienceexperiment"):hasevent("observe mystery goo") {
  841. goo:getmodule("modulescienceexperiment"):doevent("observe mystery goo").
  842. break.
  843. }.
  844. }.
  845. Print "[" + time:clock + "] Awaiting data transmission".
  846. log "[" + time:clock + "] Awaiting data transmission" to droplog.
  847. copy droplog to 0.
  848.  
  849. set timer to time:seconds.
  850. set nodata to false.
  851. until comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  852. if not discharged and ship:resources[0]:amount < lowbattlvl {
  853. // if a capacitor is discharging, check that it is done
  854. if capactive > -1 {
  855. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  856. } else {
  857. set capnum to 0.
  858. until capnum = caplist:length {
  859. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  860. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  861. set capactive to capnum.
  862. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  863. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  864. copy droplog to 0.
  865. break.
  866. }.
  867. set capnum to capnum + 1.
  868. }.
  869. if capnum = caplist:length {
  870. set discharged to true.
  871. Print "[" + time:clock + "] All capacitors drained".
  872. log "[" + time:clock + "] All capacitors drained" to droplog.
  873. copy droplog to 0.
  874. }.
  875. }.
  876. }.
  877. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  878. Print "[" + time:clock + "] Connection lost".
  879. log "[" + time:clock + "] Connection lost" to droplog.
  880. copy droplog to 0.
  881. shutdown.
  882. }.
  883. if time:seconds - timer > commtimeout {
  884. set nodata to true.
  885. break.
  886. }
  887. wait 0.001.
  888. }.
  889.  
  890. if nodata {
  891. Print "[" + time:clock + "] Aborting ground level runs due to no data to transmit".
  892. log "[" + time:clock + "] Aborting ground level runs due to no data to transmit" to droplog.
  893. copy droplog to 0.
  894. } else {
  895. Print "[" + time:clock + "] Data transmission has begun".
  896. log "[" + time:clock + "] Data transmission has begun" to droplog.
  897. copy droplog to 0.
  898.  
  899. until time:seconds - transtime > transmissiontimeout {
  900. if not discharged and ship:resources[0]:amount < lowbattlvltrans {
  901. // if a capacitor is discharging, check that it is done
  902. if capactive > -1 {
  903. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  904. } else {
  905. set capnum to 0.
  906. until capnum = caplist:length {
  907. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  908. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  909. set capactive to capnum.
  910. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  911. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  912. copy droplog to 0.
  913. break.
  914. }.
  915. set capnum to capnum + 1.
  916. }.
  917. if capnum = caplist:length {
  918. set discharged to true.
  919. Print "[" + time:clock + "] All capacitors drained".
  920. log "[" + time:clock + "] All capacitors drained" to droplog.
  921. copy droplog to 0.
  922. }.
  923. }.
  924. }.
  925. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  926. Print "[" + time:clock + "] Connection lost".
  927. log "[" + time:clock + "] Connection lost" to droplog.
  928. copy droplog to 0.
  929. shutdown.
  930. }.
  931. if transtime < time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  932. lock transtime to time:seconds.
  933. }.
  934. if transtime = time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "idle" {
  935. set transtime to time:seconds.
  936. }.
  937. wait 0.001.
  938. }.
  939. lock transtime to time:seconds.
  940. Print "[" + time:clock + "] Data transmission has ended".
  941. log "[" + time:clock + "] Data transmission has ended" to droplog.
  942. copy droplog to 0.
  943.  
  944. if ship:resources[0]:amount > 0 {
  945. Print "[" + time:clock + "] Second ground level experiment run commencing".
  946. log "[" + time:clock + "] Second ground level experiment run commencing" to droplog.
  947. copy droplog to 0.
  948. toggle AG4.
  949. for goo in goolist {
  950. if goo:getmodule("modulescienceexperiment"):allevents:length > 0 {
  951. goo:getmodule("modulescienceexperiment"):doevent("observe mystery goo").
  952. break.
  953. }.
  954. }.
  955. Print "[" + time:clock + "] Awaiting data transmission".
  956. log "[" + time:clock + "] Awaiting data transmission" to droplog.
  957. copy droplog to 0.
  958.  
  959. set timer to time:seconds.
  960. set nodata to false.
  961. until comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  962. if not discharged and ship:resources[0]:amount < lowbattlvl {
  963. // if a capacitor is discharging, check that it is done
  964. if capactive > -1 {
  965. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  966. } else {
  967. set capnum to 0.
  968. until capnum = caplist:length {
  969. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  970. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  971. set capactive to capnum.
  972. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  973. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  974. copy droplog to 0.
  975. break.
  976. }.
  977. set capnum to capnum + 1.
  978. }.
  979. if capnum = caplist:length {
  980. set discharged to true.
  981. Print "[" + time:clock + "] All capacitors drained".
  982. log "[" + time:clock + "] All capacitors drained" to droplog.
  983. copy droplog to 0.
  984. }.
  985. }.
  986. }.
  987. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  988. Print "[" + time:clock + "] Connection lost".
  989. log "[" + time:clock + "] Connection lost" to droplog.
  990. copy droplog to 0.
  991. shutdown.
  992. }.
  993. if time:seconds - timer > commtimeout {
  994. set nodata to true.
  995. break.
  996. }
  997. wait 0.001.
  998. }.
  999.  
  1000. if nodata {
  1001. Print "[" + time:clock + "] Aborting second ground level run due to no data to transmit".
  1002. log "[" + time:clock + "] Aborting second ground level run due to no data to transmit" to droplog.
  1003. copy droplog to 0.
  1004. } else {
  1005. Print "[" + time:clock + "] Data transmission has begun".
  1006. log "[" + time:clock + "] Data transmission has begun" to droplog.
  1007. copy droplog to 0.
  1008.  
  1009. until time:seconds - transtime > transmissiontimeout {
  1010. if not discharged and ship:resources[0]:amount < lowbattlvltrans {
  1011. // if a capacitor is discharging, check that it is done
  1012. if capactive > -1 {
  1013. if caplist[capactive]:getmodule("dischargecapacitor"):getfield("status") = "discharged!" { set capactive to -1. }.
  1014. } else {
  1015. set capnum to 0.
  1016. until capnum = caplist:length {
  1017. if caplist[capnum]:getmodule("dischargecapacitor"):getfield("status") = "ready" {
  1018. caplist[capnum]:getmodule("dischargecapacitor"):doevent("discharge capacitor").
  1019. set capactive to capnum.
  1020. Print "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag.
  1021. log "[" + time:clock + "] Power levels low, discharging capacitor " + caplist[capnum]:tag to droplog.
  1022. copy droplog to 0.
  1023. break.
  1024. }.
  1025. set capnum to capnum + 1.
  1026. }.
  1027. if capnum = caplist:length {
  1028. set discharged to true.
  1029. Print "[" + time:clock + "] All capacitors drained".
  1030. log "[" + time:clock + "] All capacitors drained" to droplog.
  1031. copy droplog to 0.
  1032. }.
  1033. }.
  1034. }.
  1035. if probe:getmodule("modulespu"):getfield("spu") <> "operational." {
  1036. Print "[" + time:clock + "] Connection lost".
  1037. log "[" + time:clock + "] Connection lost" to droplog.
  1038. copy droplog to 0.
  1039. shutdown.
  1040. }.
  1041. if transtime < time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "uploading data..." {
  1042. lock transtime to time:seconds.
  1043. }.
  1044. if transtime = time:seconds and comms:getmodule("modulertdatatransmitter"):getfield("comms") = "idle" {
  1045. set transtime to time:seconds.
  1046. }.
  1047. wait 0.001.
  1048. }.
  1049. lock transtime to time:seconds.
  1050. Print "[" + time:clock + "] Data transmission has ended".
  1051. log "[" + time:clock + "] Data transmission has ended" to droplog.
  1052. copy droplog to 0.
  1053. }.
  1054. }.
  1055. }.
  1056. Print "[" + time:clock + "] All events have executed".
  1057. log "[" + time:clock + "] All events have executed" to droplog.
  1058. copy droplog to 0.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement