@adatechnology/game-contracts 0.27.0 → 0.29.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/index.d.ts CHANGED
@@ -1029,6 +1029,13 @@ declare const DEFAULT_BLAST_IMPULSE: Readonly<Required<BlastImpulseOptions>>;
1029
1029
  * `I/W^(1/3) = 0.067 sqrt(1 + (Z/0.23)^4) / (Z^2 (1 + (Z/1.55)^3)^(1/3))` bar·ms per kg^(1/3), with the scaled distance `Z = R / W^(1/3)`.
1030
1030
  */
1031
1031
  declare function sideOnImpulse(tnt: number, distance: number): number;
1032
+ /**
1033
+ * Peak side-on (incident) overpressure of the wave, in Pa, at `distance` metres from `tnt` kg of TNT in free air: Kinney and Graham, "Explosive Shocks in Air" (1985),
1034
+ * `Ps/Pa = 808 (1 + (Z/4.5)^2) / (sqrt(1 + (Z/0.048)^2) sqrt(1 + (Z/0.32)^2) sqrt(1 + (Z/1.35)^2))`, with the scaled distance `Z = R / W^(1/3)` (m/kg^(1/3)).
1035
+ * What a wall takes from a blast is read against it: about 7 kPa cracks plaster and breaks windows, 14 to 20 kPa knocks parts of a brick wall out, 35 kPa and over brings an
1036
+ * unreinforced brick wall down (Glasstone and Dolan, "The Effects of Nuclear Weapons", 1977, table 5.139; UFC 3-340-02).
1037
+ */
1038
+ declare function sideOnOverpressure(tnt: number, distance: number): number;
1032
1039
  /**
1033
1040
  * The impulse per square metre a body facing the wave takes, Pa·s: the side-on impulse reflected. The reflection doubles a weak wave and grows up to about six times close to the charge,
1034
1041
  * where the wave is strong (the ratio of reflected to side-on impulse of the Kingery-Bulmash charts, fitted as `2 + 4 / (1 + Z^2)`).
@@ -1559,6 +1566,10 @@ interface HandTargets {
1559
1566
  fingers?: {
1560
1567
  index?: number;
1561
1568
  };
1569
+ /** The same for the left hand (its index on the trigger of a tool of its own, with a tool in each hand); absent, the left hand's fingers all follow `gripL`. */
1570
+ fingersL?: {
1571
+ index?: number;
1572
+ };
1562
1573
  /**
1563
1574
  * Where the elbows go: `view` puts them on screen beside the hand, out to the side, as a tool held out in front (default); `body` lets them hang down and back by the body, as an item
1564
1575
  * carried close (a can, a bottle), where an elbow out to the side would lift it above the shoulder.
@@ -1575,8 +1586,13 @@ interface MuzzlePose {
1575
1586
  /** The module draws the muzzle flash itself: the host draws none of its own. */
1576
1587
  readonly drawsFlash: boolean;
1577
1588
  }
1578
- /** Read by the host at each shot; null while the tool in the hands has no muzzle (a knife, a bare hand). */
1579
- type MuzzleSource = () => MuzzlePose | null;
1589
+ /** A hand of the body: `R` the right, `L` the left. A tool in one hand alone is in the right; the left holds one of its own only with a tool in each hand (`HostTool.offHand`). */
1590
+ type ToolHand = 'R' | 'L';
1591
+ /**
1592
+ * Read by the host at each shot; null while the tool in the hands has no muzzle (a knife, a bare hand). `hand` is the hand that fired (absent: the right one); a source that draws
1593
+ * one tool only answers the same for both.
1594
+ */
1595
+ type MuzzleSource = (hand?: ToolHand) => MuzzlePose | null;
1580
1596
  /**
1581
1597
  * The layer of what the first-person view draws over the world (three.js `Object3D.layers`): the tool in the hands and the arms that hold it. A host with a first-person view draws
1582
1598
  * the world without this layer, then this layer alone over it with the depth cleared and its own field of view (`ModuleHost.setViewmodelFov`), as shooters draw the weapon in the hands:
@@ -1724,6 +1740,13 @@ interface BenchSheet {
1724
1740
  readonly name: string;
1725
1741
  }[];
1726
1742
  readonly note?: string;
1743
+ /** A picture of the real thing the card is about, with its author and licence: the host shows it on the card, linked to `page`. */
1744
+ readonly image?: {
1745
+ readonly url: string;
1746
+ readonly alt: string;
1747
+ readonly credit?: string;
1748
+ readonly page?: string;
1749
+ };
1727
1750
  /** A strip of named segments (seconds), with tick marks and a playhead that follows the module metric `metric`. */
1728
1751
  readonly timeline?: {
1729
1752
  readonly segments: readonly {
@@ -2253,7 +2276,8 @@ interface ModuleArea {
2253
2276
  };
2254
2277
  }
2255
2278
  /**
2256
- * What the player did with the tool in hand, as the host reports it. Hosts emit what they support; modules ignore what they do not need. The
2279
+ * What the player did with the tool in hand, as the host reports it. A tool event names the `hand` whose tool it is when the player holds one in each (`HostTool.offHand`): `L` for the
2280
+ * left; absent is the right, the hand of a tool held alone. A `tool` event with `hand: 'L'` puts the left hand's tool in it, and one with an empty `weapon` lets the left hand go. Hosts emit what they support; modules ignore what they do not need. The
2257
2281
  * names are of a tool's cycle, not of a firearm: a nail gun, a chainsaw or a hose has modes, faults and a safety too.
2258
2282
  */
2259
2283
  type HostEvent =
@@ -2262,6 +2286,7 @@ type HostEvent =
2262
2286
  type: 'tool';
2263
2287
  weapon: string;
2264
2288
  duration?: number;
2289
+ hand?: ToolHand;
2265
2290
  }
2266
2291
  /** `shots` are projectiles (a shotgun shell is many), `rounds` the cartridges spent (a burst is several). */
2267
2292
  | {
@@ -2278,11 +2303,13 @@ type HostEvent =
2278
2303
  */
2279
2304
  origin?: Vec3;
2280
2305
  direction?: Vec3;
2306
+ hand?: ToolHand;
2281
2307
  }
2282
2308
  /** The trigger was pulled, the round was spent and nothing left the tool (a dud cartridge): no projectile, no recoil. */
2283
2309
  | {
2284
2310
  type: 'misfire';
2285
2311
  weapon: string;
2312
+ hand?: ToolHand;
2286
2313
  }
2287
2314
  /** `kind` is how the rule reloads (`tactical`, `empty`, `one_by_one`); `duration` the seconds of the whole reload, on `start`. */
2288
2315
  | {
@@ -2291,27 +2318,33 @@ type HostEvent =
2291
2318
  phase: 'start' | 'end';
2292
2319
  kind?: string;
2293
2320
  duration?: number;
2321
+ hand?: ToolHand;
2294
2322
  } | {
2295
2323
  type: 'empty';
2296
2324
  weapon: string;
2325
+ hand?: ToolHand;
2297
2326
  } | {
2298
2327
  type: 'mode';
2299
2328
  weapon: string;
2300
2329
  mode: string;
2330
+ hand?: ToolHand;
2301
2331
  } | {
2302
2332
  type: 'fault';
2303
2333
  weapon: string;
2304
2334
  fault: string;
2335
+ hand?: ToolHand;
2305
2336
  } | {
2306
2337
  type: 'clear';
2307
2338
  weapon: string;
2308
2339
  fault: string;
2309
2340
  phase: 'start' | 'end';
2310
2341
  duration?: number;
2342
+ hand?: ToolHand;
2311
2343
  } | {
2312
2344
  type: 'safety';
2313
2345
  weapon: string;
2314
2346
  on: boolean;
2347
+ hand?: ToolHand;
2315
2348
  }
2316
2349
  /** The action works between shots (a pump, a bolt); `duration` is the seconds of the cycle, on `start`. */
2317
2350
  | {
@@ -2319,17 +2352,20 @@ type HostEvent =
2319
2352
  weapon: string;
2320
2353
  phase: 'start' | 'end';
2321
2354
  duration?: number;
2355
+ hand?: ToolHand;
2322
2356
  }
2323
2357
  /** A step of a longer phase (a reload's magazine out, magazine in, charge), at the moment the rule reaches it. */
2324
2358
  | {
2325
2359
  type: 'stage';
2326
2360
  weapon: string;
2327
2361
  stage: string;
2362
+ hand?: ToolHand;
2328
2363
  }
2329
2364
  /** One more round went into the tool while it loads round by round. */
2330
2365
  | {
2331
2366
  type: 'feed';
2332
2367
  weapon: string;
2368
+ hand?: ToolHand;
2333
2369
  }
2334
2370
  /**
2335
2371
  * A throwable with a timer fuse is cooked: the trigger pulls the pin (`start`, `fuse` is the whole fuse), releasing throws it with what is left of
@@ -2340,6 +2376,7 @@ type HostEvent =
2340
2376
  weapon: string;
2341
2377
  phase: 'start' | 'throw' | 'burst';
2342
2378
  fuse: number;
2379
+ hand?: ToolHand;
2343
2380
  }
2344
2381
  /** An accessory went on (`fit`), came off (`remove`) or broke (`break`) at `mount`; `duration` is the seconds the work takes, on `fit` and `remove`. */
2345
2382
  | {
@@ -2349,6 +2386,7 @@ type HostEvent =
2349
2386
  attachment: string;
2350
2387
  mount: string;
2351
2388
  duration?: number;
2389
+ hand?: ToolHand;
2352
2390
  }
2353
2391
  /** A light or a laser was turned on or off. */
2354
2392
  | {
@@ -2356,6 +2394,7 @@ type HostEvent =
2356
2394
  weapon: string;
2357
2395
  attachment: string;
2358
2396
  on: boolean;
2397
+ hand?: ToolHand;
2359
2398
  }
2360
2399
  /** The stock was folded or slid in (`collapsed`) or opened (`extended`); `kind` is how it moves (`fold`, `retract`), `duration` the seconds it takes. */
2361
2400
  | {
@@ -2364,6 +2403,7 @@ type HostEvent =
2364
2403
  state: 'collapsed' | 'extended';
2365
2404
  kind?: string;
2366
2405
  duration?: number;
2406
+ hand?: ToolHand;
2367
2407
  }
2368
2408
  /** The weapon in hand changed between the main weapon and the one under its barrel (`on`: the under-barrel one is in use); `duration` is the seconds of the switch. */
2369
2409
  | {
@@ -2371,6 +2411,7 @@ type HostEvent =
2371
2411
  weapon: string;
2372
2412
  on: boolean;
2373
2413
  duration?: number;
2414
+ hand?: ToolHand;
2374
2415
  }
2375
2416
  /**
2376
2417
  * Something blew up: a thrown or launched explosive, a charge, or a part of the world (a fuel barrel); `source` is the weapon or the object, `cause` what set it off.
@@ -2389,6 +2430,16 @@ type HostEvent =
2389
2430
  /** Inside this radius (metres) the blast is lethal to a body it reaches. */
2390
2431
  lethalRadius?: number;
2391
2432
  }
2433
+ /**
2434
+ * With a tool in each hand, the tool of `hand` is put away against the body (`on`) to free that hand for the other tool, or taken back in hand; `duration` is the seconds the move takes.
2435
+ */
2436
+ | {
2437
+ type: 'stow';
2438
+ weapon: string;
2439
+ on: boolean;
2440
+ duration?: number;
2441
+ hand?: ToolHand;
2442
+ }
2392
2443
  /** The player crouched or stood up, or the camera mode changed; read the new state with `host.player()`. */
2393
2444
  | {
2394
2445
  type: 'player';
@@ -2426,10 +2477,20 @@ interface HostTool {
2426
2477
  suppressed?: boolean;
2427
2478
  /** True while the trigger and the reload go to the launcher under the barrel. */
2428
2479
  underbarrelActive?: boolean;
2480
+ /**
2481
+ * True while the tool is put away against the body (tucked in the belt, under the arm) to free its hand for the tool in the other hand: a magazine changed with the free hand, with a
2482
+ * tool in each hand. It does not fire then; the host says when it goes and comes back with a `stow` event.
2483
+ */
2484
+ stowed?: boolean;
2429
2485
  /** Kg: the tool with what is on it. */
2430
2486
  mass?: number;
2431
2487
  /** Seconds to bring the tool to the sights, with what is on it. */
2432
2488
  aimSeconds?: number;
2489
+ /**
2490
+ * The tool in the left hand when the player holds one in each (a pistol in each hand): its own rounds, reload and state. Absent with one tool, which is in the right hand. A tool
2491
+ * in each hand is held out, never brought to the eye: the second button pulls the left one's trigger instead.
2492
+ */
2493
+ offHand?: HostTool;
2433
2494
  }
2434
2495
  interface HostToolAttachment {
2435
2496
  readonly id: string;
@@ -2610,9 +2671,9 @@ interface ModuleHost {
2610
2671
  /**
2611
2672
  * Where the player's body holds a tool now (world space), in every view (the weapon is the body's own): `position` is the pocket of the right shoulder a stock rests on, `quaternion` turns
2612
2673
  * to the aim (-z the aim, x right, y up, as a camera). A module draws the tool there at its real size. Null for a host with no body (the module puts the same pocket under the camera's eye);
2613
- * a host without a body leaves it out.
2674
+ * a host without a body leaves it out. With `hand: 'L'` it is the pocket of the left shoulder (the same frame mirrored), where a tool in the left hand is held.
2614
2675
  */
2615
- holdFrame?(): HandPose | null;
2676
+ holdFrame?(hand?: ToolHand): HandPose | null;
2616
2677
  /**
2617
2678
  * Puts the player's hand on a leaf the module moves itself (a door of a house): the host plays the reach to `handle()`, calls `onGrip` when the hand is on it (the module then turns
2618
2679
  * the handle and swings the leaf), keeps the hand on `handle()` for `seconds` as it moves, and takes it back; the body pulls or pushes (`pull`) or shakes a locked one (`locked`).
@@ -2922,4 +2983,4 @@ declare function footprintBlocker(object: FootprintObject | (() => FootprintObje
2922
2983
  /** @deprecated Import it from `@adatechnology/game-contracts/testing`. */
2923
2984
  declare const resetWarnOnce: () => void;
2924
2985
 
2925
- export { type ActionControl, type AnimationClipSpec, type AnimationEventSpec, type AnimationKey, type AnimationPose, type AreaPlacement, type AudioListener, type AudioSink, BLOW_IDS, BODY_FOLEY_IDS, BODY_SOUND_IDS, type BallisticExtras, type BenchChange, type BenchDeclaration, type BenchReport, type BenchSheet, type BlastImpulseOptions, type BlastOptions, type BlastReport, type BlastShove, type BlastShoveOptions, type BlastSource, type BlowId, type BlowTarget, type BodyFoleyId, type BodyRegion, type BodySlot, type BodySoundId, type BooleanControl, type BusyOptions, type BusySink, type BusyTask, type CategorizedOptions, type CategorizedReport, type CategoryDef, type CategoryOptions, type CategoryRegistry, type ChainDelay, type CheckOptions, type CheckSpecOptions, type ChoiceControl, type ChoiceOption, type ConfinementOptions, type ContainerSpec, type ContractChecker, type ContractContext, type ControlPatch, type ControlValue, type CostOptions, type Crack, DEFAULT_BLAST_IMPULSE, DEFAULT_BLAST_SHOVE, DEFAULT_ENVIRONMENT, DEFAULT_IGNITION_RULES, DEFAULT_SURFACE, DEFERRED_PRIORITY, DEFERRED_QUEUE_ID, type DamageStage, type DamageType, type DebrisKind, type DeepPartial, type DeferredQueue, type DeferredQueueOptions, type DeferredQueueReport, type Dent, type DestructibleImpl, type DestructibleSpec, type DestructionEvent, type DestructionEventType, type EffectHandle, type EffectRequest, type EffectSink, type Enclosure, type EnclosureBox, type EnvironmentBus, type EnvironmentKey, type EnvironmentState, type ExplosionChain, FIRST_PERSON_LAYER, FOOTSTEP_SOUND_IDS, FRAGMENT_COVER, FRAME_PHASES, type FluidKind, type Footprint, type FootprintObject, type FootstepSoundId, type FractureStyle, type Fragment, type FragmentHitOptions, type FragmentMark, type FrameOptions, type FramePhase, GAIT_IDS, type GaitId, type GroundLayout, type GroundZone, HEAVY_LANDING_SPEED, type HandPose, type HandTargetSource, type HandTargets, type Hit, type HitIgnition, type HitResult, type Hole, type HostEvent, type HostGraphics, type HostReach, type HostTool, type HostToolAttachment, IMPACT_CONTRACT, type IgnitionRules, type ImpactContract, type ItemAnimationContract, type ItemSeat, type ItemSounds, type ItemUseDef, type JointKind, type JointSpec, type JointState, KIT_ORIGIN_KEY, KNOCKED_DOWN_ANGLE, KNOCK_CHEST, KNOCK_DOWN_SPEED, type KitOrigin, type Knock, LANDING_IDS, LAND_SOUND_IDS, type LandSoundId, type LandingId, type LiquidId, type LoopHandle, MATERIAL_SURFACES, MISSING_BITS, type MaterialId, type ModuleArea, type ModuleBench, type ModuleControl, type ModuleHost, type ModuleItemFluid, type ModuleItemSeal, type ModuleLayer, type ModuleMetric, type ModuleScenario, type ModuleView, type MuzzlePose, type MuzzleSource, type NumberControl, type ObjectState, type PartBreach, type PartShape, type PartSpec, type PartState, type PartStatus, type PartUnits, type PileSpec, type PlayerState, type Quat, type RayHit, type Reinforcement, STAGE_EVENT, SURFACE_IDS, SWING_LEAD_SECONDS, type SealBlock, type SealSpec, type SealState, type SegmentKind, type ShelterOptions, type Shot, type SoilLayer, type SoilProfile, type SoilState, type SoundHandle, type SoundRequest, type SpecReport, type StructureRole, type SurfaceId, type SurfaceLayer, type SurfaceRay, type SurfaceRayHit, TOOL_CLIP, TWIST_LIFT, type TensionRebar, type TestableItem, type TestableModule, type Thumbnail, type ToolAnimationStep, type ToolAnimator, type ToolClipId, type ToolClipPlayer, type ToolClipPlayerOptions, type ToolClipSet, type ToolCommand, type ToolCommandResult, type ToolKind, type ToolRig, type TunedMassDamper, type TwistOptions, type TwistStroke, type UnmarkedDrawing, type Use, type Vec3, type WarmUpProbes, type WindExposure, type WindState, applyPatches, blastBodySpeed, blastShove, bodyImpulse, bodyMass, checkAnimation, checkBench, checkCategorized, checkDeferredQueue, checkDestructible, checkHit, checkSpec, checkToolClips, createEnvironmentBus, createToolClipPlayer, deepMerge, defineCategories, fillFactor, footprintBlocker, footstepSoundId, hitSoundId, ignitionChance, isSurfaceId, kitOriginOf, knockOf, landSoundId, launchBody, leadClipEvents, markKitOrigin, mergeById, removeIds, resetWarnOnce, resolveEntry, resolveIgnitionRules, sampleClip, scaleClip, sealBlock, sealOpener, shotExtras, shotToHit, sideOnImpulse, sparkTargetFactor, stepKnock, surfaceOfMaterial, swingSoundId, takeLaunch, toolAnimationStep, twistStroke, unmarkedDrawings, useToHit };
2986
+ export { type ActionControl, type AnimationClipSpec, type AnimationEventSpec, type AnimationKey, type AnimationPose, type AreaPlacement, type AudioListener, type AudioSink, BLOW_IDS, BODY_FOLEY_IDS, BODY_SOUND_IDS, type BallisticExtras, type BenchChange, type BenchDeclaration, type BenchReport, type BenchSheet, type BlastImpulseOptions, type BlastOptions, type BlastReport, type BlastShove, type BlastShoveOptions, type BlastSource, type BlowId, type BlowTarget, type BodyFoleyId, type BodyRegion, type BodySlot, type BodySoundId, type BooleanControl, type BusyOptions, type BusySink, type BusyTask, type CategorizedOptions, type CategorizedReport, type CategoryDef, type CategoryOptions, type CategoryRegistry, type ChainDelay, type CheckOptions, type CheckSpecOptions, type ChoiceControl, type ChoiceOption, type ConfinementOptions, type ContainerSpec, type ContractChecker, type ContractContext, type ControlPatch, type ControlValue, type CostOptions, type Crack, DEFAULT_BLAST_IMPULSE, DEFAULT_BLAST_SHOVE, DEFAULT_ENVIRONMENT, DEFAULT_IGNITION_RULES, DEFAULT_SURFACE, DEFERRED_PRIORITY, DEFERRED_QUEUE_ID, type DamageStage, type DamageType, type DebrisKind, type DeepPartial, type DeferredQueue, type DeferredQueueOptions, type DeferredQueueReport, type Dent, type DestructibleImpl, type DestructibleSpec, type DestructionEvent, type DestructionEventType, type EffectHandle, type EffectRequest, type EffectSink, type Enclosure, type EnclosureBox, type EnvironmentBus, type EnvironmentKey, type EnvironmentState, type ExplosionChain, FIRST_PERSON_LAYER, FOOTSTEP_SOUND_IDS, FRAGMENT_COVER, FRAME_PHASES, type FluidKind, type Footprint, type FootprintObject, type FootstepSoundId, type FractureStyle, type Fragment, type FragmentHitOptions, type FragmentMark, type FrameOptions, type FramePhase, GAIT_IDS, type GaitId, type GroundLayout, type GroundZone, HEAVY_LANDING_SPEED, type HandPose, type HandTargetSource, type HandTargets, type Hit, type HitIgnition, type HitResult, type Hole, type HostEvent, type HostGraphics, type HostReach, type HostTool, type HostToolAttachment, IMPACT_CONTRACT, type IgnitionRules, type ImpactContract, type ItemAnimationContract, type ItemSeat, type ItemSounds, type ItemUseDef, type JointKind, type JointSpec, type JointState, KIT_ORIGIN_KEY, KNOCKED_DOWN_ANGLE, KNOCK_CHEST, KNOCK_DOWN_SPEED, type KitOrigin, type Knock, LANDING_IDS, LAND_SOUND_IDS, type LandSoundId, type LandingId, type LiquidId, type LoopHandle, MATERIAL_SURFACES, MISSING_BITS, type MaterialId, type ModuleArea, type ModuleBench, type ModuleControl, type ModuleHost, type ModuleItemFluid, type ModuleItemSeal, type ModuleLayer, type ModuleMetric, type ModuleScenario, type ModuleView, type MuzzlePose, type MuzzleSource, type NumberControl, type ObjectState, type PartBreach, type PartShape, type PartSpec, type PartState, type PartStatus, type PartUnits, type PileSpec, type PlayerState, type Quat, type RayHit, type Reinforcement, STAGE_EVENT, SURFACE_IDS, SWING_LEAD_SECONDS, type SealBlock, type SealSpec, type SealState, type SegmentKind, type ShelterOptions, type Shot, type SoilLayer, type SoilProfile, type SoilState, type SoundHandle, type SoundRequest, type SpecReport, type StructureRole, type SurfaceId, type SurfaceLayer, type SurfaceRay, type SurfaceRayHit, TOOL_CLIP, TWIST_LIFT, type TensionRebar, type TestableItem, type TestableModule, type Thumbnail, type ToolAnimationStep, type ToolAnimator, type ToolClipId, type ToolClipPlayer, type ToolClipPlayerOptions, type ToolClipSet, type ToolCommand, type ToolCommandResult, type ToolHand, type ToolKind, type ToolRig, type TunedMassDamper, type TwistOptions, type TwistStroke, type UnmarkedDrawing, type Use, type Vec3, type WarmUpProbes, type WindExposure, type WindState, applyPatches, blastBodySpeed, blastShove, bodyImpulse, bodyMass, checkAnimation, checkBench, checkCategorized, checkDeferredQueue, checkDestructible, checkHit, checkSpec, checkToolClips, createEnvironmentBus, createToolClipPlayer, deepMerge, defineCategories, fillFactor, footprintBlocker, footstepSoundId, hitSoundId, ignitionChance, isSurfaceId, kitOriginOf, knockOf, landSoundId, launchBody, leadClipEvents, markKitOrigin, mergeById, removeIds, resetWarnOnce, resolveEntry, resolveIgnitionRules, sampleClip, scaleClip, sealBlock, sealOpener, shotExtras, shotToHit, sideOnImpulse, sideOnOverpressure, sparkTargetFactor, stepKnock, surfaceOfMaterial, swingSoundId, takeLaunch, toolAnimationStep, twistStroke, unmarkedDrawings, useToHit };
@@ -92,6 +92,7 @@ var GameContracts = (() => {
92
92
  shotExtras: () => shotExtras,
93
93
  shotToHit: () => shotToHit,
94
94
  sideOnImpulse: () => sideOnImpulse,
95
+ sideOnOverpressure: () => sideOnOverpressure,
95
96
  sparkTargetFactor: () => sparkTargetFactor,
96
97
  stepKnock: () => stepKnock,
97
98
  surfaceOfMaterial: () => surfaceOfMaterial,
@@ -134,6 +135,13 @@ var GameContracts = (() => {
134
135
  const scaled = 0.067 * Math.sqrt(1 + (z / 0.23) ** 4) / (z * z * Math.cbrt(1 + (z / 1.55) ** 3));
135
136
  return scaled * w3 * 100;
136
137
  }
138
+ var ATMOSPHERE = 101325;
139
+ function sideOnOverpressure(tnt, distance) {
140
+ if (!(tnt > 0)) return 0;
141
+ const z = Math.max(distance, NEAREST) / Math.cbrt(tnt);
142
+ const ratio = 808 * (1 + (z / 4.5) ** 2) / (Math.sqrt(1 + (z / 0.048) ** 2) * Math.sqrt(1 + (z / 0.32) ** 2) * Math.sqrt(1 + (z / 1.35) ** 2));
143
+ return ratio * ATMOSPHERE;
144
+ }
137
145
  function bodyImpulse(tnt, distance) {
138
146
  if (!(tnt > 0)) return 0;
139
147
  const z = Math.max(distance, NEAREST) / Math.cbrt(tnt);