@mafiahub/types 0.1.9 → 0.1.11

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.
@@ -56,6 +56,9 @@ interface DiscordPresenceOptions {
56
56
  * calls no-op (setters silently, commits return `false`) when Discord presence
57
57
  * is disabled or unavailable.
58
58
  *
59
+ * A game may keep its own presence and open only some fields to scripts;
60
+ * writes to the other fields are ignored.
61
+ *
59
62
  * @example
60
63
  * // Batch form — apply several fields and publish in one call:
61
64
  * Discord.setPresence({
@@ -135,7 +138,7 @@ declare const Discord: {
135
138
  update(): boolean;
136
139
 
137
140
  /**
138
- * Clear the activity on Discord and reset the staged state.
141
+ * Clear what scripts published and reset the staged state.
139
142
  * @returns `true` if dispatched, `false` if unavailable.
140
143
  */
141
144
  clear(): boolean;
@@ -0,0 +1,11 @@
1
+ /** Runtime-side flags. Available on server and client. */
2
+ declare const ExecutionEnvironment: {
3
+ /** True in the sandboxed client scripting runtime. */
4
+ readonly isClient: boolean;
5
+ /** True in the authoritative server scripting runtime. */
6
+ readonly isServer: boolean;
7
+ /** Local Framework release version. */
8
+ readonly frameworkVersion: string;
9
+ /** Local mod version from InstanceOptions.modVersion; empty when unset. */
10
+ readonly modVersion: string;
11
+ };
package/index.d.ts CHANGED
@@ -9,3 +9,4 @@
9
9
  /// <reference path="framework/exports.d.ts" />
10
10
  /// <reference path="framework/key.d.ts" />
11
11
  /// <reference path="framework/discord.d.ts" />
12
+ /// <reference path="framework/execution_environment.d.ts" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mafiahub/types",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "TypeScript type definitions for the MafiaHub Framework scripting API",
5
5
  "types": "index.d.ts",
6
6
  "files": [