Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.13 KB | None | 0 0
  1. //LITHIUM PRINTERS 2 WIP CONFIG
  2. //by 2REK(steam: przemo0434) September 2017
  3.  
  4. //Note that editing default mechanics may result in weird things happening with the printers.
  5. //Please use responsibly.
  6.  
  7. //Tip: don't create "clusterfuck" situations
  8. //ex. raise storage upgrade size without raising maximum storage of printers.
  9.  
  10. lp2 = {}
  11. lp2.general = {
  12. //F4 MENU SETTINGS
  13. //what is to be used in f4 menu instead of shop entity
  14. --
  15. --put true if you want printers to be listed in f4 menu
  16. f4printers = true,
  17. --
  18. --put true if you want printers upgrades to be listed in f4 menu
  19. f4printersUpgrades = true,
  20. --
  21. --put true if you want racks to be listed in f4 menu
  22. f4rack = true,
  23. --
  24. --put true if you want racks upgrades to be listed in f4 menu
  25. f4rackUpgrades = true,
  26. --
  27. --put true if you want printers to be listed in shopping stand menu
  28. shopPrinters = true,
  29. --
  30. --put true if you want printers upgrades to be listed in shopping stand menu
  31. shopPrintersUpgrades = true,
  32. --
  33. --put true if you want racks to be listed in shopping stand menu
  34. shopRack = true,
  35. --put true if you want racks upgrades and rocks upgrades to be listed in shopping stand menu
  36. shopRackUpgrades = true,
  37. }
  38.  
  39. lp2.lithiumPrinters = {
  40. //
  41. // economic printer
  42. [1] = {
  43. printerPrice = 1000, //THIS VALUE SETS PRICE OF THE PRINTER IN THE SHOP
  44. baseProductionTime = 10, //THIS VALUE SETS TIME BETWEEN MONEY BEING PRINTED
  45. baseProductionValue = 50, //THIS VALUE SETS HOW MUCH MONEY IS PRINTED
  46. baseMaximumStorage = 500, //THIS VALUE SETS HOW MUCH MONEY CAN BE STORED
  47. baseMaximumPoints = 0, //THIS VALUE SETS HOW MUCH POINTS CAN PRINTER STORE
  48. baseMaximumUpgrades = 0, //THIS VALUE SETS HOW MUCH UPGRADES CAN PRINTER HAVE
  49. baseMaximumTemperature = 100, //THIS VALUE SETS HOW HIGH TEMPERATURE CAN PRINTER WITHSTAND (tmperature is gained by 1 degree at a time)
  50. },
  51. //
  52. // bronze printer
  53. [2] = {
  54. printerPrice = 2000,
  55. baseProductionTime = 20,
  56. baseProductionValue = 100,
  57. baseMaximumStorage = 2500,
  58. baseMaximumPoints = 10,
  59. baseMaximumUpgrades = 1,
  60. baseMaximumTemperature = 100,
  61. },
  62. //
  63. // iron printer
  64. [3] = {
  65. printerPrice = 5000,
  66. baseProductionTime = 30,
  67. baseProductionValue = 200,
  68. baseMaximumStorage = 3000,
  69. baseMaximumPoints = 25,
  70. baseMaximumUpgrades = 2,
  71. baseMaximumTemperature = 100,
  72. },
  73. //
  74. // silver printer
  75. [4] = {
  76. printerPrice = 7500,
  77. baseProductionTime = 35,
  78. baseProductionValue = 250,
  79. baseMaximumStorage = 5000,
  80. baseMaximumPoints = 35,
  81. baseMaximumUpgrades = 3,
  82. baseMaximumTemperature = 100,
  83. },
  84. //
  85. // obsidian printer
  86. [5] = {
  87. printerPrice = 9000,
  88. baseProductionTime = 40,
  89. baseProductionValue = 350,
  90. baseMaximumStorage = 7000,
  91. baseMaximumPoints = 50,
  92. baseMaximumUpgrades = 4,
  93. baseMaximumTemperature = 100,
  94. },
  95. //
  96. // donator printer
  97. [6] = {
  98. printerPrice = 5000,
  99. baseProductionTime = 40,
  100. baseProductionValue = 500,
  101. baseMaximumStorage = 10000,
  102. baseMaximumPoints = 100,
  103. baseMaximumUpgrades = 5,
  104. baseMaximumTemperature = 100,
  105. },
  106. }
  107.  
  108. lp2.lithiumUpgradesData = {
  109. armor1 = 10, //HOW MUCH HEALTH IS ADDED WITH EACH ARMOR
  110. armor1price = 100,
  111. armor2 = 25,
  112. armor2price = 100,
  113. armor3 = 50,
  114. armor3price = 100,
  115.  
  116. cooler1 = 0.95, //HOW MUCH HEAT GAIN IS TAKEN AWAY
  117. cooler1price = 100,
  118. cooler2 = 0.9,
  119. cooler2price = 100,
  120. cooler3 = 0.85,
  121. cooler3price = 100,
  122.  
  123. oc1 = 0.95, //HOW PRINT TIME IS REDUCED (0.95 - 5% etc.)
  124. oc1price = 100,
  125. oc2 = 0.9,
  126. oc2price = 100,
  127. oc3 = 0.85,
  128. oc3price = 100,
  129.  
  130. power1 = 0.05, //HOW MUCH PRINT VALUE IS ADDED (0.05 - 5% etc.)
  131. power1price = 100,
  132. power2 = 0.1,
  133. power2price = 100,
  134. power3 = 0.15,
  135. power3price = 100,
  136.  
  137. storage1 = 1000, //HOW MUCH STORAGE SPACE IS ADDED
  138. storage1price = 100,
  139. storage2 = 5000,
  140. storage2price = 100,
  141. storage3 = 10000,
  142. storage3price = 100,
  143.  
  144. rackStandardPrice = 100, //STANDARD AND SERVER RACK PRICE
  145. rackServerPrice = 100,
  146. rackStorage = 10000,
  147. rackLargeProdTime = 5, // CHANGE PRODUCTION TIME OF RACK HERE
  148. rackStoragePrice = 100,
  149. rackArmorStandardPrice = 100,
  150. rackArmorServerPrice = 100,
  151. rackServerCooler = 100,
  152.  
  153. }
  154.  
  155. lp2.lithiumUpgrades = {
  156. //ARMOR
  157. [1] = {
  158. [1] = {
  159. healthAdded = 10,
  160. upgradeName = "Small Armor",
  161. entityName = "lp2_armor_1",
  162. onRemove = function(printerEntity)
  163. local ent = printerEntity
  164. ent.data.health = ent.data.health - lp2.lithiumUpgrades[1][1].healthAdded
  165. ent:SendToServer()
  166. end
  167. },
  168. [2] = {
  169. healthAdded = 25,
  170. upgradeName = "Medium Armor",
  171. entityName = "lp2_armor_2",
  172. onRemove = function(printerEntity)
  173. local ent = printerEntity
  174. ent.data.health = ent.data.health - lp2.lithiumUpgrades[1][2].healthAdded
  175. ent:SendToServer()
  176. end
  177. },
  178. [3] = {
  179. healthAdded = 50,
  180. upgradeName = "Large Armor",
  181. entityName = "lp2_armor_3",
  182. onRemove = function(printerEntity)
  183. local ent = printerEntity
  184. ent.data.health = ent.data.health - lp2.lithiumUpgrades[1][3].healthAdded
  185. ent:SendToServer()
  186. end
  187. },
  188. },
  189. //COOLER
  190. [2] = {
  191. [1] = {
  192. coolingEffect = 0.95,
  193. upgradeName = "Small Cooler",
  194. entityName = "lp2_cooler_1",
  195. onRemove = function(printerEntity)
  196. local ent = printerEntity
  197. ent.data.heatGainFactor = ent.data.heatGainFactor + (1 - lp2.lithiumUpgrades[2][1].coolingEffect)
  198. ent.data.heatCoolFactor = ent.data.heatCoolFactor - (1 - lp2.lithiumUpgrades[2][1].coolingEffect)
  199. ent:SendToServer()
  200. end
  201. },
  202. [2] = {
  203. coolingEffect = 0.9,
  204. upgradeName = "Medium Cooler",
  205. entityName = "lp2_cooler_2",
  206. onRemove = function(printerEntity)
  207. local ent = printerEntity
  208. ent.data.heatGainFactor = ent.data.heatGainFactor + (1 - lp2.lithiumUpgrades[2][2].coolingEffect)
  209. ent.data.heatCoolFactor = ent.data.heatCoolFactor - (1 - lp2.lithiumUpgrades[2][2].coolingEffect)
  210. ent:SendToServer()
  211. end
  212. },
  213. [3] = {
  214. coolingEffect = 0.85,
  215. upgradeName = "Large Cooler",
  216. entityName = "lp2_cooler_3",
  217. onRemove = function(printerEntity)
  218. local ent = printerEntity
  219. ent.data.heatGainFactor = ent.data.heatGainFactor + (1 - lp2.lithiumUpgrades[2][3].coolingEffect)
  220. ent.data.heatCoolFactor = ent.data.heatCoolFactor - (1 - lp2.lithiumUpgrades[2][3].coolingEffect)
  221. ent:SendToServer()
  222. end
  223. },
  224. },
  225. //OVERCLOCKER
  226. [3] = {
  227. [1] = {
  228. overclockerEffect = 0.95,
  229. upgradeName = "Small Overclocker",
  230. entityName = "lp2_overclocker_1",
  231. onRemove = function(printerEntity)
  232. local ent = printerEntity
  233. //ent.data.heatCool = ent.data.heatCool - lp2.lithiumUpgrades[2][1].coolingAdded
  234. ent.data.prodTimeFactor = math.Round(ent.data.prodTimeFactor * 1.05, 1)
  235. ent:SendToServer()
  236. end
  237. },
  238. [2] = {
  239. overclockerEffect = 0.9,
  240. upgradeName = "Medium Overclocker",
  241. entityName = "lp2_overclocker_2",
  242. onRemove = function(printerEntity)
  243. local ent = printerEntity
  244. //ent.data.heatCool = ent.data.heatCool - lp2.lithiumUpgrades[2][2].coolingAdded
  245. ent.data.prodTimeFactor = math.Round(ent.data.prodTimeFactor * 1.1, 1)
  246. ent:SendToServer()
  247. end
  248. },
  249. [3] = {
  250. overclockerEffect = 0.85,
  251. upgradeName = "Large Overclocker",
  252. entityName = "lp2_overclocker_3",
  253. onRemove = function(printerEntity)
  254. local ent = printerEntity
  255. //ent.data.heatCool = ent.data.heatCool - lp2.lithiumUpgrades[2][3].coolingAdded
  256. ent.data.prodTimeFactor = math.Round(ent.data.prodTimeFactor * 1.15, 1)
  257. ent:SendToServer()
  258. end
  259. },
  260. },
  261. //POWER
  262. [4] = {
  263. [1] = {
  264. powerEffect = 0.05,
  265. upgradeName = "Small Power Supply",
  266. entityName = "lp2_overclocker_1",
  267. onRemove = function(printerEntity)
  268. local ent = printerEntity
  269. ent.data.prodValueFactor = ent.data.prodValueFactor -lp2.lithiumUpgrades[4][1].powerEffect
  270. ent.data.prodValue = ent.data.prodValue * (ent.data.prodValueFactor * (1-lp2.lithiumUpgrades[4][1].powerEffect))
  271. ent.data.prodValue = math.Round(ent.data.prodValue)
  272. ent:SendToServer()
  273. end
  274. },
  275. [2] = {
  276. powerEffect = 0.1,
  277. upgradeName = "Medium Power Supply",
  278. entityName = "lp2_overclocker_2",
  279. onRemove = function(printerEntity)
  280. local ent = printerEntity
  281. ent.data.prodValueFactor = ent.data.prodValueFactor -lp2.lithiumUpgrades[4][2].powerEffect
  282. ent.data.prodValue = ent.data.prodValue * (ent.data.prodValueFactor * (1-lp2.lithiumUpgrades[4][2].powerEffect))
  283. ent.data.prodValue = math.Round(ent.data.prodValue)
  284. ent:SendToServer()
  285. end
  286. },
  287. [3] = {
  288. powerEffect = 0.15,
  289. upgradeName = "Large Power Supply",
  290. entityName = "lp2_overclocker_3",
  291. onRemove = function(printerEntity)
  292. local ent = printerEntity
  293. ent.data.prodValueFactor = ent.data.prodValueFactor -lp2.lithiumUpgrades[4][3].powerEffect
  294. ent.data.prodValue = ent.data.prodValue * (ent.data.prodValueFactor * (1-lp2.lithiumUpgrades[4][3].powerEffect))
  295. ent.data.prodValue = math.Round(ent.data.prodValue)
  296. ent:SendToServer()
  297. end
  298. },
  299. },
  300. //STORAGE
  301. [5] = {
  302. [1] = {
  303. storageEffect = 1000,
  304. upgradeName = "Small Storage",
  305. entityName = "lp2_storage_1",
  306. onRemove = function(printerEntity)
  307. local ent = printerEntity
  308. ent.data.storageMax = ent.data.storageMax - lp2.lithiumUpgrades[5][1].storageEffect
  309. ent.data.storageMax = math.Round(ent.data.storageMax)
  310. ent:SendToServer()
  311. end
  312. },
  313. [2] = {
  314. storageEffect = 5000,
  315. upgradeName = "Medium Storage",
  316. entityName = "lp2_storage_2",
  317. onRemove = function(printerEntity)
  318. local ent = printerEntity
  319. ent.data.storageMax = ent.data.storageMax - lp2.lithiumUpgrades[5][2].storageEffect
  320. ent.data.storageMax = math.Round(ent.data.storageMax)
  321. ent:SendToServer()
  322. end
  323. },
  324. [3] = {
  325. storageEffect = 10000,
  326. upgradeName = "Large Storage",
  327. entityName = "lp2_storage_3",
  328. onRemove = function(printerEntity)
  329. local ent = printerEntity
  330. ent.data.storageMax = ent.data.storageMax - lp2.lithiumUpgrades[5][3].storageEffect
  331. ent.data.storageMax = math.Round(ent.data.storageMax)
  332. ent:SendToServer()
  333. end
  334. },
  335. },
  336. }
  337.  
  338. //
  339. //F4 DONATOR CONFIG
  340. //
  341. timer.Simple(0.1, function()
  342. DarkRP.createCategory{
  343. name = "Lithium Printers 2 - Printers",
  344. categorises = "entities",
  345. startExpanded = false,
  346. color = Color(105, 105, 155, 255),
  347. canSee = function(ply) return true end,
  348. sortOrder = 1,
  349. }
  350.  
  351. DarkRP.createCategory{
  352. name = "Lithium Printers 2 - Upgrades",
  353. categorises = "entities",
  354. startExpanded = false,
  355. color = Color(105, 105, 155, 255),
  356. canSee = function(ply) return true end,
  357. sortOrder = 1,
  358. }
  359.  
  360. DarkRP.createCategory{
  361. name = "Lithium Printers 2 - Racks",
  362. categorises = "entities",
  363. startExpanded = false,
  364. color = Color(105, 105, 155, 255),
  365. canSee = function(ply) return true end,
  366. sortOrder = 1,
  367. }
  368.  
  369. if lp2.general.f4printers == true then
  370. DarkRP.createEntity( "Economic Printer", {
  371. ent = "lp2_printer_1",
  372. model = "models/2rek/lithium_printers_2/lp2_printer1.mdl",
  373. price = lp2.lithiumPrinters[1].printerPrice,
  374. max = 2,
  375. cmd = "lp2_buyEconomicPrinter",
  376. category = "Lithium Printers 2 - Printers",
  377. sortOrder = 1,
  378. } )
  379.  
  380. DarkRP.createEntity( "Bronze Printer", {
  381. ent = "lp2_printer_2",
  382. model = "models/2rek/lithium_printers_2/lp2_printer2.mdl",
  383. price = lp2.lithiumPrinters[2].printerPrice,
  384. max = 2,
  385. cmd = "lp2_buyBronzePrinter",
  386. category = "Lithium Printers 2 - Printers",
  387. sortOrder = 2,
  388. } )
  389.  
  390. DarkRP.createEntity( "Iron Printer", {
  391. ent = "lp2_printer_3",
  392. model = "models/2rek/lithium_printers_2/lp2_printer3.mdl",
  393. price = lp2.lithiumPrinters[3].printerPrice,
  394. max = 2,
  395. cmd = "lp2_buyIronPrinter",
  396. category = "Lithium Printers 2 - Printers",
  397. sortOrder = 3,
  398. } )
  399.  
  400. DarkRP.createEntity( "Silver Printer", {
  401. ent = "lp2_printer_4",
  402. model = "models/2rek/lithium_printers_2/lp2_printer4.mdl",
  403. price = lp2.lithiumPrinters[4].printerPrice,
  404. max = 2,
  405. cmd = "lp2_buySilverPrinter",
  406. category = "Lithium Printers 2 - Printers",
  407. sortOrder = 4,
  408. } )
  409.  
  410. DarkRP.createEntity( "Obsidian Printer", {
  411. ent = "lp2_printer_5",
  412. model = "models/2rek/lithium_printers_2/lp2_printer5.mdl",
  413. price = lp2.lithiumPrinters[5].printerPrice,
  414. max = 2,
  415. cmd = "lp2_buyObsidianPrinter",
  416. category = "Lithium Printers 2 - Printers",
  417. sortOrder = 5,
  418. } )
  419.  
  420. DarkRP.createEntity( "Donator Printer", {
  421. ent = "lp2_printer_6",
  422. model = "models/2rek/lithium_printers_2/lp2_printer6.mdl",
  423. price = lp2.lithiumPrinters[6].printerPrice,
  424. max = 2,
  425. cmd = "lp2_buyDonatorPrinter",
  426. category = "Lithium Printers 2 - Printers",
  427. sortOrder = 6,
  428. } )
  429. end
  430.  
  431. if lp2.general.f4printersUpgrades == true then
  432. DarkRP.createEntity( "Printer Armor 1", {
  433. ent = "lp2_armor_1",
  434. model = "models/2rek/lithium_printers_2/lp2_armor1.mdl",
  435. price = lp2.lithiumUpgradesData.armor1price,
  436. max = 2,
  437. cmd = "lp2_buyPrinterArmor1",
  438. category = "Lithium Printers 2 - Upgrades",
  439. sortOrder = 1,
  440. } )
  441. DarkRP.createEntity( "Printer Armor 2", {
  442. ent = "lp2_armor_2",
  443. model = "models/2rek/lithium_printers_2/lp2_armor2.mdl",
  444. price = lp2.lithiumUpgradesData.armor2price,
  445. max = 2,
  446. cmd = "lp2_buyPrinterArmor2",
  447. category = "Lithium Printers 2 - Upgrades",
  448. sortOrder = 2,
  449. } )
  450. DarkRP.createEntity( "Printer Armor 3", {
  451. ent = "lp2_armor_3",
  452. model = "models/2rek/lithium_printers_2/lp2_armor3.mdl",
  453. price = lp2.lithiumUpgradesData.armor3price,
  454. max = 2,
  455. cmd = "lp2_buyPrinterArmor3",
  456. category = "Lithium Printers 2 - Upgrades",
  457. sortOrder = 3,
  458. } )
  459.  
  460. DarkRP.createEntity( "Printer Cooler 1", {
  461. ent = "lp2_cooler_1",
  462. model = "models/2rek/lithium_printers_2/lp2_cooler1.mdl",
  463. price = lp2.lithiumUpgradesData.cooler1price,
  464. max = 2,
  465. cmd = "lp2_buyPrinterCooler1",
  466. category = "Lithium Printers 2 - Upgrades",
  467. sortOrder = 4,
  468. } )
  469. DarkRP.createEntity( "Printer Cooler 2", {
  470. ent = "lp2_cooler_2",
  471. model = "models/2rek/lithium_printers_2/lp2_cooler2.mdl",
  472. price = lp2.lithiumUpgradesData.cooler2price,
  473. max = 2,
  474. cmd = "lp2_buyPrinterCooler2",
  475. category = "Lithium Printers 2 - Upgrades",
  476. sortOrder = 5,
  477. } )
  478. DarkRP.createEntity( "Printer Cooler 3", {
  479. ent = "lp2_cooler_3",
  480. model = "models/2rek/lithium_printers_2/lp2_cooler3.mdl",
  481. price = lp2.lithiumUpgradesData.cooler3price,
  482. max = 2,
  483. cmd = "lp2_buyPrinterCooler3",
  484. category = "Lithium Printers 2 - Upgrades",
  485. sortOrder = 6,
  486. } )
  487.  
  488. DarkRP.createEntity( "Printer Overclocker 1", {
  489. ent = "lp2_overclocker_1",
  490. model = "models/2rek/lithium_printers_2/lp2_oc1.mdl",
  491. price = lp2.lithiumUpgradesData.oc1price,
  492. max = 2,
  493. cmd = "lp2_buyPrinterOc1",
  494. category = "Lithium Printers 2 - Upgrades",
  495. sortOrder = 7,
  496. } )
  497. DarkRP.createEntity( "Printer Overclocker 2", {
  498. ent = "lp2_overclocker_2",
  499. model = "models/2rek/lithium_printers_2/lp2_oc2.mdl",
  500. price = lp2.lithiumUpgradesData.oc2price,
  501. max = 2,
  502. cmd = "lp2_buyPrinterOc2",
  503. category = "Lithium Printers 2 - Upgrades",
  504. sortOrder = 8,
  505. } )
  506. DarkRP.createEntity( "Printer Overclocker 3", {
  507. ent = "lp2_overclocker_3",
  508. model = "models/2rek/lithium_printers_2/lp2_oc3.mdl",
  509. price = lp2.lithiumUpgradesData.oc3price,
  510. max = 2,
  511. cmd = "lp2_buyPrinterOc3",
  512. category = "Lithium Printers 2 - Upgrades",
  513. sortOrder = 9,
  514. } )
  515.  
  516. DarkRP.createEntity( "Printer Power 1", {
  517. ent = "lp2_power_1",
  518. model = "models/2rek/lithium_printers_2/lp2_power1.mdl",
  519. price = lp2.lithiumUpgradesData.power1price,
  520. max = 2,
  521. cmd = "lp2_buyPrinterPower1",
  522. category = "Lithium Printers 2 - Upgrades",
  523. sortOrder = 10,
  524. } )
  525. DarkRP.createEntity( "Printer Power 2", {
  526. ent = "lp2_power_2",
  527. model = "models/2rek/lithium_printers_2/lp2_power2.mdl",
  528. price = lp2.lithiumUpgradesData.power2price,
  529. max = 2,
  530. cmd = "lp2_buyPrinterPower2",
  531. category = "Lithium Printers 2 - Upgrades",
  532. sortOrder = 11,
  533. } )
  534. DarkRP.createEntity( "Printer Power 3", {
  535. ent = "lp2_power_3",
  536. model = "models/2rek/lithium_printers_2/lp2_power3.mdl",
  537. price = lp2.lithiumUpgradesData.power3price,
  538. max = 2,
  539. cmd = "lp2_buyPrinterPower3",
  540. category = "Lithium Printers 2 - Upgrades",
  541. sortOrder = 12,
  542. } )
  543.  
  544. DarkRP.createEntity( "Printer Storage 1", {
  545. ent = "lp2_storage_1",
  546. model = "models/2rek/lithium_printers_2/lp2_storage1.mdl",
  547. price = lp2.lithiumUpgradesData.storage1price,
  548. max = 2,
  549. cmd = "lp2_buyPrinterStorage1",
  550. category = "Lithium Printers 2 - Upgrades",
  551. sortOrder = 13,
  552. } )
  553. DarkRP.createEntity( "Printer Storage 2", {
  554. ent = "lp2_storage_2",
  555. model = "models/2rek/lithium_printers_2/lp2_storage2.mdl",
  556. price = lp2.lithiumUpgradesData.storage2price,
  557. max = 2,
  558. cmd = "lp2_buyPrinterStorage2",
  559. category = "Lithium Printers 2 - Upgrades",
  560. sortOrder = 14,
  561. } )
  562. DarkRP.createEntity( "Printer Storage 3", {
  563. ent = "lp2_storage_3",
  564. model = "models/2rek/lithium_printers_2/lp2_storage3.mdl",
  565. price = lp2.lithiumUpgradesData.storage3price,
  566. max = 2,
  567. cmd = "lp2_buyPrinterStorage3",
  568. category = "Lithium Printers 2 - Upgrades",
  569. sortOrder = 15,
  570. } )
  571. end
  572.  
  573. if lp2.general.f4rack == true then
  574. DarkRP.createEntity( "Printer Rack", {
  575. ent = "lp2_rack_small",
  576. model = "models/2rek/lithium_printers_2/lp2_rack_small.mdl",
  577. price = lp2.lithiumUpgradesData.rackStandardPrice,
  578. max = 2,
  579. cmd = "lp2_buyPrinterRack",
  580. category = "Lithium Printers 2 - Racks",
  581. sortOrder = 1,
  582. } )
  583. DarkRP.createEntity( "Server Rack", {
  584. ent = "lp2_rack_large",
  585. model = "models/2rek/lithium_printers_2/lp2_rack_large.mdl",
  586. price = lp2.lithiumUpgradesData.rackServerPrice,
  587. max = 2,
  588. cmd = "lp2_buyServerRack",
  589. category = "Lithium Printers 2 - Racks",
  590. sortOrder = 2,
  591. } )
  592. end
  593.  
  594. if lp2.general.f4rackUpgrades == true then
  595. DarkRP.createEntity( "Printer Rack - Armor", {
  596. ent = "lp2_rack_armor_small",
  597. model = "models/2rek/lithium_printers_2/lp2_armor_small.mdl",
  598. price = lp2.lithiumUpgradesData.rackArmorStandardPrice,
  599. max = 2,
  600. cmd = "lp2_buyPrinterRackArmor",
  601. category = "Lithium Printers 2 - Racks",
  602. sortOrder = 3,
  603. } )
  604. DarkRP.createEntity( "Server Rack - Armor", {
  605. ent = "lp2_rack_armor_large",
  606. model = "models/2rek/lithium_printers_2/lp2_armor_large.mdl",
  607. price = lp2.lithiumUpgradesData.rackArmorServerPrice,
  608. max = 2,
  609. cmd = "lp2_buyServerRackArmor",
  610. category = "Lithium Printers 2 - Racks",
  611. sortOrder = 4,
  612. } )
  613. DarkRP.createEntity( "Server Rack - Storage", {
  614. ent = "lp2_rack_storage",
  615. model = "models/2rek/lithium_printers_2/lp2_rackstorage.mdl",
  616. price = lp2.lithiumUpgradesData.rackStoragePrice,
  617. max = 2,
  618. cmd = "lp2_buyServerRackStorage",
  619. category = "Lithium Printers 2 - Racks",
  620. sortOrder = 5,
  621. } )
  622. DarkRP.createEntity( "Server Rack - Cooling", {
  623. ent = "lp2_rack_fan",
  624. model = "models/2rek/lithium_printers_2/lp2_serverfan.mdl",
  625. price = lp2.lithiumUpgradesData.rackServerCooler,
  626. max = 2,
  627. cmd = "lp2_buyServerRackFan",
  628. category = "Lithium Printers 2 - Racks",
  629. sortOrder = 6,
  630. } )
  631. end
  632. end)
  633. //
  634. //DO NOT CHANGE
  635. //
  636. lp2.lithiumSkillsDesc = {}
  637. lp2.lithiumSkillsDesc = {
  638. [1] = {
  639. skillName = "Production specialist I",
  640. skillCost = 10,
  641. skillDesc = "Increase production by 5%",
  642. skillFunction = function(printerEntity)
  643. local ent = printerEntity
  644. ent.data.prodValueFactor = ent.data.prodValueFactor * 1.05
  645. ent.data.prodValue = math.Round(ent.data.prodValue * ent.data.prodValueFactor)
  646. ent:SendToServer()
  647. end
  648. },
  649. [2] = {
  650. skillName = "Production specialist II",
  651. skillCost = 25,
  652. skillDesc = "Increase production by 10%",
  653. skillFunction = function(printerEntity)
  654. local ent = printerEntity
  655. ent.data.prodValueFactor = ent.data.prodValueFactor * 1.1
  656. ent.data.prodValue = math.Round(ent.data.prodValue * ent.data.prodValueFactor)
  657. ent:SendToServer()
  658. end
  659. },
  660. [3] = {
  661. skillName = "Production specialist III",
  662. skillCost = 50,
  663. skillDesc = "Increase production by 15%",
  664. skillFunction = function(printerEntity)
  665. local ent = printerEntity
  666. ent.data.prodValueFactor = ent.data.prodValueFactor * 1.15
  667. ent.data.prodValue = math.Round(ent.data.prodValue * ent.data.prodValueFactor)
  668. ent:SendToServer()
  669. end
  670. },
  671. [4] = {
  672. skillName = "Storage specialist I",
  673. skillCost = 10,
  674. skillDesc = "Increase storage space by 5%",
  675. skillFunction = function(printerEntity)
  676. local ent = printerEntity
  677. ent.data.storageMaxFactor = ent.data.storageMaxFactor * 1.05
  678. ent.data.storageMax = math.Round(ent.data.storageMax * ent.data.storageMaxFactor)
  679. ent:SendToServer()
  680. end
  681. },
  682. [5] = {
  683. skillName = "Storage specialist II",
  684. skillCost = 25,
  685. skillDesc = "Increase storage space by 10%",
  686. skillFunction = function(printerEntity)
  687. local ent = printerEntity
  688. ent.data.storageMaxFactor = ent.data.storageMaxFactor * 1.05
  689. ent.data.storageMax = math.Round(ent.data.storageMax * ent.data.storageMaxFactor)
  690. ent:SendToServer()
  691. end
  692. },
  693. [6] = {
  694. skillName = "Storage specialist III",
  695. skillCost = 50,
  696. skillDesc = "Increase storage space by 15%",
  697. skillFunction = function(printerEntity)
  698. local ent = printerEntity
  699. ent.data.storageMaxFactor = ent.data.storageMaxFactor * 1.05
  700. ent.data.storageMax = math.Round(ent.data.storageMax * ent.data.storageMaxFactor)
  701. ent:SendToServer()
  702. end
  703. },
  704. [7] = {
  705. skillName = "Support specialist I",
  706. skillCost = 10,
  707. skillDesc = "Increase upgrade space by 1",
  708. skillFunction = function(printerEntity)
  709. local ent = printerEntity
  710. ent.data.upgradesMax = ent.data.upgradesMax + 1
  711. ent:SendToServer()
  712. end
  713. },
  714. [8] = {
  715. skillName = "Support specialist II",
  716. skillCost = 25,
  717. skillDesc = "Increase upgrade space by 2",
  718. skillFunction = function(printerEntity)
  719. local ent = printerEntity
  720. ent.data.upgradesMax = ent.data.upgradesMax + 2
  721. ent:SendToServer()
  722. end
  723. },
  724. [9] = {
  725. skillName = "Support specialist III",
  726. skillCost = 50,
  727. skillDesc = "Increase upgrade space by 3",
  728. skillFunction = function(printerEntity)
  729. local ent = printerEntity
  730. ent.data.upgradesMax = ent.data.upgradesMax + 3
  731. ent:SendToServer()
  732. end
  733. },
  734. [10] = {
  735. skillName = "Effective cooling",
  736. skillCost = 25,
  737. skillDesc = "Increase maximum temperature by 25",
  738. skillIcon = "icons/skill_other_cooling.png",
  739. skillIconTaken = "icons/skill_other_cooling_active.png",
  740. skillShortName = "Cooling",
  741. skillFunction = function(printerEntity)
  742. local ent = printerEntity
  743. ent.data.tempMax = ent.data.tempMax + 25
  744. ent:SendToServer()
  745. end
  746. },
  747. [99] = {
  748. skillName = "Co-op printing",
  749. skillCost = 25,
  750. skillDesc = "+1% production for each printer in rack.\n\nMaximum +5%.\n\nWorks only for regular rack.",
  751. skillIcon = "icons/skill_other_coop.png",
  752. skillShortName = "Co-op",
  753. skillFunction = function()
  754. //todo skill function
  755. //for later
  756. end
  757. },
  758. [11] = {
  759. skillName = "Passive overclocking",
  760. skillCost = 25,
  761. skillDesc = "Increase print speed by 10%",
  762. skillIcon = "icons/skill_other_overclock.png",
  763. skillIconTaken = "icons/skill_other_overclock_active.png",
  764. skillShortName = "Passive OC",
  765. skillFunction = function(printerEntity)
  766. local ent = printerEntity
  767. ent.data.prodTimeFactor = 0.9
  768. ent.data.prodTime = math.Round(ent.data.prodTime * ent.data.prodTimeFactor)
  769. ent:SendToServer()
  770. end
  771. },
  772. [12] = {
  773. skillName = "Storage specialist",
  774. skillCost = 25,
  775. skillDesc = "Printer storage gains 10% more space.",
  776. skillIcon = "icons/skill_other_storage.png",
  777. skillIconTaken = "icons/skill_other_storage_active.png",
  778. skillShortName = "Storage +",
  779. skillFunction = function(printerEntity)
  780. local ent = printerEntity
  781. ent.data.storageMaxFactor = ent.data.storageMaxFactor + 0.1
  782. ent.data.storageMax = math.Round(ent.data.storageMax * ent.data.storageMaxFactor)
  783. ent:SendToServer()
  784. end
  785. },
  786. [13] = {
  787. skillName = "Composite armor",
  788. skillCost = 25,
  789. skillDesc = "Increase printer health by 100.",
  790. skillIcon = "icons/skill_other_armor.png",
  791. skillIconTaken = "icons/skill_other_armor_active.png",
  792. skillShortName = "Armor +",
  793. skillFunction = function(printerEntity)
  794. local ent = printerEntity
  795. ent.data.health = ent.data.health + 100
  796. ent:SendToServer()
  797. end
  798. },
  799. }
  800.  
  801.  
  802. if CLIENT then
  803. surface.CreateFont( "PrintersUpgradeFont", {
  804. font = "DermaDefault",
  805. size = 32*6,
  806. weight = 600,
  807. antialias = true,
  808. shadow = true,
  809. } )
  810.  
  811. surface.CreateFont( "PrintersSmallFont1", {
  812. font = "DermaDefault",
  813. size = 24*6,
  814. weight = 600,
  815. antialias = true,
  816. shadow = true,
  817. } )
  818.  
  819. surface.CreateFont( "PrintersPrimaryFont", {
  820. font = "DermaDefault",
  821. size = 50,
  822. weight = 1,
  823. antialias = true,
  824. shadow = false,
  825. } )
  826.  
  827. surface.CreateFont( "Printersab074f89a37133aed31e9c3acf6ba718b5069b0bd88701a3866ddb42875b9330Font", {
  828. font = "DermaDefault",
  829. size = 54,
  830. weight = 1,
  831. antialias = true,
  832. shadow = true,
  833. } )
  834.  
  835. surface.CreateFont( "PrintersSmallFont", {
  836. font = "DermaDefault",
  837. size = 50,
  838. weight = 600,
  839. antialias = true,
  840. shadow = false,
  841. } )
  842.  
  843. surface.CreateFont( "PrintersNickFont", {
  844. font = "DermaDefault",
  845. size = 64,
  846. weight = 600,
  847. antialias = true,
  848. shadow = true,
  849. } )
  850. surface.CreateFont( "PrintersVerySmallFont", {
  851. font = "DermaDefault",
  852. size = 38,
  853. weight = 600,
  854. antialias = true,
  855. shadow = true,
  856. } )
  857. surface.CreateFont( "PrintersDermaFont", {
  858. font = "DermaDefault",
  859. size = 16,
  860. weight = 600,
  861. antialias = true,
  862. shadow = true,
  863. } )
  864. surface.CreateFont( "PrintersDermaLargeFont", {
  865. font = "DermaDefault",
  866. size = 32,
  867. weight = 600,
  868. antialias = true,
  869. shadow = true,
  870. } )
  871.  
  872. surface.CreateFont( "ph_UpgradeFont", {
  873. font = "DermaDefault",
  874. size = 32*6,
  875. weight = 600,
  876. antialias = true,
  877. shadow = true,
  878. } )
  879.  
  880. surface.CreateFont( "ph_SmallFont1", {
  881. font = "DermaDefault",
  882. size = 144,
  883. weight = 600,
  884. antialias = true,
  885. shadow = true,
  886. } )
  887.  
  888. surface.CreateFont( "ph_PrimaryFont", {
  889. font = "Elliot Sans Bold",
  890. size = 54,
  891. weight = 1,
  892. antialias = true,
  893. shadow = true,
  894. } )
  895.  
  896. surface.CreateFont( "ph_0b57eec0cd97e40a015813f810ca15cbc53614c16ee74d3f49b176c61212a0dd", {
  897. font = "DermaDefault",
  898. size = 54,
  899. weight = 1,
  900. antialias = true,
  901. shadow = true,
  902. } )
  903.  
  904. surface.CreateFont( "ph_SmallFont", {
  905. font = "DermaDefault",
  906. size = 75,
  907. weight = 600,
  908. antialias = true,
  909. shadow = true,
  910. } )
  911.  
  912. surface.CreateFont( "ph_NickFont", {
  913. font = "DermaDefault",
  914. size = 64,
  915. weight = 600,
  916. antialias = true,
  917. shadow = true,
  918. } )
  919.  
  920. surface.CreateFont( "ph_NormalFont", {
  921. font = "DermaDefault",
  922. size = 48,
  923. weight = 600,
  924. antialias = true,
  925. shadow = true,
  926. } )
  927. surface.CreateFont( "ph_VerySmallFont", {
  928. font = "DermaDefault",
  929. size = 38,
  930. weight = 600,
  931. antialias = true,
  932. shadow = true,
  933. } )
  934. surface.CreateFont( "ph_ShopFont", {
  935. font = "DermaDefault",
  936. size = 16,
  937. weight = 600,
  938. antialias = true,
  939. shadow = true,
  940. } )
  941.  
  942. end
  943. /*
  944. timer.Simple(1, function()
  945. sound.Add( {
  946. name = "lithium_printer_print",
  947. channel = CHAN_STATIC,
  948. volume = 0.2,
  949. level = lithiumUpgrades.defaultVolume,
  950. pitch = { 95, 110 },
  951. sound = "ambient/levels/labs/equipment_printer_loop1.wav"
  952. } )
  953. sound.Add( {
  954. name = "lithium_printer_print_level1",
  955. channel = CHAN_STATIC,
  956. volume = 0.2,
  957. level = lithiumUpgrades.defaultVolume-(lithiumUpgrades.defaultVolume*(lithiumUpgrades.smallSilencer/100)),
  958. pitch = { 95, 110 },
  959. sound = "ambient/levels/labs/equipment_printer_loop1.wav"
  960. } )
  961. sound.Add( {
  962. name = "lithium_printer_print_level2",
  963. channel = CHAN_STATIC,
  964. volume = 0.2,
  965. level = lithiumUpgrades.defaultVolume-(lithiumUpgrades.defaultVolume*(lithiumUpgrades.mediumSilencer/100)),
  966. pitch = { 95, 110 },
  967. sound = "ambient/levels/labs/equipment_printer_loop1.wav"
  968. } )
  969. sound.Add( {
  970. name = "lithium_printer_print_level3",
  971. channel = CHAN_STATIC,
  972. volume = 0.2,
  973. level = lithiumUpgrades.defaultVolume-(lithiumUpgrades.defaultVolume*(lithiumUpgrades.largeSilencer/100)),
  974. pitch = { 95, 110 },
  975. sound = "ambient/levels/labs/equipment_printer_loop1.wav"
  976. } )
  977. sound.Add( {
  978. name = "lithium_printer_beep",
  979. channel = CHAN_STATIC,
  980. volume = 0.2,
  981. level = lithiumUpgrades.defaultVolume,
  982. pitch = { 95, 110 },
  983. sound = "buttons/blip1.wav"
  984. } )
  985. end)
  986. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement