@chronodivide/game-api 0.74.0-dev.0 → 0.74.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 +12 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1 -1
- package/dist/res/ra2cd.mix +0 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# 0.74.0
|
|
4
|
+
|
|
5
|
+
- Update game engine version to 0.79
|
|
6
|
+
- Deprecated `GameApi.mapApi` in favor of `GameApi.map`
|
|
7
|
+
- Deprecated `GameApi.rulesApi` in favor of `GameApi.rules`
|
|
8
|
+
- Add `options` parameter to `GameApi.canPlaceBuilding` method
|
|
9
|
+
- **BREAKING**: Remove deprecated `MapApi.findPath` method signature
|
|
10
|
+
- Add `MapApi.getReachabilityMap`
|
|
11
|
+
- Add `PlayerApi`, including player-scoped functionality from `GameApi` as well as from `ActionsApi` and `ProductionApi`
|
|
12
|
+
- Group bot-scoped APIs under a single `Bot.context` property and deprecate `*Api` properties
|
|
13
|
+
- Add `Bot.onGameInit` method
|
|
14
|
+
|
|
3
15
|
# 0.73.0
|
|
4
16
|
|
|
5
17
|
- Update game engine version to 0.78
|
package/dist/index.d.ts
CHANGED
|
@@ -343,7 +343,7 @@ export declare class GameApi {
|
|
|
343
343
|
get rulesApi(): RulesApi;
|
|
344
344
|
isPlayerDefeated(playerName: string): boolean;
|
|
345
345
|
areAlliedPlayers(p1Name: string, p2Name: string): boolean;
|
|
346
|
-
canPlaceBuilding(playerName: string, buildingName: string, tile: Tile): boolean;
|
|
346
|
+
canPlaceBuilding(playerName: string, buildingName: string, tile: Tile, options?: PlaceCheckOptions): boolean;
|
|
347
347
|
getBuildingPlacementData(objName: string): BuildingPlacementData;
|
|
348
348
|
getPlayers(): string[];
|
|
349
349
|
getPlayerData(playerName: string): PlayerData;
|
|
@@ -989,6 +989,11 @@ export declare enum PipColor {
|
|
|
989
989
|
Blue = 4
|
|
990
990
|
}
|
|
991
991
|
|
|
992
|
+
export declare interface PlaceCheckOptions {
|
|
993
|
+
/** Skips adjacency checks. Defaults to false, except for buildings with ConstructionYard=yes */
|
|
994
|
+
ignoreAdjacent?: boolean;
|
|
995
|
+
}
|
|
996
|
+
|
|
992
997
|
export declare class PlayerApi {
|
|
993
998
|
#private;
|
|
994
999
|
name: string;
|
|
@@ -1520,6 +1525,7 @@ export declare class TechnoRules extends ObjectRules {
|
|
|
1520
1525
|
immuneToRadiation: boolean;
|
|
1521
1526
|
immuneToPsionics: boolean;
|
|
1522
1527
|
typeImmune: boolean;
|
|
1528
|
+
damageSelf: boolean;
|
|
1523
1529
|
warpable: boolean;
|
|
1524
1530
|
/** Only for vehicles */
|
|
1525
1531
|
isTilter: boolean;
|