Advertisement
Gudu0

UMT machine code JS

May 3rd, 2025 (edited)
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.70 KB | Source Code | 0 0
  1. // machineData.js
  2.  
  3. // This object stores metadata for each machine by image filename
  4. const machineData = {
  5.  
  6. "Black_Square32.jpg": {
  7. name: "Black Square",
  8. width: 1,
  9. height: 1,
  10. shape: [[1]], // basic square
  11. cost: 0,
  12. },
  13.  
  14. "Conveyor.png": {
  15. name: "Conveyor",
  16. width: 1,
  17. height: 1,
  18. shape: [[1]], // basic square
  19. cost: 10,
  20. inputs: [
  21. { direction: "behind", offset: [0, 0] }
  22. ],
  23. outputs: [
  24. { direction: "forward", offset: [0, 0] }
  25. ]
  26. },
  27. //3d
  28. "Down_Conveyor_wip.png": {
  29. name: "Down Conveyor",
  30. width: 1,
  31. height: 1,
  32. shape: [[1]], // basic square
  33. cost: 50,
  34. },
  35.  
  36. "Filter_Left.png": {
  37. name: "Filter Left",
  38. width: 1,
  39. height: 1,
  40. shape: [[1]], // basic square
  41. cost: 250,
  42. inputs: [
  43. { direction: "behind", offset: [0, 0] }
  44. ],
  45. outputs: [
  46. { direction: "forward", offset: [0, 0] },
  47. { direction: "left", offset: [0, 0] }
  48. ]
  49. },
  50. "Filter_Right.png": {
  51. name: "Filter Right",
  52. width: 1,
  53. height: 1,
  54. shape: [[1]], // basic square
  55. cost: 250,
  56. inputs: [
  57. { direction: "behind", offset: [0, 0] }
  58. ],
  59. outputs: [
  60. { direction: "forward", offset: [0, 0] },
  61. { direction: "right", offset: [0, 0] }
  62. ]
  63. },
  64. "Ore_Smelter.png": {
  65. name: "Ore Smelter",
  66. width: 3,
  67. height: 1,
  68. shape: [
  69. [1, 1, 1],
  70. ],
  71. cost: 380,
  72. inputs: [
  73. { direction: "behind", offset: [1, 0] }
  74. ],
  75. outputs: [
  76. { direction: "forward", offset: [1, 0] },
  77. { direction: "left", offset: [0, 0] }
  78. ]
  79. },
  80. "Overflow_Left.png": {
  81. name: "Overflow Left",
  82. width: 1,
  83. height: 1,
  84. shape: [[1]], // basic square
  85. cost: 50,
  86. inputs: [
  87. { direction: "behind", offset: [0, 0] }
  88. ],
  89. outputs: [
  90. { direction: "forward", offset: [0, 0] },
  91. { direction: "left", offset: [0, 0] }
  92. ]
  93. },
  94. "Overflow_Right.png": {
  95. name: "Overflow Right",
  96. width: 1,
  97. height: 1,
  98. shape: [[1]], // basic square
  99. cost: 50,
  100. inputs: [
  101. { direction: "behind", offset: [0, 0] }
  102. ],
  103. outputs: [
  104. { direction: "forward", offset: [0, 0] },
  105. { direction: "right", offset: [0, 0] }
  106. ]
  107. },
  108. "Red_Square32.jpg": {
  109. name: "Red Square",
  110. width: 1,
  111. height: 1,
  112. shape: [[1]], // basic square
  113. cost: 0,
  114. },
  115.  
  116. "Splitter_Left.png": {
  117. name: "Splitter Left",
  118. width: 1,
  119. height: 1,
  120. shape: [[1]], // basic square
  121. cost: 50,
  122. inputs: [
  123. { direction: "behind", offset: [0, 0] }
  124. ],
  125. outputs: [
  126. { direction: "forward", offset: [0, 0] },
  127. { direction: "left", offset: [0, 0] }
  128. ]
  129. },
  130. "Splitter_Right.png": {
  131. name: "Splitter Right",
  132. width: 1,
  133. height: 1,
  134. shape: [[1]], // basic square
  135. cost: 50,
  136. inputs: [
  137. { direction: "behind", offset: [0, 0] }
  138. ],
  139. outputs: [
  140. { direction: "forward", offset: [0, 0] },
  141. { direction: "right", offset: [0, 0] }
  142. ]
  143. },
  144. "Splitter_Three_Way.png": {
  145. name: "Splitter Three Way",
  146. width: 1,
  147. height: 1,
  148. shape: [[1]], // basic square
  149. cost: 50,
  150. inputs: [
  151. { direction: "behind", offset: [0, 0] }
  152. ],
  153. outputs: [
  154. { direction: "forward", offset: [0, 0] },
  155. { direction: "left", offset: [0, 0] },
  156. { direction: "right", offset: [0, 0] },
  157. ],
  158. },
  159. //3d
  160. "Up_Conveyor_wip.png": {
  161. name: "Up Conveyor",
  162. width: 1,
  163. height: 1,
  164. shape: [[1]], // basic square
  165. cost: 50,
  166. },
  167.  
  168. "White_Square32.jpg": {
  169. name: "White Square",
  170. width: 1,
  171. height: 1,
  172. shape: [[1]], // basic square
  173. cost: 0,
  174. },
  175.  
  176. //not technically a machine
  177. "Seller.png": {
  178. name: "Seller",
  179. width: 3,
  180. height: 3,
  181. shape: [
  182. [1, 1, 1],
  183. [1, 1, 1],
  184. [1, 1, 1],
  185. ],
  186. cost: 0,
  187.  
  188. },
  189. //not a machine
  190. "Car_Spawner.png": {
  191. name: "Car Spawner",
  192. width: 8,
  193. height: 10,
  194. shape: [
  195. [1, 1, 1, 1, 1, 1, 1, 1],
  196. [1, 1, 1, 1, 1, 1, 1, 1],
  197. [1, 1, 1, 1, 1, 1, 1, 1],
  198. [1, 1, 1, 1, 1, 1, 1, 1],
  199. [1, 1, 1, 1, 1, 1, 1, 1],
  200. [1, 1, 1, 1, 1, 1, 1, 1],
  201. [1, 1, 1, 1, 1, 1, 1, 1],
  202. [1, 1, 1, 1, 1, 1, 1, 1],
  203. [1, 1, 1, 1, 1, 1, 1, 1],
  204. [1, 1, 1, 1, 1, 1, 1, 1]
  205. ],
  206. cost: 0,
  207. },
  208. // ===== Check this one!! Its 2 wide, but only 1 has colision ===== \\
  209. "Ore_Cleaner.png": {
  210. name: "Ore Cleaner",
  211. width: 1,
  212. height: 1,
  213. shape: [[1]], // basic square
  214. cost: 80,
  215. inputs: [
  216. { direction: "behind", offset: [0, 0] }
  217. ],
  218. outputs: [
  219. { direction: "forward", offset: [0, 0] }
  220. ],
  221. },
  222. "Polisher.png": {
  223. name: "Polisher",
  224. width: 2,
  225. height: 1,
  226. shape: [[1, 1]], // basic square
  227. cost: 250,
  228. inputs: [
  229. { direction: "behind", offset: [0, 0] }
  230. ],
  231. outputs: [
  232. { direction: "forward", offset: [0, 0] }
  233. ],
  234. },
  235. "Crusher.png": {
  236. name: "Crusher",
  237. width: 1,
  238. height: 1,
  239. shape: [[1]], // basic square
  240. cost: 1750,
  241. inputs: [
  242. { direction: "behind", offset: [0, 0] }
  243. ],
  244. outputs: [
  245. { direction: "forward", offset: [0, 0] }
  246. ],
  247. },
  248. "Coiler.png": {
  249. name: "Coiler",
  250. width: 3,
  251. height: 1,
  252. shape: [[1, 1, 1]], // basic square
  253. cost: 1750,
  254. inputs: [
  255. { direction: "behind", offset: [1, 0] }
  256. ],
  257. outputs: [
  258. { direction: "forward", offset: [1, 0] }
  259. ],
  260. },
  261. "Topaz_Prospector.png": {
  262. name: "Topaz Prospector",
  263. width: 1,
  264. height: 1,
  265. shape: [[1]], // basic square
  266. cost: 2000,
  267. inputs: [
  268. { direction: "behind", offset: [0, 0] }
  269. ],
  270. outputs: [
  271. { direction: "forward", offset: [0, 0] }
  272. ],
  273. },
  274. "Brick_Mold": {
  275. name: "Brick Mold",
  276. width: 2,
  277. height: 1,
  278. shape: [[1, 1]],
  279. cost: 2500,
  280. inputs: [
  281. { direction: "behind", offset: [0, 0] }
  282. ],
  283. outputs: [
  284. { direction: "forward", offset: [0, 0] }
  285. ],
  286. },
  287. "Bolt_Machine.png": {
  288. name: "Bolt Machine",
  289. width: 1,
  290. height: 1,
  291. shape: [[1]], // basic square
  292. cost: 2800,
  293. inputs: [
  294. { direction: "behind", offset: [0, 0] }
  295. ],
  296. outputs: [
  297. { direction: "forward", offset: [0, 0] }
  298. ],
  299. },
  300. "Plate_Stamper.png": {
  301. name: "",
  302. width: 3,
  303. height: 1,
  304. shape: [[1, 1, 1]], // basic square
  305. cost: 3000,
  306. inputs: [
  307. { direction: "behind", offset: [1, 0] }
  308. ],
  309. outputs: [
  310. { direction: "forward", offset: [1, 0] }
  311. ],
  312. },
  313. //COME BACK TO THIS AFTER GETTING 3D WORKING, ITS 2 TALL
  314. //sifter
  315. "Sifter.png": {
  316. name: "Sifter",
  317. width: 1,
  318. height: 1,
  319. shape: [[1]], // basic square
  320. cost: 10,
  321. inputs: [
  322. { direction: "behind", offset: [0, 0] }
  323. ],
  324. outputs: [
  325. { direction: "forward", offset: [0, 0] }
  326. ],
  327. },
  328. "Pipe_Maker.png": {
  329. name: "Pipe Maker",
  330. width: 1,
  331. height: 1,
  332. shape: [[1]], // basic square
  333. cost: 4000,
  334. inputs: [
  335. { direction: "behind", offset: [0, 0] }
  336. ],
  337. outputs: [
  338. { direction: "forward", offset: [0, 0] }
  339. ],
  340. },
  341. "Kiln.png": {
  342. name: "Kiln",
  343. width: 3,
  344. height: 1,
  345. shape: [[1, 1, 1]], // basic square
  346. cost: 4750,
  347. inputs: [
  348. { direction: "behind", offset: [1, 0] }
  349. ],
  350. outputs: [
  351. { direction: "forward", offset: [1, 0] }
  352. ],
  353. },
  354. "Emerald_Prospector.png": {
  355. name: "Emerald Prospector",
  356. width: 1,
  357. height: 1,
  358. shape: [[1]], // basic square
  359. cost: 5000,
  360. inputs: [
  361. { direction: "behind", offset: [0, 0] }
  362. ],
  363. outputs: [
  364. { direction: "forward", offset: [0, 0] }
  365. ],
  366. },
  367. "Gem_Cutter.png": {
  368. name: "Gem Cutter",
  369. width: 1,
  370. height: 1,
  371. shape: [[1]], // basic square
  372. cost: 7500,
  373. inputs: [
  374. { direction: "behind", offset: [0, 0] }
  375. ],
  376. outputs: [
  377. { direction: "forward", offset: [0, 0] }
  378. ],
  379. },
  380. "Mechanical_Parts_Maker.png": {
  381. name: "Mechanical Parts Maker",
  382. width: 1,
  383. height: 1,
  384. shape: [[1]], // basic square
  385. cost: 8000,
  386. inputs: [
  387. { direction: "behind", offset: [0, 0] }
  388. ],
  389. outputs: [
  390. { direction: "forward", offset: [0, 0] }
  391. ],
  392. },
  393. "Sapphire_Prospector.png": {
  394. name: "Sapphire Prospector",
  395. width: 1,
  396. height: 1,
  397. shape: [[1]], // basic square
  398. cost: 8000,
  399. inputs: [
  400. { direction: "behind", offset: [0, 0] }
  401. ],
  402. outputs: [
  403. { direction: "forward", offset: [0, 0] }
  404. ],
  405. },
  406. "Electronic_Tuner.png": {
  407. name: "Electronic Tuner",
  408. width: 1,
  409. height: 1,
  410. shape: [[1]], // basic square
  411. cost: 8500,
  412. inputs: [
  413. { direction: "behind", offset: [0, 0] }
  414. ],
  415. outputs: [
  416. { direction: "forward", offset: [0, 0] }
  417. ],
  418. },
  419. "Frame_Maker.png": {
  420. name: "Frame Maker",
  421. width: 3,
  422. height: 2,
  423. shape: [[0, 1, 0],
  424. [1, 1, 1]
  425. ],
  426. cost: 10000,
  427. inputs: [
  428. { direction: "left", offset: [0, 1] },
  429. { direction: "right", offset: [2, 1] }
  430. ],
  431. outputs: [
  432. { direction: "forward", offset: [1, 0] }
  433. ],
  434. },
  435. //check this one when the game updates, its got an empty space inside it that probably doesnt belong.
  436. "Cement_Mixer.png": {
  437. name: "Cement Mixer",
  438. width: 3,
  439. height: 2,
  440. shape: [[1, 0, 1],
  441. [0, 0, 1]
  442. ], // basic square
  443. cost: 10000,
  444. inputs: [
  445. { direction: "behind", offset: [2, 1] },
  446. { direction: "right", offset: [2, 0] }
  447. ],
  448. outputs: [
  449. { direction: "left", offset: [0, 0] }
  450. ],
  451. },
  452. "Ruby_Prospector.png": {
  453. name: "Ruby Prospector",
  454. width: 1,
  455. height: 1,
  456. shape: [[1]], // basic square
  457. cost: 15000,
  458. inputs: [
  459. { direction: "behind", offset: [0, 0] }
  460. ],
  461. outputs: [
  462. { direction: "forward", offset: [0, 0] }
  463. ],
  464. },
  465. //3d
  466. "Ring_Maker.png": {
  467. name: "Ring Maker",
  468. width: 2,
  469. height: 3,
  470. shape: [[1, 1],
  471. [1, 1],
  472. [1, 1]
  473. ], // basic square
  474. cost: 15000,
  475. inputs: [
  476. { direction: "behind", offset: [1, 0] },
  477. { direction: "behind", offset: [1, 2] }
  478. ],
  479. outputs: [
  480. { direction: "forward", offset: [0, 1] }
  481. ],
  482. },
  483.  
  484. "Circuit_Maker.png": {
  485. name: "Circuit Maker",
  486. width: 3,
  487. height: 3,
  488. shape: [
  489. [1, 1, 1],
  490. [1, 1, 1],
  491. [1, 1, 1],
  492. ],
  493. inputs: [
  494. { direction: "right", offset: [2, 1] }, // middle right
  495. { direction: "right", offset: [1, 2] } // bottom right
  496. ],
  497. outputs: [
  498. { direction: "forward", offset: [1, 0] } // top middle
  499. ],
  500. cost: 20000,
  501. },
  502. // Add more
  503. };
  504.  
  505. export default machineData;
  506.  
  507. /*
  508. ".png": {
  509. name: "",
  510. width: 1,
  511. height: 1,
  512. shape: [[1]], // basic square
  513. cost: 10,
  514. inputs: [
  515. { direction: "behind", offset: [0, 0] }
  516. ],
  517. outputs: [
  518. { direction: "forward", offset: [0, 0] }
  519. ],
  520. },
  521. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement