@adatechnology/game-weapons 0.5.6 → 0.5.8

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.
@@ -2161,6 +2161,7 @@ var GameWeapons = (() => {
2161
2161
  ];
2162
2162
 
2163
2163
  // ../game-contracts/dist/index.js
2164
+ var DEFAULT_COST_ALLOCATION_BYTES = 1024 * 1024;
2164
2165
  var DEFAULT_IGNITION_RULES = {
2165
2166
  fillCurve: [
2166
2167
  [0, 0.6],
@@ -2177,6 +2178,38 @@ var GameWeapons = (() => {
2177
2178
  sparkFluid: { diesel: 0.15 },
2178
2179
  fireNear: { radius: 1.5, chancePerSecond: 0.5 }
2179
2180
  };
2181
+ var DEFERRED_QUEUE_ID = {
2182
+ DESTRUCTION_EVENTS: "destruction.events",
2183
+ BREACH_PAINT: "floorplan.breach-paint",
2184
+ AUDIO_VOICES: "audio.voices",
2185
+ VEHICLE_CREASE: "vehicles.crease"
2186
+ };
2187
+ var DEFERRED_PRIORITY = {
2188
+ [DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS]: { priority: 300, phase: "present" },
2189
+ [DEFERRED_QUEUE_ID.BREACH_PAINT]: { priority: 250, phase: "present" },
2190
+ [DEFERRED_QUEUE_ID.AUDIO_VOICES]: { priority: 200, phase: "idle", reserveMs: 1 },
2191
+ [DEFERRED_QUEUE_ID.VEHICLE_CREASE]: { priority: 100, phase: "idle" }
2192
+ };
2193
+ var WARNED_KEY = /* @__PURE__ */ Symbol.for("@adatechnology/game-contracts.warned");
2194
+ var warnedKeys = () => {
2195
+ const holder = globalThis;
2196
+ return holder[WARNED_KEY] ?? (holder[WARNED_KEY] = /* @__PURE__ */ new Set());
2197
+ };
2198
+ var isProduction = () => {
2199
+ try {
2200
+ return process.env.NODE_ENV === "production";
2201
+ } catch {
2202
+ return false;
2203
+ }
2204
+ };
2205
+ var isQuiet = () => globalThis.__GAME_KIT_QUIET__ === true;
2206
+ var warnOnce = (key, message) => {
2207
+ if (isQuiet() || isProduction()) return;
2208
+ const seen = warnedKeys();
2209
+ if (seen.has(key)) return;
2210
+ seen.add(key);
2211
+ console.warn(`[game-kit] ${message}`);
2212
+ };
2180
2213
  var UNSAFE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
2181
2214
  var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
2182
2215
  var deepMerge = (base, patch) => {
@@ -2198,11 +2231,50 @@ var GameWeapons = (() => {
2198
2231
  for (const [id, patch] of Object.entries(patches ?? {})) {
2199
2232
  const entry = entries.get(id);
2200
2233
  if (entry) entries.set(id, deepMerge(entry, patch));
2234
+ else warnOnce(`registry.patch.${id}`, `patch for "${id}" ignored: no entry has that id`);
2201
2235
  }
2202
2236
  };
2203
2237
  var removeIds = (entries, ids) => {
2204
- for (const id of ids ?? []) entries.delete(id);
2238
+ for (const id of ids ?? []) {
2239
+ if (!entries.delete(id)) warnOnce(`registry.remove.${id}`, `remove of "${id}" ignored: no entry has that id`);
2240
+ }
2205
2241
  };
2242
+ var SURFACE_IDS = ["concrete", "asphalt", "wood", "tile", "dirt", "grass", "gravel", "sand", "metal", "water", "glass", "carpet"];
2243
+ var GAIT_IDS = ["walk", "run"];
2244
+ var LANDING_IDS = ["light", "heavy"];
2245
+ var BODY_SOUND_IDS = [
2246
+ "jump",
2247
+ "cloth_rustle",
2248
+ "body_fall",
2249
+ "fall_damage",
2250
+ "player_hurt",
2251
+ "player_breath_run",
2252
+ "player_death",
2253
+ "bite",
2254
+ "grab",
2255
+ "punch_swing",
2256
+ "punch_hit_body",
2257
+ "punch_hit_face",
2258
+ "punch_hit_object",
2259
+ "kick_swing",
2260
+ "kick_hit",
2261
+ "kick_hit_object",
2262
+ "shove_two_hands",
2263
+ "knife_swing",
2264
+ "knife_stab",
2265
+ "knife_slash",
2266
+ "knife_hit_object",
2267
+ "blunt_swing",
2268
+ "blunt_hit",
2269
+ "blunt_hit_object",
2270
+ "axe_swing",
2271
+ "axe_chop",
2272
+ "axe_hit_object"
2273
+ ];
2274
+ var footstepSoundId = (surface, gait) => `footstep_${surface}_${gait}`;
2275
+ var FOOTSTEP_SOUND_IDS = SURFACE_IDS.flatMap((surface) => GAIT_IDS.map((gait) => footstepSoundId(surface, gait)));
2276
+ var LAND_SOUND_IDS = SURFACE_IDS.flatMap((surface) => LANDING_IDS.map((landing) => `land_${surface}_${landing}`));
2277
+ var BODY_FOLEY_IDS = [...FOOTSTEP_SOUND_IDS, ...LAND_SOUND_IDS, ...BODY_SOUND_IDS];
2206
2278
 
2207
2279
  // src/data/archetypes.json
2208
2280
  var archetypes_default = [