@adatechnology/game-interactables-household 0.8.0 → 0.8.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.js CHANGED
@@ -16,6 +16,7 @@ var fridgeLike = { body: { material: "steel", joint: "weld" }, parts: [[/^door/,
16
16
  var bin = { body: { material: "plastic", joint: "fused" }, parts: [["lid", door("plastic", "hinge", "lid")]] };
17
17
  var upholstery = { material: "fabric", joint: "glue" };
18
18
  var POLE_CAGE = { material: "steel", spacing: 0.1, diameter: 0.01 };
19
+ var BRICKWORK = { size: [0.23, 0.075, 0.11], bond: "running", mortar: "mortar" };
19
20
  var DESTRUCTION = {
20
21
  fridge: fridgeLike,
21
22
  fridge_compact: fridgeLike,
@@ -71,13 +72,13 @@ var DESTRUCTION = {
71
72
  parts: [["flap", door("steel", "hinge", "flap")], ["flag", { material: "steel", joint: "hinge", piece: "flag" }]]
72
73
  },
73
74
  dog_house: { body: { material: "plywood", joint: "nail" }, parts: [] },
74
- bbq: { body: { material: "brick", joint: "mortar" }, parts: [["counter_door", door("steel")]] },
75
+ bbq: { body: { material: "brick", joint: "mortar", units: BRICKWORK }, parts: [["counter_door", door("steel")]] },
75
76
  bunk_bed: { body: { material: "wood_soft", joint: "screw" }, parts: [] },
76
77
  wood_stove: {
77
78
  body: { material: "cast_iron", joint: "bolt" },
78
79
  parts: [["firebox_door", { material: "cast_iron", joint: "hinge", piece: "door" }]]
79
80
  },
80
- fireplace: { body: { material: "brick", joint: "mortar" }, parts: [] },
81
+ fireplace: { body: { material: "brick", joint: "mortar", units: BRICKWORK }, parts: [] },
81
82
  outhouse: {
82
83
  body: { material: "wood_soft", joint: "nail" },
83
84
  parts: [["door", door("wood_soft", "hinge", "door")], ["seat_lid", door("wood_soft", "hinge", "lid")]]
@@ -435,7 +436,13 @@ var Ctx = class {
435
436
  this.collider("body", -this.hw, this.y0, -this.hd, this.hw, this.y0 + this.h, this.hd);
436
437
  }
437
438
  const body = DESTRUCTION[this.type]?.body;
438
- if (body && !this.spec.destruction) this.spec.destruction = body.reinforcement ? { ...body, reinforcement: { ...body.reinforcement } } : { ...body };
439
+ if (body && !this.spec.destruction) {
440
+ this.spec.destruction = {
441
+ ...body,
442
+ ...body.reinforcement ? { reinforcement: { ...body.reinforcement } } : {},
443
+ ...body.units ? { units: { ...body.units, size: [...body.units.size] } } : {}
444
+ };
445
+ }
439
446
  for (const k of Object.keys(s)) if (Array.isArray(s[k]) && s[k].length === 0) delete s[k];
440
447
  return this.spec;
441
448
  }