@adatechnology/game-weapons 0.11.2 → 0.12.1

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
@@ -238,6 +238,8 @@ declare class ExplosiveBody {
238
238
  get dud(): boolean;
239
239
  /** Seconds until the timer sets it off, or undefined without one. */
240
240
  get fuseRemaining(): number | undefined;
241
+ /** Whether this trigger sets it off (`impact` for a rocket or a 40 mm grenade, `timer` for a hand grenade). */
242
+ isTriggeredBy(trigger: ExplosiveTrigger): boolean;
241
243
  step(dt: number, probe?: SurfaceProbe): ExplosiveEvent[];
242
244
  /** Sets it off from outside; undefined when this explosive does not answer to `cause` or is already done. */
243
245
  trigger(cause: ExplosiveTrigger): ExplosiveEvent | undefined;
@@ -14886,6 +14886,10 @@ var GameWeapons = (() => {
14886
14886
  get fuseRemaining() {
14887
14887
  return this.fuseLeft;
14888
14888
  }
14889
+ /** Whether this trigger sets it off (`impact` for a rocket or a 40 mm grenade, `timer` for a hand grenade). */
14890
+ isTriggeredBy(trigger) {
14891
+ return this.triggers.has(trigger);
14892
+ }
14889
14893
  step(dt, probe) {
14890
14894
  const events = [];
14891
14895
  if (this.isDone) return events;