@cabin-icarus/tooltip_generator 1.7.9 → 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/{languages.d.ts → languages.ts} +1 -1
- package/localizationCompiler.ts +0 -1
- package/localizationInterfaces.ts +93 -86
- 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
|
@@ -26,26 +26,16 @@ function copyFiles() {
|
|
|
26
26
|
// fs.copyFileSync(filePath, resultPath);
|
|
27
27
|
// console.log(`Not found, ModifierProperties.d.ts copied to ${resultPath} folder`);
|
|
28
28
|
// }
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
// }
|
|
29
|
+
filePath = __dirname + "/languages.ts";
|
|
30
|
+
resultPath = resourcePath + "/languages.ts";
|
|
31
|
+
console.log(`Checking if languages.ts exsts in ${filePath}`)
|
|
32
|
+
if (fs.existsSync(resultPath))
|
|
33
|
+
{
|
|
34
|
+
console.log("languages.ts found!");
|
|
35
|
+
} else {
|
|
36
|
+
fs.copyFileSync(filePath, resultPath);
|
|
37
|
+
console.log(`Not found, languages.ts copied to ${resultPath} folder`);
|
|
38
|
+
}
|
|
49
39
|
}
|
|
50
40
|
|
|
51
41
|
let dirPath = __dirname + "/localization";
|
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,98 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
{
|
|
3
|
-
ability_classname: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
scepter_description?: string;
|
|
7
|
-
shard_description?: string;
|
|
8
|
-
lore?: string;
|
|
9
|
-
notes?: Array<string>;
|
|
10
|
-
//reimagined_effects?: Array<ReimaginedEffect>;
|
|
11
|
-
ability_specials?: Array<AbilitySpecialLocalization>;
|
|
12
|
-
language_overrides?: Array<AbilityLocalizationContent>;
|
|
13
|
-
}
|
|
1
|
+
import { Language } from "~resource/languages"
|
|
14
2
|
|
|
15
|
-
declare
|
|
3
|
+
declare global
|
|
16
4
|
{
|
|
17
|
-
language: Language;
|
|
18
|
-
name_override?: string;
|
|
19
|
-
description_override?: string;
|
|
20
|
-
scepter_description_override?: string;
|
|
21
|
-
shard_description_override?: string;
|
|
22
|
-
lore_override?: string;
|
|
23
|
-
notes_override?: Array<string>;
|
|
24
|
-
//reimagined_effects_override?: Array<ReimaginedEffect>;
|
|
25
|
-
ability_specials_override?: Array<AbilitySpecialLocalization>;
|
|
26
|
-
}
|
|
27
5
|
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
}
|
|
35
19
|
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
+
}
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
interface ModifierLocalization
|
|
34
|
+
{
|
|
35
|
+
modifier_classname: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
language_overrides?: Array<ModifierLocalizationContent>;
|
|
39
|
+
}
|
|
49
40
|
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
interface ModifierLocalizationContent
|
|
42
|
+
{
|
|
43
|
+
language: Language;
|
|
44
|
+
name_override?: string
|
|
45
|
+
description_override?: string;
|
|
46
|
+
}
|
|
55
47
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
interface StandardLocalization
|
|
49
|
+
{
|
|
50
|
+
classname: string;
|
|
51
|
+
name: string;
|
|
52
|
+
language_overrides?: StandardLocalizationNameOverride[]
|
|
53
|
+
}
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
item_stat?: boolean // false by default if omitted
|
|
68
|
-
}
|
|
55
|
+
interface StandardLocalizationNameOverride
|
|
56
|
+
{
|
|
57
|
+
language: Language;
|
|
58
|
+
name_override: string
|
|
59
|
+
}
|
|
69
60
|
|
|
70
|
-
// export interface
|
|
71
|
-
// {
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
// }
|
|
61
|
+
// export interface ReimaginedEffect
|
|
62
|
+
// {
|
|
63
|
+
// title: string;
|
|
64
|
+
// description: string;
|
|
65
|
+
// }
|
|
75
66
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
//
|
|
81
|
-
|
|
82
|
-
|
|
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
|
+
}
|
|
83
74
|
|
|
84
|
-
// export interface
|
|
85
|
-
// {
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
// lore_override?: string;
|
|
90
|
-
// }
|
|
75
|
+
// export interface HeroTalents
|
|
76
|
+
// {
|
|
77
|
+
// talent_classname: string;
|
|
78
|
+
// talents: Array<HeroTalentLocalization>;
|
|
79
|
+
// }
|
|
91
80
|
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
//
|
|
98
|
-
}
|
|
81
|
+
// export interface HeroTalentLocalization
|
|
82
|
+
// {
|
|
83
|
+
// name: string;
|
|
84
|
+
// description: string;
|
|
85
|
+
// lore: string;
|
|
86
|
+
// language_overrides?: Array<TalentLocalizationOverrides>
|
|
87
|
+
// }
|
|
88
|
+
|
|
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