@cabin-icarus/tooltip_generator 1.7.8 → 1.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fsWatcher.ts CHANGED
@@ -1,6 +1,5 @@
1
- const fs = require('fs');
1
+ const fs = ('fs');
2
2
  import { LocalizationCompiler } from './localizationCompiler';
3
- import { LocalizationData } from './localizationInterfaces';
4
3
  const watch = require("node-watch");
5
4
 
6
5
  let completeData: {[path: string]: LocalizationData} = {};
package/init.ts CHANGED
@@ -16,16 +16,16 @@ function copyFiles() {
16
16
  fs.copyFileSync(filePath, resultPath);
17
17
  console.log(`Not found, tsconfig.json copied to ${resultPath} folder`);
18
18
  }
19
- filePath = __dirname + "/ModifierProperties.d.ts";
20
- resultPath = resourcePath + "/ModifierProperties.d.ts";
21
- console.log(`Checking if ModifierProperties.d.ts exists in ${filePath}`)
22
- if (fs.existsSync(resultPath))
23
- {
24
- console.log("ModifierProperties.d.ts found!");
25
- } else {
26
- fs.copyFileSync(filePath, resultPath);
27
- console.log(`Not found, ModifierProperties.d.ts copied to ${resultPath} folder`);
28
- }
19
+ // filePath = __dirname + "/ModifierProperties.d.ts";
20
+ // resultPath = resourcePath + "/ModifierProperties.d.ts";
21
+ // console.log(`Checking if ModifierProperties.d.ts exists in ${filePath}`)
22
+ // if (fs.existsSync(resultPath))
23
+ // {
24
+ // console.log("ModifierProperties.d.ts found!");
25
+ // } else {
26
+ // fs.copyFileSync(filePath, resultPath);
27
+ // console.log(`Not found, ModifierProperties.d.ts copied to ${resultPath} folder`);
28
+ // }
29
29
  filePath = __dirname + "/languages.ts";
30
30
  resultPath = resourcePath + "/languages.ts";
31
31
  console.log(`Checking if languages.ts exsts in ${filePath}`)
@@ -36,16 +36,6 @@ function copyFiles() {
36
36
  fs.copyFileSync(filePath, resultPath);
37
37
  console.log(`Not found, languages.ts copied to ${resultPath} folder`);
38
38
  }
39
- filePath = __dirname + "/languages.ts";
40
- resultPath = resourcePath + "/languages.ts";
41
- console.log(`Checking if languages.js exsts in ${filePath}`)
42
- if (fs.existsSync(resultPath))
43
- {
44
- console.log("languages.js found!");
45
- } else {
46
- fs.copyFileSync(filePath, resultPath);
47
- console.log(`Not found, languages.js copied to ${resultPath} folder`);
48
- }
49
39
  }
50
40
 
51
41
  let dirPath = __dirname + "/localization";
package/install.ts CHANGED
@@ -24,8 +24,6 @@ function CheckPackage() {
24
24
  const rootPath = "../../../";
25
25
  const scriptPath = "./";
26
26
 
27
- console.log("F: ",fs.realpathSync(rootPath + "package.json"))
28
-
29
27
  // adjust existing package.json
30
28
  if (fs.existsSync(rootPath + "package.json")) {
31
29
  console.log("Checking existing package.json...")
@@ -137,6 +135,4 @@ function CheckPackage() {
137
135
  })
138
136
  }
139
137
 
140
- console.log("F: ",fs.realpathSync("../../../package.json"))
141
-
142
138
  CheckPackage();
@@ -1,6 +1,3 @@
1
- import { AbilityLocalization, LocalizationData, ModifierLocalization, StandardLocalization } from "../localizationInterfaces";
2
- import { Language } from "../languages";
3
-
4
1
  export function GenerateLocalizationData(): LocalizationData
5
2
  {
6
3
  // This section can be safely ignored, as it is only logic.
@@ -1,7 +1,6 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
  import { KVObject, serialize } from 'valve-kv'
4
- import { LocalizationData, AbilityLocalization, ModifierLocalization, StandardLocalization } from "./localizationInterfaces";
5
4
  import { Language } from "~resource/languages"
6
5
 
7
6
  export class LocalizationCompiler
@@ -1,100 +1,105 @@
1
- import { Language } from "./languages";
1
+ import { Language } from "~resource/languages"
2
2
 
3
- export interface AbilityLocalization
3
+ declare global
4
4
  {
5
- ability_classname: string;
6
- name?: string;
7
- description?: string;
8
- scepter_description?: string;
9
- shard_description?: string;
10
- lore?: string;
11
- notes?: Array<string>;
12
- //reimagined_effects?: Array<ReimaginedEffect>;
13
- ability_specials?: Array<AbilitySpecialLocalization>;
14
- language_overrides?: Array<AbilityLocalizationContent>;
15
- }
16
5
 
17
- export interface AbilityLocalizationContent
18
- {
19
- language: Language;
20
- name_override?: string;
21
- description_override?: string;
22
- scepter_description_override?: string;
23
- shard_description_override?: string;
24
- lore_override?: string;
25
- notes_override?: Array<string>;
26
- //reimagined_effects_override?: Array<ReimaginedEffect>;
27
- ability_specials_override?: Array<AbilitySpecialLocalization>;
28
- }
6
+ interface AbilityLocalization
7
+ {
8
+ ability_classname: string;
9
+ name?: string;
10
+ description?: string;
11
+ scepter_description?: string;
12
+ shard_description?: string;
13
+ lore?: string;
14
+ notes?: Array<string>;
15
+ //reimagined_effects?: Array<ReimaginedEffect>;
16
+ ability_specials?: Array<AbilitySpecialLocalization>;
17
+ language_overrides?: Array<AbilityLocalizationContent>;
18
+ }
29
19
 
30
- export interface ModifierLocalization
31
- {
32
- modifier_classname: string;
33
- name?: string;
34
- description?: string;
35
- language_overrides?: Array<ModifierLocalizationContent>;
36
- }
20
+ interface AbilityLocalizationContent
21
+ {
22
+ language: Language;
23
+ name_override?: string;
24
+ description_override?: string;
25
+ scepter_description_override?: string;
26
+ shard_description_override?: string;
27
+ lore_override?: string;
28
+ notes_override?: Array<string>;
29
+ //reimagined_effects_override?: Array<ReimaginedEffect>;
30
+ ability_specials_override?: Array<AbilitySpecialLocalization>;
31
+ }
37
32
 
38
- export interface ModifierLocalizationContent
39
- {
40
- language: Language;
41
- name_override?: string
42
- description_override?: string;
43
- }
33
+ interface ModifierLocalization
34
+ {
35
+ modifier_classname: string;
36
+ name?: string;
37
+ description?: string;
38
+ language_overrides?: Array<ModifierLocalizationContent>;
39
+ }
44
40
 
45
- export interface StandardLocalization
46
- {
47
- classname: string;
48
- name: string;
49
- language_overrides?: StandardLocalizationNameOverride[]
50
- }
41
+ interface ModifierLocalizationContent
42
+ {
43
+ language: Language;
44
+ name_override?: string
45
+ description_override?: string;
46
+ }
51
47
 
52
- export interface StandardLocalizationNameOverride
53
- {
54
- language: Language;
55
- name_override: string
56
- }
48
+ interface StandardLocalization
49
+ {
50
+ classname: string;
51
+ name: string;
52
+ language_overrides?: StandardLocalizationNameOverride[]
53
+ }
57
54
 
58
- // export interface ReimaginedEffect
59
- // {
60
- // title: string;
61
- // description: string;
62
- // }
55
+ interface StandardLocalizationNameOverride
56
+ {
57
+ language: Language;
58
+ name_override: string
59
+ }
63
60
 
64
- export interface AbilitySpecialLocalization
65
- {
66
- ability_special: string;
67
- text: string;
68
- percentage?: boolean; // false by default if omitted
69
- item_stat?: boolean // false by default if omitted
70
- }
61
+ // export interface ReimaginedEffect
62
+ // {
63
+ // title: string;
64
+ // description: string;
65
+ // }
71
66
 
72
- // export interface HeroTalents
73
- // {
74
- // talent_classname: string;
75
- // talents: Array<HeroTalentLocalization>;
76
- // }
67
+ interface AbilitySpecialLocalization
68
+ {
69
+ ability_special: string;
70
+ text: string;
71
+ percentage?: boolean; // false by default if omitted
72
+ item_stat?: boolean // false by default if omitted
73
+ }
77
74
 
78
- // export interface HeroTalentLocalization
79
- // {
80
- // name: string;
81
- // description: string;
82
- // lore: string;
83
- // language_overrides?: Array<TalentLocalizationOverrides>
84
- // }
75
+ // export interface HeroTalents
76
+ // {
77
+ // talent_classname: string;
78
+ // talents: Array<HeroTalentLocalization>;
79
+ // }
85
80
 
86
- // export interface TalentLocalizationOverrides
87
- // {
88
- // language: Language;
89
- // name_override?: string;
90
- // description_override?: string;
91
- // lore_override?: string;
92
- // }
81
+ // export interface HeroTalentLocalization
82
+ // {
83
+ // name: string;
84
+ // description: string;
85
+ // lore: string;
86
+ // language_overrides?: Array<TalentLocalizationOverrides>
87
+ // }
93
88
 
94
- export interface LocalizationData
95
- {
96
- AbilityArray?: Array<AbilityLocalization>;
97
- ModifierArray?: Array<ModifierLocalization>;
98
- StandardArray?: Array<StandardLocalization>;
99
- //TalentArray?: Array<HeroTalents>;
100
- }
89
+ // export interface TalentLocalizationOverrides
90
+ // {
91
+ // language: Language;
92
+ // name_override?: string;
93
+ // description_override?: string;
94
+ // lore_override?: string;
95
+ // }
96
+
97
+ interface LocalizationData
98
+ {
99
+ AbilityArray?: Array<AbilityLocalization>;
100
+ ModifierArray?: Array<ModifierLocalization>;
101
+ StandardArray?: Array<StandardLocalization>;
102
+ //TalentArray?: Array<HeroTalents>;
103
+ }
104
+
105
+ } export {}
package/package.json CHANGED
@@ -45,5 +45,5 @@
45
45
  "dev:runlocalizationWatcher": "ts-node node_modules/~generator/fsWatcher.ts",
46
46
  "init": "link-module-alias && ts-node node_modules/~generator/init.ts"
47
47
  },
48
- "version": "1.7.8"
48
+ "version": "1.7.10"
49
49
  }