G_lander

Upgraded Upgrades mod

Jan 4th, 2021 (edited)
964
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. Game.LoadMod("https://unpkg.com/[email protected]")
  2. if (!window.CPPKIES_ONLOAD) window.CPPKIES_ONLOAD = []
  3. CPPKIES_ONLOAD.push(async () => {
  4. const imageLink =
  5. "https://pipe.miroware.io/5fb27f0be6bde66c95ca6ca3/newerererIcons.png"
  6. // Icons to not replace
  7. const ignoreNewIcons = { 0: 1, 1: 2, 4: 9, 7: 1, 8: 6, 10: 6, 12: 1, 15: 10 }
  8. // Cursor upgrades
  9. const cursorUpgrades = [
  10. "Reinforced index finger",
  11. "Carpal tunnel prevention cream",
  12. "Ambidextrous",
  13. "Thousand fingers",
  14. "Million fingers",
  15. "Billion fingers",
  16. "Trillion fingers",
  17. "Quadrillion fingers",
  18. "Quintillion fingers",
  19. "Sextillion fingers",
  20. "Septillion fingers",
  21. "Octillion fingers",
  22. "Nonillion fingers",
  23. ].map(name => Game.Upgrades[name])
  24. for (const building of Game.ObjectsById) {
  25. // Stop here
  26. if (building.id > 15) break
  27. await Cppkies.icons.relinkColumn(
  28. imageLink,
  29. [
  30. ...Array(building.id).fill([]),
  31. Object.values(Game.Tiers)
  32. .filter(val => !val.special)
  33. .map((_val, i) => i + 1),
  34. ],
  35. building.iconColumn
  36. )
  37. const link = Cppkies.icons.aliases[imageLink]
  38. const tieredUpgrades =
  39. building.id === 0 ? cursorUpgrades : building.tieredUpgrades
  40.  
  41. tieredUpgrades.forEach(val => {
  42. if (ignoreNewIcons[building.id] !== val.tier) val.icon[2] = link
  43. })
  44. }
  45. // Hardcoded? Yes. Should be rewritten? No, not yet.
  46. Game.Upgrades["Endless book of prose"].icon = [0, 0, "https://pipe.miroware.io/5fb27f0be6bde66c95ca6ca3/fractal_engine_mooncandy.gif"]
  47. })
Advertisement
Add Comment
Please, Sign In to add comment