@s2script/sdk 0.6.0 → 0.8.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/chat.d.ts +7 -2
- package/commands.d.ts +10 -1
- package/dist/cli.js +3877 -1220
- package/package.json +5 -5
- package/transmit.d.ts +1 -1
- package/usercmd.d.ts +1 -1
- package/usermessages.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s2script/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "MIT OR Apache-2.0",
|
|
5
5
|
"description": "s2script SDK — the builtin capability types (imported as @s2script/sdk/entity, …) plus the `s2s` CLI for building Source 2 / CS2 plugins.",
|
|
6
6
|
"type": "module",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"test": "node --experimental-strip-types --no-warnings --test test/*.test.mjs"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"@s2script/eslint-plugin": "0.2.0",
|
|
16
17
|
"esbuild": "^0.25.0",
|
|
17
|
-
"adm-zip": "^0.5.16",
|
|
18
|
-
"typescript": "^5.6.0",
|
|
19
18
|
"eslint": "^10.7.0",
|
|
20
|
-
"
|
|
19
|
+
"typescript": "^5.6.0"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
|
-
"@
|
|
22
|
+
"@clack/prompts": "^1.7.0",
|
|
23
|
+
"fflate": "^0.8.2"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
package/transmit.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface TransmitStats {
|
|
|
21
21
|
* Declarative per-client entity visibility: hide an entity from some viewers, enforced engine-side each snapshot.
|
|
22
22
|
* @example
|
|
23
23
|
* import { Transmit } from "@s2script/sdk/transmit";
|
|
24
|
-
* // examples/
|
|
24
|
+
* // examples/cookbook/src/recipes/transmit.ts:65 — show `prop` ONLY to one viewer slot
|
|
25
25
|
* const ok = Transmit.setVisibleTo(prop, [slot]);
|
|
26
26
|
*/
|
|
27
27
|
export declare const Transmit: {
|
package/usercmd.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { QAngle } from "./math";
|
|
|
13
13
|
* handler call operates on it.
|
|
14
14
|
* @example
|
|
15
15
|
* import type { UserCmdView } from "@s2script/sdk/usercmd";
|
|
16
|
-
* // examples/
|
|
16
|
+
* // examples/cookbook/src/recipes/usercmd.ts:27 — read this tick's input
|
|
17
17
|
* ctx.clients.onRunCmd((cmd: UserCmdView, info: { slot: number }) => {
|
|
18
18
|
* console.log(`slot=${info.slot} fwd=${cmd.forwardMove} btn=${cmd.buttons}`);
|
|
19
19
|
* });
|
package/usermessages.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface UserMessageView {
|
|
|
50
50
|
* @example
|
|
51
51
|
* import { UserMessages } from "@s2script/sdk/usermessages";
|
|
52
52
|
* import { HookResult, type HookResultValue } from "@s2script/sdk/events";
|
|
53
|
-
* // examples/
|
|
53
|
+
* // examples/cookbook/src/recipes/usermessages.ts:27 — blanket-block radio text
|
|
54
54
|
* UserMessages.onPre("CCSUsrMsg_RadioText", (m): HookResultValue | void => {
|
|
55
55
|
* if (blockRadio) return HookResult.Handled;
|
|
56
56
|
* });
|