Skip to content

Commit c1f5fad

Browse files
committed
this does NOTHING
1 parent 3990fd9 commit c1f5fad

File tree

4 files changed

+13
-41
lines changed

4 files changed

+13
-41
lines changed

cheatGUI/dist/bundle.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cheatGUI/package-lock.json

Lines changed: 4 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cheatGUI/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
"babel": "^6.23.0",
3030
"babel-loader": "^8.2.2",
3131
"css-loader": "^6.7.1",
32-
"flatted": "^3.2.7",
33-
"lzbase62": "^2.0.0",
3432
"postcss": "^8.2.10",
3533
"postcss-loader": "^7.0.0",
3634
"sass": "^1.32.8",

cheatGUI/src/hacks/pets.ts

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ import { Hack, category } from "../index"; // Import the Cheat GUI bases.
77
import { _, VERY_LARGE_NUMBER, player } from "../utils/util"; // Import Prodigy typings and VERY_LARGE_NUMBER
88
import { getPet } from "../utils/hackify"; // Import getPet
99
import { GetAction, SelectSlot } from "../utils/kennel";
10-
import flatted from "flatted";
11-
import encoder from "lzbase62";
12-
import divide from "../utils/divide";
1310
// END IMPORTS
1411

1512

@@ -222,35 +219,26 @@ new Hack(category.pets, "Edit Kennel", "Allows you to directly edit your pets.")
222219
// End Edit Kennel
223220

224221

225-
// Begin Backup Kennel
226-
new Hack(category.pets, "Backup Kennel", "Makes a backup of your kennel to your chrome local storage.").setClick(async () => {
227-
const stringobject : string = encoder.compress(flatted.stringify(_.player.kennel._petTeam));
228-
console.log(stringobject.length);
229-
230-
let i : number = 0;
231-
for (let x of divide(stringobject, 10)) {
232-
localStorage.setItem("prodigy-kennel-backup" + i, x);
233-
localStorage.clear(); // TODO REMOVE THIS!!!!!!!!
234-
console.log(x.length)
235-
i++;
236-
}
222+
let TEMP_BACKUP : any | null = null;
237223

224+
// Begin Backup Kennel
225+
new Hack(category.pets, "Backup Kennel [No save on reload]", "Makes a backup of your kennel to a variable that doesn't save on reload.").setClick(async () => {
226+
TEMP_BACKUP = _.player.kennel._petTeam;
238227
return Toast.fire("Backed up!", "Your kennel is now backed up to the local storage.", "success");
239228
});
240229
// End Backup Kennel
241230

242231

243232
// Begin Restore Kennel
244-
new Hack(category.pets, "Restore Kennel", "Restores a backup of your kennel from the local storage... if you have one.").setClick(async () => {
245-
const backup : string | null = localStorage.getItem("prodigy-kennel-backup");
246-
if (backup === null) {
233+
new Hack(category.pets, "Restore Kennel", "Restores a backup of your kennel from a variable... if you have one.").setClick(async () => {
234+
if (TEMP_BACKUP === null) {
247235
return Swal.fire({
248236
title: "No backup found",
249-
html: "There is no backup of your kennel in the local storage. Make sure to back up your kennel before trying to load it.",
237+
html: "There is no backup of your kennel currently. Make sure to back up your kennel before trying to load it.",
250238
icon: "error"
251239
});
252240
} else {
253-
_.player.kennel._petTeam = flatted.toJSON(encoder.decompress(backup));
241+
_.player.kennel._petTeam = TEMP_BACKUP;
254242
return Toast.fire("Restored!", "Your kennel backup should be restored", "success");
255243
}
256244
});

0 commit comments

Comments
 (0)