@chronodivide/game-api 0.35.1 → 0.37.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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +30 -3
- package/dist/index.js +1 -1
- package/dist/res/ra2cd.mix +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ export declare class CombatDamageRules {
|
|
|
114
114
|
deathWeapon: string;
|
|
115
115
|
dMislEliteWarhead: string;
|
|
116
116
|
dMislWarhead: string;
|
|
117
|
+
flameDamage: string;
|
|
117
118
|
ironCurtainDuration: number;
|
|
118
119
|
ivanDamage: number;
|
|
119
120
|
ivanIconFlickerRate: number;
|
|
@@ -128,6 +129,7 @@ export declare class CombatDamageRules {
|
|
|
128
129
|
/** Player faction */
|
|
129
130
|
export declare class Country {
|
|
130
131
|
private rules;
|
|
132
|
+
get id(): number;
|
|
131
133
|
get side(): SideType;
|
|
132
134
|
get name(): string;
|
|
133
135
|
isPlayable(): boolean;
|
|
@@ -136,6 +138,7 @@ export declare class Country {
|
|
|
136
138
|
|
|
137
139
|
/** Data structure for rules.ini country sections */
|
|
138
140
|
export declare class CountryRules {
|
|
141
|
+
id: number;
|
|
139
142
|
side: SideType;
|
|
140
143
|
/** string identifier */
|
|
141
144
|
name: string;
|
|
@@ -149,6 +152,7 @@ export declare class CountryRules {
|
|
|
149
152
|
veteranAircraft: string[];
|
|
150
153
|
veteranInfantry: string[];
|
|
151
154
|
veteranUnits: string[];
|
|
155
|
+
constructor(id: number);
|
|
152
156
|
readIni(ini: IniSection): void;
|
|
153
157
|
}
|
|
154
158
|
|
|
@@ -338,6 +342,7 @@ export declare class GeneralRules {
|
|
|
338
342
|
crew: CrewRules;
|
|
339
343
|
defaultMirageDisguises: string[];
|
|
340
344
|
dMisl: DMislRules;
|
|
345
|
+
dropPodWeapon: string;
|
|
341
346
|
engineer: string;
|
|
342
347
|
flightLevel: number;
|
|
343
348
|
guardAreaTargetingDelay: number;
|
|
@@ -365,6 +370,7 @@ export declare class GeneralRules {
|
|
|
365
370
|
radar: RadarRules;
|
|
366
371
|
refundPercent: number;
|
|
367
372
|
repair: RepairRules;
|
|
373
|
+
revealTriggerRadius: number;
|
|
368
374
|
shipSinkingWeight: number;
|
|
369
375
|
sovietDisguise: string;
|
|
370
376
|
spyMoneyStealPercent: number;
|
|
@@ -447,7 +453,7 @@ export declare class IniSection {
|
|
|
447
453
|
/** Emulates fixed-point precision given a floating-point number */
|
|
448
454
|
private toFixedPointPrecision;
|
|
449
455
|
getBool(key: string, defaultValue?: boolean): boolean;
|
|
450
|
-
getArray(key: string, sep?: RegExp, defaultValue?:
|
|
456
|
+
getArray(key: string, sep?: RegExp, defaultValue?: string[]): string[];
|
|
451
457
|
getNumberArray(key: string, sep?: RegExp, defaultValue?: number[]): number[];
|
|
452
458
|
getFixedArray(key: string, sep?: RegExp, defaultValue?: number[]): number[];
|
|
453
459
|
getEnum<T>(key: string, enumType: any, defaultValue: T, caseInsensitive?: boolean): T;
|
|
@@ -650,6 +656,7 @@ export declare interface ObjectOwnerChangeApiEvent {
|
|
|
650
656
|
export declare class ObjectRules {
|
|
651
657
|
type: ObjectType;
|
|
652
658
|
protected ini: IniSection;
|
|
659
|
+
index: number;
|
|
653
660
|
static readonly IMAGE_NONE = "none";
|
|
654
661
|
alphaImage: string | undefined;
|
|
655
662
|
/** Only for SHP-based entities */
|
|
@@ -666,7 +673,7 @@ export declare class ObjectRules {
|
|
|
666
673
|
uiName: string;
|
|
667
674
|
static iniSpeedToLeptonsPerTick(iniSpeed: number): number;
|
|
668
675
|
static iniRotToDegsPerTick(iniRot: number): number;
|
|
669
|
-
constructor(type: ObjectType, ini: IniSection);
|
|
676
|
+
constructor(type: ObjectType, ini: IniSection, index?: number);
|
|
670
677
|
protected parse(): void;
|
|
671
678
|
get name(): string;
|
|
672
679
|
get imageName(): string;
|
|
@@ -844,6 +851,7 @@ export declare class ProjectileRules extends ObjectRules {
|
|
|
844
851
|
rot: number;
|
|
845
852
|
/** Original ROT value from INI */
|
|
846
853
|
iniRot: number;
|
|
854
|
+
shadow: boolean;
|
|
847
855
|
shrapnelWeapon: string | undefined;
|
|
848
856
|
shrapnelCount: number;
|
|
849
857
|
subjectToCliffs: boolean;
|
|
@@ -1079,6 +1087,22 @@ export declare enum SuperWeaponType {
|
|
|
1079
1087
|
AmerParaDrop = 6
|
|
1080
1088
|
}
|
|
1081
1089
|
|
|
1090
|
+
export declare class Tag {
|
|
1091
|
+
id: string;
|
|
1092
|
+
repeatType: TagRepeatType;
|
|
1093
|
+
name: string;
|
|
1094
|
+
triggerId: string;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export declare enum TagRepeatType {
|
|
1098
|
+
/** Any of the associated objects - OR operator - one time */
|
|
1099
|
+
OnceAny = 0,
|
|
1100
|
+
/** When all of the associated objects - AND operator - one time */
|
|
1101
|
+
OnceAll = 1,
|
|
1102
|
+
/** Any of the associated objects - OR operator - repeat */
|
|
1103
|
+
Repeat = 2
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1082
1106
|
/** Data structure for rules.ini tehno types sections (buildings, infantry, vehicles, aircrafts) */
|
|
1083
1107
|
export declare class TechnoRules extends ObjectRules {
|
|
1084
1108
|
static readonly MAX_SIGHT = 11;
|
|
@@ -1141,7 +1165,7 @@ export declare class TechnoRules extends ObjectRules {
|
|
|
1141
1165
|
unitRepair: boolean;
|
|
1142
1166
|
unitReload: boolean;
|
|
1143
1167
|
isBaseDefense: boolean;
|
|
1144
|
-
superWeapon: string;
|
|
1168
|
+
superWeapon: string | undefined;
|
|
1145
1169
|
chargedAnimTime: number;
|
|
1146
1170
|
naval: boolean;
|
|
1147
1171
|
underwater: boolean;
|
|
@@ -1200,6 +1224,8 @@ export declare class TechnoRules extends ObjectRules {
|
|
|
1200
1224
|
weaponCount: number;
|
|
1201
1225
|
deathWeapon: string | undefined;
|
|
1202
1226
|
deathWeaponDamageModifier: number;
|
|
1227
|
+
occupyWeapon: string | undefined;
|
|
1228
|
+
eliteOccupyWeapon: string | undefined;
|
|
1203
1229
|
veteranAbilities: Set<VeteranAbility>;
|
|
1204
1230
|
eliteAbilities: Set<VeteranAbility>;
|
|
1205
1231
|
selfHealing: boolean;
|
|
@@ -1517,6 +1543,7 @@ export declare interface Tile extends IsoTile {
|
|
|
1517
1543
|
id: string;
|
|
1518
1544
|
/** Duplicates tile occlusion state for data locality */
|
|
1519
1545
|
occluded: boolean;
|
|
1546
|
+
tag?: Tag;
|
|
1520
1547
|
}
|
|
1521
1548
|
|
|
1522
1549
|
export declare interface TileResourceData {
|