s2cfgtojson 4.5.0 → 5.0.0
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/Struct.mts +43 -2
- package/enums.mts +13 -140
- package/package.json +1 -1
- package/types.mts +16287 -3730
- package/utility-types.mts +1891 -0
package/Struct.mts
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
export * from "./types.mts";
|
|
2
2
|
export * from "./enums.mts";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
export type Internal =
|
|
5
|
+
| "__internal__"
|
|
6
|
+
| "fork"
|
|
7
|
+
| "removeNode"
|
|
8
|
+
| "addNode"
|
|
9
|
+
| "clone"
|
|
10
|
+
| "entries"
|
|
11
|
+
| "forEach"
|
|
12
|
+
| "filter"
|
|
13
|
+
| "map"
|
|
14
|
+
| "fromJson"
|
|
15
|
+
| "toJson"
|
|
16
|
+
| "toString"
|
|
17
|
+
| "fromString";
|
|
18
|
+
|
|
19
|
+
export interface DefaultEntries {
|
|
20
|
+
bpatch?: boolean;
|
|
21
|
+
bskipref?: boolean;
|
|
22
|
+
isArray?: boolean;
|
|
23
|
+
isRoot?: boolean;
|
|
24
|
+
rawName?: string;
|
|
25
|
+
refkey?: string | number;
|
|
26
|
+
refurl?: string;
|
|
27
|
+
useAsterisk?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type GetStructType<In> =
|
|
31
|
+
In extends Array<any>
|
|
32
|
+
? Struct & { [key: `${number}`]: GetStructType<In[typeof key]> }
|
|
33
|
+
: In extends Record<any, any>
|
|
34
|
+
? Struct & { [key in keyof In]: GetStructType<In[key]> }
|
|
35
|
+
: In extends string
|
|
36
|
+
? In
|
|
37
|
+
: In extends number
|
|
38
|
+
? number
|
|
39
|
+
: In extends boolean
|
|
40
|
+
? boolean
|
|
41
|
+
: In;
|
|
4
42
|
|
|
5
43
|
const TAB = " ";
|
|
6
44
|
const WILDCARD = "_wildcard";
|
|
@@ -540,7 +578,10 @@ const RESERVED_IDENTIFIERS = new Set([
|
|
|
540
578
|
]);
|
|
541
579
|
|
|
542
580
|
function makeSafeClassName(name: string): string {
|
|
543
|
-
if (
|
|
581
|
+
if (
|
|
582
|
+
!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name) ||
|
|
583
|
+
RESERVED_IDENTIFIERS.has(name)
|
|
584
|
+
) {
|
|
544
585
|
return `_${name}`;
|
|
545
586
|
}
|
|
546
587
|
return name;
|
package/enums.mts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// noinspection JSUnusedGlobalSymbols
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
Caliber,
|
|
5
|
+
Experienced,
|
|
6
|
+
Master,
|
|
7
|
+
Newbie,
|
|
8
|
+
Permutations3,
|
|
9
|
+
Veteran,
|
|
10
|
+
} from "./utility-types.mts";
|
|
11
|
+
|
|
12
|
+
export type PanningRule = `PanningRule::${
|
|
13
|
+
| "PanningRule_Headphones"
|
|
14
|
+
| "PanningRule_Speakers"}`;
|
|
15
|
+
|
|
3
16
|
export type EAIConstraintType = `EAIConstraintType::${"PrepareForEmission"}`;
|
|
4
17
|
|
|
5
18
|
export type EAIMovementPose = `EAIMovementPose::${"Stand"}`;
|
|
@@ -76,23 +89,6 @@ export type EAimAssistWeightType = `EAimAssistWeightType::${
|
|
|
76
89
|
| "Angle"
|
|
77
90
|
| "DistanceFromApex"}`;
|
|
78
91
|
|
|
79
|
-
export type Caliber =
|
|
80
|
-
| "A012"
|
|
81
|
-
| "A045"
|
|
82
|
-
| "A545"
|
|
83
|
-
| "A556"
|
|
84
|
-
| "A762"
|
|
85
|
-
| "A762NATO"
|
|
86
|
-
| "A762Sniper"
|
|
87
|
-
| "A918"
|
|
88
|
-
| "A919"
|
|
89
|
-
| "A939"
|
|
90
|
-
| "AGA"
|
|
91
|
-
| "AHEDP"
|
|
92
|
-
| "APG7V"
|
|
93
|
-
| "AVOG"
|
|
94
|
-
| "None";
|
|
95
|
-
|
|
96
92
|
export type EAmmoCaliber = `EAmmoCaliber::${Caliber}`;
|
|
97
93
|
|
|
98
94
|
export type EAmmoType = `EAmmoType::${
|
|
@@ -1610,25 +1606,6 @@ export type ERadiationPreset = `ERadiationPreset::${
|
|
|
1610
1606
|
| "Strong"
|
|
1611
1607
|
| "Topaz"}`;
|
|
1612
1608
|
|
|
1613
|
-
export type Rank = "Newbie" | "Experienced" | "Veteran" | "Master";
|
|
1614
|
-
type Newbie = "ERank::Newbie";
|
|
1615
|
-
type Experienced = "ERank::Experienced";
|
|
1616
|
-
type Veteran = "ERank::Veteran";
|
|
1617
|
-
type Master = "ERank::Master";
|
|
1618
|
-
type Permutations2<A, B> = A extends string
|
|
1619
|
-
? B extends string
|
|
1620
|
-
? A | B | `${A}, ${B}`
|
|
1621
|
-
: A
|
|
1622
|
-
: never;
|
|
1623
|
-
|
|
1624
|
-
type Permutations3<A, B, C> = A extends string
|
|
1625
|
-
? B extends string
|
|
1626
|
-
? C extends string
|
|
1627
|
-
? Permutations2<A, B> | Permutations2<B, C> | `${A}, ${B}, ${C}`
|
|
1628
|
-
: Permutations2<A, B>
|
|
1629
|
-
: A
|
|
1630
|
-
: never;
|
|
1631
|
-
|
|
1632
1609
|
export type ERank =
|
|
1633
1610
|
| Permutations3<Newbie, Experienced, Veteran>
|
|
1634
1611
|
| Permutations3<Experienced, Veteran, Master>
|
|
@@ -1969,10 +1946,6 @@ export type EZombificationType = `EZombificationType::${
|
|
|
1969
1946
|
| "AliveHuman"
|
|
1970
1947
|
| "CorpseHuman"}`;
|
|
1971
1948
|
|
|
1972
|
-
export type PanningRule = `PanningRule::${
|
|
1973
|
-
| "PanningRule_Headphones"
|
|
1974
|
-
| "PanningRule_Speakers"}`;
|
|
1975
|
-
|
|
1976
1949
|
export type ESoundEffectSubtype = `ESoundEffectSubtype::${
|
|
1977
1950
|
| "PlaySoundAttached"
|
|
1978
1951
|
| "SetParameter"
|
|
@@ -1995,106 +1968,6 @@ export type EActionType = `EActionType::${
|
|
|
1995
1968
|
| "Vault"
|
|
1996
1969
|
| "ThrowItem"}`;
|
|
1997
1970
|
|
|
1998
|
-
export type Reactions =
|
|
1999
|
-
| "Enemy"
|
|
2000
|
-
| "Disaffection"
|
|
2001
|
-
| "Neutral"
|
|
2002
|
-
| "Friend"
|
|
2003
|
-
| "Self";
|
|
2004
|
-
|
|
2005
|
-
export type Factions =
|
|
2006
|
-
| ""
|
|
2007
|
-
| "Humanoid"
|
|
2008
|
-
| "Player"
|
|
2009
|
-
| "Bandits"
|
|
2010
|
-
| "Monolith"
|
|
2011
|
-
| "FreeStalkers"
|
|
2012
|
-
| "Army"
|
|
2013
|
-
| "Duty"
|
|
2014
|
-
| "Freedom"
|
|
2015
|
-
| "Varta"
|
|
2016
|
-
| "Neutrals"
|
|
2017
|
-
| "Militaries"
|
|
2018
|
-
| "Noon"
|
|
2019
|
-
| "Scientists"
|
|
2020
|
-
| "Mercenaries"
|
|
2021
|
-
| "Flame"
|
|
2022
|
-
| "Law"
|
|
2023
|
-
| "Spark"
|
|
2024
|
-
| "Corpus"
|
|
2025
|
-
| "WildBandits"
|
|
2026
|
-
| "GarmataMilitaries"
|
|
2027
|
-
| "SphereMilitaries"
|
|
2028
|
-
| "NeutralBandits"
|
|
2029
|
-
| "VaranBandits"
|
|
2030
|
-
| "RooseveltBandits"
|
|
2031
|
-
| "ShahBandits"
|
|
2032
|
-
| "LokotBandits"
|
|
2033
|
-
| "DepoBandits"
|
|
2034
|
-
| "DepoVictims"
|
|
2035
|
-
| "DocentBandits"
|
|
2036
|
-
| "VaranStashBandits"
|
|
2037
|
-
| "Diggers"
|
|
2038
|
-
| "KosakBandits"
|
|
2039
|
-
| "AzimutVarta"
|
|
2040
|
-
| "UdavMercenaries"
|
|
2041
|
-
| "SafariHunters"
|
|
2042
|
-
| "AzimuthMilitaries"
|
|
2043
|
-
| "SultanBandits"
|
|
2044
|
-
| "ShevchenkoStalkers"
|
|
2045
|
-
| "VartaLesnichestvo"
|
|
2046
|
-
| "SparkLesnichestvo"
|
|
2047
|
-
| "IkarVarta"
|
|
2048
|
-
| "KabanBandits"
|
|
2049
|
-
| "CrazyGuardians"
|
|
2050
|
-
| "ArenaEnemy"
|
|
2051
|
-
| "ArenaFriend"
|
|
2052
|
-
| "DrozdMilitaries"
|
|
2053
|
-
| "EnemyVarta"
|
|
2054
|
-
| "NeutralMSOP"
|
|
2055
|
-
| "YanovCorpus"
|
|
2056
|
-
| "MoleStalkers"
|
|
2057
|
-
| "Mutant"
|
|
2058
|
-
| "Controller"
|
|
2059
|
-
| "Poltergeist"
|
|
2060
|
-
| "Bloodsucker"
|
|
2061
|
-
| "Zombie"
|
|
2062
|
-
| "Chimera"
|
|
2063
|
-
| "Burer"
|
|
2064
|
-
| "Pseudogiant"
|
|
2065
|
-
| "Anamorph"
|
|
2066
|
-
| "Sinister"
|
|
2067
|
-
| "Pseudobear"
|
|
2068
|
-
| "Snork"
|
|
2069
|
-
| "Pseudodog"
|
|
2070
|
-
| "Boar"
|
|
2071
|
-
| "Flesh"
|
|
2072
|
-
| "Beaver"
|
|
2073
|
-
| "Ratwolf"
|
|
2074
|
-
| "Deer"
|
|
2075
|
-
| "Rat"
|
|
2076
|
-
| "Tushkan"
|
|
2077
|
-
| "Stickman"
|
|
2078
|
-
| "Blinddog"
|
|
2079
|
-
| "Bayun"
|
|
2080
|
-
| "CorpusStorm"
|
|
2081
|
-
| "DocileLabMutants"
|
|
2082
|
-
| "VartaSIRCAA"
|
|
2083
|
-
| "YantarZombie"
|
|
2084
|
-
| "FriendlyBlinddog"
|
|
2085
|
-
| "Lessy"
|
|
2086
|
-
| "AlliedMutants"
|
|
2087
|
-
| "NoahLesya"
|
|
2088
|
-
| "KlenMercenaries"
|
|
2089
|
-
| "SIRCAA_Scientist"
|
|
2090
|
-
| "MALACHITE_Scientist"
|
|
2091
|
-
| "NoonFaustians"
|
|
2092
|
-
| "SQ89_SidorMercs"
|
|
2093
|
-
| "ScarBoss_Faction"
|
|
2094
|
-
| "KorshunovBoss_Faction"
|
|
2095
|
-
| "StrelokBoss_Faction"
|
|
2096
|
-
| "FaustBoss_Faction";
|
|
2097
|
-
|
|
2098
1971
|
export type EObjBoolParams = `EObjBoolParams::${
|
|
2099
1972
|
| "IsOffsetAimingEnabled"
|
|
2100
1973
|
| "IsNightVisionEnabled"
|