@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 +1 -2
- package/init.ts +10 -20
- package/install.ts +0 -4
- package/localization/localizationData.ts +0 -3
- package/localizationCompiler.ts +0 -1
- package/localizationInterfaces.ts +92 -87
- package/package.json +1 -1
package/fsWatcher.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const 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
|
-
|
|
25
|
-
} else {
|
|
26
|
-
|
|
27
|
-
|
|
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.
|
package/localizationCompiler.ts
CHANGED
|
@@ -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 "
|
|
1
|
+
import { Language } from "~resource/languages"
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
interface ModifierLocalization
|
|
34
|
+
{
|
|
35
|
+
modifier_classname: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
language_overrides?: Array<ModifierLocalizationContent>;
|
|
39
|
+
}
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
41
|
+
interface ModifierLocalizationContent
|
|
42
|
+
{
|
|
43
|
+
language: Language;
|
|
44
|
+
name_override?: string
|
|
45
|
+
description_override?: string;
|
|
46
|
+
}
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
interface StandardLocalization
|
|
49
|
+
{
|
|
50
|
+
classname: string;
|
|
51
|
+
name: string;
|
|
52
|
+
language_overrides?: StandardLocalizationNameOverride[]
|
|
53
|
+
}
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
interface StandardLocalizationNameOverride
|
|
56
|
+
{
|
|
57
|
+
language: Language;
|
|
58
|
+
name_override: string
|
|
59
|
+
}
|
|
63
60
|
|
|
64
|
-
export interface
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
|
79
|
-
// {
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
//
|
|
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
|
|
87
|
-
// {
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
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
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
//
|
|
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