Skip to content

Commit

Permalink
Fix null pointer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeikJT committed Jan 31, 2020
1 parent 541b9df commit 437b994
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cheats.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ ig.module("cheats-gui").requires("game.feature.gui.screen.title-screen", "game.f
setProperties(LANG_EXTENSION, this.labels);
},
});
//*/
// END: Lang Extension
function isNewGamePlus() {
// This is the ONLY method in the game that checks for new game plus and returns a boolean...
Expand Down Expand Up @@ -678,7 +677,7 @@ ig.module("cheats-gui").requires("game.feature.gui.screen.title-screen", "game.f
init() {
this.parent();
// Get the first button in the second column so we can position our button above it.
const firstButtonHook = this.buttonGroup.elements[1][0].hook;
const firstButtonHook = this.buttonGroup.elements[1].find((value) => value).hook;
this.cheatsButton = new sc.ButtonGui(ig.lang.get("sc.cheats.title"), firstButtonHook.size.x);
this.cheatsButton.setAlign(firstButtonHook.align.x, firstButtonHook.align.y);
this.cheatsButton.setPos(firstButtonHook.pos.x, firstButtonHook.pos.y + 28);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Cheats",
"postload": "cheats.js",
"version": "1.3.3",
"version": "1.3.4",
"homepage": "https://github.com/ZeikJT/CrossCodeCheats",
"description": "This mod adds cheats to CrossCode.",
"ccmodDependencies": {
Expand Down

0 comments on commit 437b994

Please sign in to comment.