@voltro/game-stack 0.87.0 → 0.88.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/dist/errors.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { GameSystemId as e } from "./systems.js";
2
2
  import { Schema as t } from "effect";
3
- //#region src/errors.ts
3
+ // src/errors.ts
4
4
  var n = class extends t.TaggedError()("GameStackError", {
5
5
  code: t.Literals([
6
6
  "invalid_configuration",
@@ -9,5 +9,4 @@ var n = class extends t.TaggedError()("GameStackError", {
9
9
  ]),
10
10
  systems: t.Array(e)
11
11
  }) {};
12
- //#endregion
13
12
  export { n as GameStackError };
package/dist/fightRoom.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { fightOwnData as e, fightRefusal as t } from "./fightRules.js";
2
2
  import { createFightSimulation as n } from "./fightSimulation.js";
3
3
  import { defineRoom as r } from "@voltro/plugin-rooms/room";
4
- //#region src/fightRoom.ts
4
+ // src/fightRoom.ts
5
5
  var i = (i) => {
6
6
  let a = e(i, [
7
7
  "name",
@@ -40,5 +40,4 @@ var i = (i) => {
40
40
  ...a.reconnect === void 0 ? {} : { reconnect: a.reconnect }
41
41
  });
42
42
  };
43
- //#endregion
44
43
  export { i as createFightRoom };
@@ -1,6 +1,6 @@
1
1
  import { createFixed as e } from "@voltro/plugin-rooms/fixed";
2
2
  import { RoomAuthoringError as t } from "@voltro/plugin-rooms/errors";
3
- //#region src/fightRules.ts
3
+ // src/fightRules.ts
4
4
  var n = e(), r = Object.freeze({
5
5
  stageHalfWidthRaw: n.fromInt(8),
6
6
  fighterRadiusRaw: n.fromRatio(1, 2),
@@ -62,5 +62,4 @@ var n = e(), r = Object.freeze({
62
62
  playerIds: l(e),
63
63
  rules: c(t, !0)
64
64
  });
65
- //#endregion
66
65
  export { l as captureFightPlayerIds, c as captureFightRules, u as createFightOptions, r as defaultFightRules, a as fightOwnData, i as fightRefusal };
@@ -1,6 +1,6 @@
1
1
  import { Schema as e } from "effect";
2
2
  import { fieldId as t } from "@voltro/plugin-rooms/room";
3
- //#region src/fightSchema.ts
3
+ // src/fightSchema.ts
4
4
  var n = e.Struct({
5
5
  stageHalfWidthRaw: e.Int.pipe(t(1)),
6
6
  fighterRadiusRaw: e.Int.pipe(t(2)),
@@ -77,5 +77,4 @@ var n = e.Struct({
77
77
  playerIds: e.Array(e.Int),
78
78
  rules: n
79
79
  });
80
- //#endregion
81
80
  export { o as FightEventSchema, i as FightFighterSchema, a as FightInputSchema, c as FightOptionsSchema, r as FightPlayerIdSchema, n as FightRulesSchema, s as FightStateSchema };
@@ -2,7 +2,7 @@ import { FightInputSchema as e, FightOptionsSchema as t, FightStateSchema as n }
2
2
  import { captureFightPlayerIds as r, captureFightRules as i, fightOwnData as a, fightRefusal as o } from "./fightRules.js";
3
3
  import { createFixed as s } from "@voltro/plugin-rooms/fixed";
4
4
  import { defineSimulation as c } from "@voltro/plugin-rooms/simulation";
5
- //#region src/fightSimulation.ts
5
+ // src/fightSimulation.ts
6
6
  var l = s(), u = /* @__PURE__ */ new WeakMap(), d = (e) => {
7
7
  let { fighter: t, intent: n, rules: r } = e, i = r.stageHalfWidthRaw - r.fighterRadiusRaw, a = e.canAct && !t.blocking ? n.move * r.moveSpeedRaw : 0, o = l.clamp(l.add(l.raw(t.xRaw), l.raw(a)), l.raw(-i), l.raw(i)), s = e.jump ? r.jumpVelocityRaw : t.verticalSpeedRaw;
8
8
  s = !e.jump && t.yRaw === 0 ? 0 : Math.max(-r.maxHeightRaw, l.sub(l.raw(s), l.raw(r.gravityRaw)));
@@ -216,5 +216,4 @@ var l = s(), u = /* @__PURE__ */ new WeakMap(), d = (e) => {
216
216
  hit: T === f ? "default" : "custom"
217
217
  })), E;
218
218
  }, C = (e) => u.get(e) ?? o();
219
- //#endregion
220
219
  export { S as createFightSimulation, f as defaultFightHit, d as defaultFightMovement, C as describeFightStrategies };
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import { roomsPlugin as C } from "@voltro/plugin-rooms";
16
16
  import { matchmakingPlugin as w } from "@voltro/plugin-matchmaking";
17
17
  import { leaderboardsPlugin as T } from "@voltro/plugin-leaderboards";
18
18
  import { Schema as E } from "effect";
19
- //#region src/index.ts
19
+ // src/index.ts
20
20
  function D() {
21
21
  throw new c({
22
22
  code: "invalid_configuration",
@@ -39,14 +39,14 @@ var O = (e) => {
39
39
  }
40
40
  for (let e of n) {
41
41
  let t = i[e];
42
- t !== void 0 && typeof t != "boolean" && (e !== "matchmaking" || typeof t != "function") && (!t || typeof t != "object" || Array.isArray(t)) && D();
42
+ t === void 0 || typeof t == "boolean" || e === "matchmaking" && typeof t == "function" || t && typeof t == "object" && !Array.isArray(t) || D();
43
43
  }
44
44
  if (i.additionalPlugins !== void 0) {
45
45
  let e = i.additionalPlugins;
46
46
  (!Array.isArray(e) || e.length > 64 || Reflect.ownKeys(e).length !== e.length + 1) && D();
47
47
  for (let t = 0; t < e.length; t++) {
48
48
  let n = Object.getOwnPropertyDescriptor(e, String(t));
49
- (!n || !("value" in n) || !n.value || typeof n.value != "object") && D();
49
+ n && "value" in n && n.value && typeof n.value == "object" || D();
50
50
  let r = Object.getOwnPropertyDescriptor(n.value, "name");
51
51
  (!r || !("value" in r) || typeof r.value != "string" || !r.value.length || r.value.length > 256) && D();
52
52
  }
@@ -88,5 +88,4 @@ var O = (e) => {
88
88
  });
89
89
  return Object.freeze(a);
90
90
  };
91
- //#endregion
92
91
  export { e as GAME_PRESET_IDS, t as GAME_SYSTEMS, n as GAME_SYSTEM_IDS, r as GamePreset, i as GameStackDiagnostic, c as GameStackError, a as GameSystemId, A as describeGameStack, o as describeGameSystems, j as gameStack, s as presetGameSystems };
@@ -1,6 +1,6 @@
1
1
  import { GameStackError as e } from "./errors.js";
2
2
  import { economyInboxGrants as t } from "@voltro/plugin-liveops/grants";
3
- //#region src/resourceBindings.ts
3
+ // src/resourceBindings.ts
4
4
  var n = (t, n) => {
5
5
  let r = Object.getOwnPropertyDescriptor(t, n);
6
6
  if (r) {
@@ -71,5 +71,4 @@ var n = (t, n) => {
71
71
  })
72
72
  };
73
73
  };
74
- //#endregion
75
74
  export { i as bindStackEconomyInventory, o as bindStackInboxGrants, a as bindStackRewardDestinations };
package/dist/systems.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Schema as e } from "effect";
2
- //#region src/systems.ts
2
+ // src/systems.ts
3
3
  var t = Object.freeze([
4
4
  "auth",
5
5
  "players",
@@ -158,5 +158,4 @@ var t = Object.freeze([
158
158
  diagnostics: Object.freeze(d)
159
159
  });
160
160
  };
161
- //#endregion
162
161
  export { r as GAME_PRESET_IDS, a as GAME_SYSTEMS, t as GAME_SYSTEM_IDS, i as GamePreset, s as GameStackDiagnostic, n as GameSystemId, c as describeGameSystems, o as presetGameSystems };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/game-stack",
3
- "version": "0.87.0",
3
+ "version": "0.88.0",
4
4
  "description": "Visible composition of ordinary game-system plugins and dependency diagnostics",
5
5
  "keywords": [
6
6
  "voltro",
@@ -48,24 +48,24 @@
48
48
  "node": ">=24.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@voltro/protocol": "0.87.0",
52
- "@voltro/plugin-auth": "0.87.0",
53
- "@voltro/plugin-players": "0.87.0",
54
- "@voltro/plugin-social": "0.87.0",
55
- "@voltro/plugin-chat": "0.87.0",
56
- "@voltro/plugin-guilds": "0.87.0",
57
- "@voltro/plugin-sanctions": "0.87.0",
58
- "@voltro/plugin-rooms": "0.87.0",
59
- "@voltro/plugin-matchmaking": "0.87.0",
60
- "@voltro/plugin-leaderboards": "0.87.0",
61
- "@voltro/plugin-inventory": "0.87.0",
62
- "@voltro/plugin-economy": "0.87.0",
63
- "@voltro/plugin-progression": "0.87.0",
64
- "@voltro/plugin-liveops": "0.87.0",
65
- "@voltro/plugin-saves": "0.87.0"
51
+ "@voltro/protocol": "0.88.0",
52
+ "@voltro/plugin-auth": "0.88.0",
53
+ "@voltro/plugin-players": "0.88.0",
54
+ "@voltro/plugin-social": "0.88.0",
55
+ "@voltro/plugin-chat": "0.88.0",
56
+ "@voltro/plugin-guilds": "0.88.0",
57
+ "@voltro/plugin-sanctions": "0.88.0",
58
+ "@voltro/plugin-rooms": "0.88.0",
59
+ "@voltro/plugin-matchmaking": "0.88.0",
60
+ "@voltro/plugin-leaderboards": "0.88.0",
61
+ "@voltro/plugin-inventory": "0.88.0",
62
+ "@voltro/plugin-economy": "0.88.0",
63
+ "@voltro/plugin-progression": "0.88.0",
64
+ "@voltro/plugin-liveops": "0.88.0",
65
+ "@voltro/plugin-saves": "0.88.0"
66
66
  },
67
67
  "peerDependencies": {
68
- "effect": "4.0.1",
68
+ "effect": "4.1.0",
69
69
  "react": "^19.0.0"
70
70
  },
71
71
  "publishConfig": {