@scm-js/plugin-api 1.22.0 → 1.23.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/index.d.ts +38 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2804,6 +2804,36 @@ export interface TriggersApi {
|
|
|
2804
2804
|
};
|
|
2805
2805
|
/** A trigger's `Comment` action text, when it has one. */
|
|
2806
2806
|
comment(trigger: TriggerRecord): string | null;
|
|
2807
|
+
/**
|
|
2808
|
+
* EUD: the player value that reaches a memory address through the deaths table
|
|
2809
|
+
* (`(address − consts.triggers.deathsTable) / 4`, the address rounded down to a dword)
|
|
2810
|
+
* — what a Deaths condition or Set Deaths action stores in `player` with `unitId` 0 to
|
|
2811
|
+
* read or write that dword.
|
|
2812
|
+
*/
|
|
2813
|
+
epd(address: number): number;
|
|
2814
|
+
/** EUD: the address a record's `player` and `unitId` reach through the deaths table — `epd`'s inverse, and a plain death counter's cell as an address. */
|
|
2815
|
+
addressOf(player: number, unitId?: number): number;
|
|
2816
|
+
/**
|
|
2817
|
+
* A content fingerprint of a trigger: the same wherever it sits in the list and
|
|
2818
|
+
* whatever the game's bookkeeping bits say. What a plugin that generates triggers
|
|
2819
|
+
* finds its run by (`TriggerClaimSpec.locate`), and what an editor keeps a selection
|
|
2820
|
+
* by across a list that changed under it.
|
|
2821
|
+
*/
|
|
2822
|
+
fingerprint(trigger: TriggerRecord): string;
|
|
2823
|
+
/**
|
|
2824
|
+
* Every death-counter cell (`[player, unit]`) and switch the triggers read or write —
|
|
2825
|
+
* TRIG when `list` is omitted. A player group counts as every slot it can resolve to
|
|
2826
|
+
* (`Current Player` as the trigger's owners); a class unit (*Any unit*, *Men*, …)
|
|
2827
|
+
* counts for nothing, and an EUD player is an address, not a cell. What a plugin that
|
|
2828
|
+
* allocates counters or switches of its own must keep clear of.
|
|
2829
|
+
*/
|
|
2830
|
+
usage(list?: TriggerRecord[]): {
|
|
2831
|
+
cells: [
|
|
2832
|
+
player: number,
|
|
2833
|
+
unit: number
|
|
2834
|
+
][];
|
|
2835
|
+
switches: number[];
|
|
2836
|
+
};
|
|
2807
2837
|
/**
|
|
2808
2838
|
* Tell the editor that a run of the trigger list is generated by this plugin. The
|
|
2809
2839
|
* Trigger Editor badges those rows, locks them and offers the plugin's own editor in
|
|
@@ -3382,9 +3412,16 @@ export interface TriggerConsts {
|
|
|
3382
3412
|
readonly triggerFlags: typeof TriggerFlag;
|
|
3383
3413
|
/**
|
|
3384
3414
|
* The address of the game's death table, which is the base an EUD player value is
|
|
3385
|
-
* counted from: `epd = (address - deathsTable) / 4
|
|
3415
|
+
* counted from: `epd = (address - deathsTable) / 4` (`triggers.epd` does the sum).
|
|
3386
3416
|
*/
|
|
3387
3417
|
readonly deathsTable: number;
|
|
3418
|
+
/**
|
|
3419
|
+
* The value of a condition's or action's trailing `mask` word that makes it a *masked*
|
|
3420
|
+
* record: the game then reads or writes only the bits set in the record's `location`
|
|
3421
|
+
* field, which is how one byte, one word or one bit of a dword is reached. StarCraft:
|
|
3422
|
+
* Remastered only; 1.16.1 ignores the word.
|
|
3423
|
+
*/
|
|
3424
|
+
readonly maskedRecord: 17235;
|
|
3388
3425
|
}
|
|
3389
3426
|
export interface ActiveBrush {
|
|
3390
3427
|
mode: TerrainMode;
|