@chronodivide/game-api 0.50.0 → 0.50.1
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 +4 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -323,8 +323,16 @@ export declare class GameApi {
|
|
|
323
323
|
* Gets a list of units which are visible to the given player (not under the shroud), based on hostility
|
|
324
324
|
*
|
|
325
325
|
* An additional filter predicate can be passed to further narrow down results
|
|
326
|
+
*
|
|
327
|
+
* @param playerName -
|
|
328
|
+
* @param type - filters units based on their owner
|
|
329
|
+
* - `self` returns units owned by playerName
|
|
330
|
+
* - `allied` return all units owned by playerName or allies
|
|
331
|
+
* - `hostile` returns all units not owned by playerName or allies, including neutral units
|
|
332
|
+
* - `enemy` returns all units owned by enemy players, not including neutral units
|
|
333
|
+
* @param filter - an optional predicate for futher filtering units based on their rules
|
|
326
334
|
*/
|
|
327
|
-
getVisibleUnits(playerName: string, type: "self" | "allied" | "hostile", filter?: (r: TechnoRules) => boolean): number[];
|
|
335
|
+
getVisibleUnits(playerName: string, type: "self" | "allied" | "hostile" | "enemy", filter?: (r: TechnoRules) => boolean): number[];
|
|
328
336
|
getGameObjectData(objId: number): GameObjectData | undefined;
|
|
329
337
|
getUnitData(unitId: number): UnitData | undefined;
|
|
330
338
|
getAllSuperWeaponData(): SuperWeaponData[];
|