@chronodivide/game-api 0.51.1 → 0.51.3
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 +9 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# 0.51.3
|
|
4
|
+
|
|
5
|
+
- Add `owner` property on base `GameObjectData`
|
|
6
|
+
- Add `passengerSlotCount` and `passengerSlotMax` properties on `UnitData`
|
|
7
|
+
|
|
8
|
+
# 0.51.2
|
|
9
|
+
|
|
10
|
+
- Added function overload to `mapApi.getTilesInRect` that accepts a single argument of type `Rectangle`
|
|
11
|
+
|
|
3
12
|
# 0.51.1
|
|
4
13
|
|
|
5
14
|
- Fix loading standalone map files from the file system
|
package/dist/index.d.ts
CHANGED
|
@@ -411,6 +411,8 @@ export declare interface GameObjectData {
|
|
|
411
411
|
hitPoints?: number;
|
|
412
412
|
/** The maximum HP */
|
|
413
413
|
maxHitPoints?: number;
|
|
414
|
+
/** The name of the player that owns this object (only for techno types) */
|
|
415
|
+
owner?: string;
|
|
414
416
|
}
|
|
415
417
|
|
|
416
418
|
export declare class GeneralRules {
|
|
@@ -650,6 +652,7 @@ export declare class MapApi {
|
|
|
650
652
|
getStartingLocations(): Vector2[];
|
|
651
653
|
getTheaterType(): TheaterType;
|
|
652
654
|
getTile(rx: number, ry: number): Tile | undefined;
|
|
655
|
+
getTilesInRect(rectangle: Rectangle): Tile[];
|
|
653
656
|
getTilesInRect(baseTile: Tile, size: Size): Tile[];
|
|
654
657
|
getObjectsOnTile(tile: Tile): number[];
|
|
655
658
|
hasBridgeOnTile(tile: Tile): boolean;
|
|
@@ -1144,6 +1147,13 @@ export declare class RadiationRules {
|
|
|
1144
1147
|
readIni(ini: IniSection): void;
|
|
1145
1148
|
}
|
|
1146
1149
|
|
|
1150
|
+
export declare interface Rectangle {
|
|
1151
|
+
x: number;
|
|
1152
|
+
y: number;
|
|
1153
|
+
width: number;
|
|
1154
|
+
height: number;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1147
1157
|
export declare class RepairRules {
|
|
1148
1158
|
/** minutes to reload each ammo point for aircraft or helicopters (also affects repair rate) */
|
|
1149
1159
|
reloadRate: number;
|
|
@@ -1759,6 +1769,10 @@ export declare interface UnitData extends GameObjectData {
|
|
|
1759
1769
|
harvestedOre?: number;
|
|
1760
1770
|
/** Only applicable to harvesters */
|
|
1761
1771
|
harvestedGems?: number;
|
|
1772
|
+
/** Only applicable to transport vehicles */
|
|
1773
|
+
passengerSlotCount?: number;
|
|
1774
|
+
/** Only applicable to transport vehicles */
|
|
1775
|
+
passengerSlotMax?: number;
|
|
1762
1776
|
/** Only applicable to aircraft */
|
|
1763
1777
|
ammo?: number;
|
|
1764
1778
|
/** If the unit is under the effect of a chrono/temporal weapon */
|