From bb55e3754b059a003606902ce6221c4dca8d365d Mon Sep 17 00:00:00 2001 From: jckirton <66995801+jckirton@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:50:27 +1030 Subject: [PATCH 1/3] Changed some inconsistent layout. --- env.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/env.d.ts b/env.d.ts index bb24580..288300e 100644 --- a/env.d.ts +++ b/env.d.ts @@ -968,7 +968,8 @@ declare global { interface PlayerNullsec { } /* eslint-enable ts/consistent-type-definitions */ - /** Subscript space that can call FULLSEC scripts. */ const $fs: Fullsec + /** Subscript space that can call FULLSEC scripts. */ + const $fs: Fullsec /** Subscript space that can call HIGHSEC and above scripts. Makes your script HIGHSEC (overrides FULLSEC). */ const $hs: Highsec /** @@ -981,7 +982,8 @@ declare global { const $ls: Lowsec /** Subscript space that can call any script. Makes your script NULLSEC (overrides higher security levels). */ const $ns: Nullsec - /** Subscript space that can call FULLSEC scripts. */ const $4s: typeof $fs + /** Subscript space that can call FULLSEC scripts. */ + const $4s: typeof $fs /** Subscript space that can call HIGHSEC and above scripts. Makes your script HIGHSEC (overrides FULLSEC). */ const $3s: typeof $hs /** From 8bbd74d2312d6edad9e1d79a6b656b36d794abe6 Mon Sep 17 00:00:00 2001 From: jckirton <66995801+jckirton@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:53:15 +1030 Subject: [PATCH 2/3] Added BINMAT types. --- env.d.ts | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/env.d.ts b/env.d.ts index 288300e..a8ba20a 100644 --- a/env.d.ts +++ b/env.d.ts @@ -960,6 +960,115 @@ declare global { CorpsTopItem<6>, CorpsTopItem<7>, CorpsTopItem<8>, CorpsTopItem<9>, CorpsTopItem<10> ] + // BINMAT types + type Axiom = "%" | "&" | "+" | "!" | "^" | "#" + + type CardValue = "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "*" | ">" | "?" | "@" + + type Card = `${CardValue}${Axiom}` + + type TeamHand = Card[] + type EnemyHand = number + type Hand = TeamHand | EnemyHand + + type Deck = { + c: number, + t: Card | "X" + } + + type Discard = `${Card}u`[] + type AttackerDiscard = Card[] + + type Stack = (Card | `${Card}u` | "X")[] + + type GameState = { + a?: Deck, + a0?: Stack, + a1?: Stack, + a2?: Stack, + a3?: Stack, + a4?: Stack, + a5?: Stack, + d0?: Stack, + d1?: Stack, + d2?: Stack, + d3?: Stack, + d4?: Stack, + d5?: Stack, + ha0?: Hand, + ha1?: Hand, + ha2?: Hand, + ha3?: Hand, + ha4?: Hand, + ha5?: Hand, + ha6?: Hand, + ha7?: Hand, + ha8?: Hand, + ha9?: Hand, + haa?: Hand, + hab?: Hand, + hac?: Hand, + had?: Hand, + hae?: Hand, + haf?: Hand, + hd0?: Hand, + hd1?: Hand, + hd2?: Hand, + hd3?: Hand, + hd4?: Hand, + hd5?: Hand, + hd6?: Hand, + hd7?: Hand, + hd8?: Hand, + hd9?: Hand, + hda?: Hand, + hdb?: Hand, + hdc?: Hand, + hdd?: Hand, + hde?: Hand, + hdf?: Hand, + l0?: Deck + l1?: Deck + l2?: Deck + l3?: Deck + l4?: Deck + l5?: Deck + ord: number, + turns: number, + x0?: Discard, + x1?: Discard, + x2?: Discard, + x3?: Discard, + x4?: Discard, + x5?: Discard, + xa?: AttackerDiscard + } + + type BINMATArgs = { + ops: string[], + plr: string, + plrs: [string, string, string?][], + s: GameState + } + + + type Lane = "0" | "1" | "2" | "3" | "4" | "5" + + type POp = `p${CardValue | Card}${Lane}` + type UOp = `u${CardValue | Card}${Lane}` + type XOp = `x${CardValue | Card}${Lane | "a"}` + + type DrawOp = `d${Lane | "a"}` + type PlayOp = POp | UOp + type DiscardOp = XOp + type CombatOp = `c${Lane}` + + type Op = DrawOp | PlayOp | DiscardOp | CombatOp + + type TraceDefender = "100101111" // 303 + type TraceAttacker = "101000000" // 320 + type Trace = TraceDefender | TraceAttacker + /* eslint-disable ts/consistent-type-definitions */ interface PlayerFullsec { } interface PlayerHighsec { } From 88f63cff0dc7c1df87cdc634ff7fc0646c27b167 Mon Sep 17 00:00:00 2001 From: jckirton <66995801+jckirton@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:56:22 +1030 Subject: [PATCH 3/3] Added BINMAT scripts. --- env.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/env.d.ts b/env.d.ts index a8ba20a..fd7442d 100644 --- a/env.d.ts +++ b/env.d.ts @@ -628,6 +628,25 @@ type Lowsec = Midsec & PlayerLowsec & { } type Nullsec = Lowsec & PlayerNullsec & { + binmat: { + /** + * **NULLSEC** + */ + connect: (args: { target: string, trace: Trace, brain?: string }) => ScriptResponse, + /** + * **NULLSEC** + */ + c: typeof $ns.binmat.connect, + /** + * **NULLSEC** + */ + xform: (args: { op: Op }) => ScriptResponse, + /** + * **NULLSEC** + */ + x: typeof $ns.binmat.xform + } + corps: { /** **NULLSEC** */ create: (args: { name: string, confirm: true }) => ScriptResponse /** **NULLSEC** */ hire: (args: { name: string }) => ScriptResponse