Skip to content

Commit d790a99

Browse files
committed
Upgrade ts, tstl and dota-lua-types
1 parent 1daa1a8 commit d790a99

File tree

4 files changed

+52
-54
lines changed

4 files changed

+52
-54
lines changed

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"dev:vscripts": "tstl --project src/vscripts/tsconfig.json --watch"
1313
},
1414
"devDependencies": {
15-
"@moddota/dota-lua-types": "^4.19.0",
15+
"@moddota/dota-lua-types": "^4.21.0",
1616
"@moddota/find-steam-app": "^1.1.0",
1717
"@moddota/panorama-types": "^1.20.0",
1818
"fs-extra": "^9.0.0",
1919
"npm-run-all": "^4.1.5",
20-
"typescript": "^4.7.4",
21-
"typescript-to-lua": "^1.7.1"
20+
"typescript": "^4.8.3",
21+
"typescript-to-lua": "^1.10.1"
2222
}
2323
}

src/vscripts/addon_game_mode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Object.assign(getfenv(), {
77
Precache: GameMode.Precache,
88
});
99

10-
if (GameRules.Addon) {
10+
if (GameRules.Addon !== undefined) {
1111
// This code is only run after script_reload, not at startup
1212
GameRules.Addon.Reload();
1313
}

src/vscripts/lib/dota_ts_adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const registerModifier = (name?: string) => (modifier: new () => CDOTA_Mo
7272
const originalOnCreated = (env[name] as CDOTA_Modifier_Lua).OnCreated;
7373
env[name].OnCreated = function (parameters: any) {
7474
this.____constructor();
75-
if (originalOnCreated) {
75+
if (originalOnCreated !== undefined) {
7676
originalOnCreated.call(this, parameters);
7777
}
7878
};

0 commit comments

Comments
 (0)