@adatechnology/game-interactables-household 0.3.1 → 0.5.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 +9 -0
- package/dist/index.global.js +1481 -331
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +37 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.global.js
CHANGED
|
@@ -34,6 +34,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
// ../game-contracts/dist/index.js
|
|
37
|
+
var DEFAULT_COST_ALLOCATION_BYTES = 1024 * 1024;
|
|
37
38
|
var STRUCTURE_ROLES = ["foundation", "column", "beam", "slab", "wall", "partition", "roof", "stair", "none"];
|
|
38
39
|
var BEARS = [true, false, "a_on_b", "b_on_a"];
|
|
39
40
|
var finite = (n) => typeof n === "number" && Number.isFinite(n);
|
|
@@ -136,6 +137,165 @@ var GameInteractablesHousehold = (() => {
|
|
|
136
137
|
}
|
|
137
138
|
return { ok: problems.length === 0, problems, warnings };
|
|
138
139
|
};
|
|
140
|
+
var DEFERRED_QUEUE_ID = {
|
|
141
|
+
DESTRUCTION_EVENTS: "destruction.events",
|
|
142
|
+
BREACH_PAINT: "floorplan.breach-paint",
|
|
143
|
+
AUDIO_VOICES: "audio.voices",
|
|
144
|
+
VEHICLE_CREASE: "vehicles.crease"
|
|
145
|
+
};
|
|
146
|
+
var DEFERRED_PRIORITY = {
|
|
147
|
+
[DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS]: { priority: 300, phase: "present" },
|
|
148
|
+
[DEFERRED_QUEUE_ID.BREACH_PAINT]: { priority: 250, phase: "present" },
|
|
149
|
+
[DEFERRED_QUEUE_ID.AUDIO_VOICES]: { priority: 200, phase: "idle", reserveMs: 1 },
|
|
150
|
+
[DEFERRED_QUEUE_ID.VEHICLE_CREASE]: { priority: 100, phase: "idle" }
|
|
151
|
+
};
|
|
152
|
+
var WARNED_KEY = /* @__PURE__ */ Symbol.for("@adatechnology/game-contracts.warned");
|
|
153
|
+
var warnedKeys = () => {
|
|
154
|
+
const holder = globalThis;
|
|
155
|
+
return holder[WARNED_KEY] ?? (holder[WARNED_KEY] = /* @__PURE__ */ new Set());
|
|
156
|
+
};
|
|
157
|
+
var isProduction = () => {
|
|
158
|
+
try {
|
|
159
|
+
return process.env.NODE_ENV === "production";
|
|
160
|
+
} catch {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var isQuiet = () => globalThis.__GAME_KIT_QUIET__ === true;
|
|
165
|
+
var warnOnce = (key, message) => {
|
|
166
|
+
if (isQuiet() || isProduction()) return;
|
|
167
|
+
const seen = warnedKeys();
|
|
168
|
+
if (seen.has(key)) return;
|
|
169
|
+
seen.add(key);
|
|
170
|
+
console.warn(`[game-kit] ${message}`);
|
|
171
|
+
};
|
|
172
|
+
var UNSAFE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
173
|
+
var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
|
|
174
|
+
var deepMerge = (base, patch) => {
|
|
175
|
+
if (!patch) return base;
|
|
176
|
+
const result = { ...base };
|
|
177
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
178
|
+
if (value === void 0 || UNSAFE_KEYS.has(key)) continue;
|
|
179
|
+
const current = result[key];
|
|
180
|
+
result[key] = isPlainObject(current) && isPlainObject(value) ? deepMerge(current, value) : value;
|
|
181
|
+
}
|
|
182
|
+
return result;
|
|
183
|
+
};
|
|
184
|
+
var mergeById = (shipped, extra) => {
|
|
185
|
+
const entries = /* @__PURE__ */ new Map();
|
|
186
|
+
for (const entry of [...shipped, ...extra ?? []]) entries.set(entry.id, entry);
|
|
187
|
+
return entries;
|
|
188
|
+
};
|
|
189
|
+
var applyPatches = (entries, patches) => {
|
|
190
|
+
for (const [id, patch] of Object.entries(patches ?? {})) {
|
|
191
|
+
const entry = entries.get(id);
|
|
192
|
+
if (entry) entries.set(id, deepMerge(entry, patch));
|
|
193
|
+
else warnOnce(`registry.patch.${id}`, `patch for "${id}" ignored: no entry has that id`);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
var removeIds = (entries, ids) => {
|
|
197
|
+
for (const id of ids ?? []) {
|
|
198
|
+
if (!entries.delete(id)) warnOnce(`registry.remove.${id}`, `remove of "${id}" ignored: no entry has that id`);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
var defineCategories = (defs, options = {}) => {
|
|
202
|
+
const problems = [];
|
|
203
|
+
const duplicates = (list) => {
|
|
204
|
+
const ids = /* @__PURE__ */ new Set();
|
|
205
|
+
for (const def of list) {
|
|
206
|
+
if (ids.has(def.id)) problems.push(`duplicate category "${def.id}"`);
|
|
207
|
+
ids.add(def.id);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
duplicates(defs);
|
|
211
|
+
duplicates(options.extra ?? []);
|
|
212
|
+
const entries = mergeById(defs, options.extra);
|
|
213
|
+
applyPatches(entries, options.patches);
|
|
214
|
+
removeIds(entries, options.remove);
|
|
215
|
+
const chain = (id) => {
|
|
216
|
+
const path = [];
|
|
217
|
+
let current = id;
|
|
218
|
+
while (current !== void 0) {
|
|
219
|
+
const def = entries.get(current);
|
|
220
|
+
if (!def) throw new Error(path.length === 0 ? `unknown category "${current}"` : `category "${path[0]}" has unknown parent "${current}"`);
|
|
221
|
+
if (path.includes(current)) throw new Error(`category cycle: ${[...path, current].reverse().join(" -> ")}`);
|
|
222
|
+
path.push(current);
|
|
223
|
+
current = def.extends;
|
|
224
|
+
}
|
|
225
|
+
return path.reverse();
|
|
226
|
+
};
|
|
227
|
+
const registry = {
|
|
228
|
+
get: (id) => entries.get(id),
|
|
229
|
+
has: (id) => entries.has(id),
|
|
230
|
+
ids: () => [...entries.keys()],
|
|
231
|
+
chain,
|
|
232
|
+
defaults: (id) => chain(id).reduce((acc, ancestor) => deepMerge(acc, entries.get(ancestor)?.defaults), {}),
|
|
233
|
+
requires: (id) => {
|
|
234
|
+
const out = [];
|
|
235
|
+
for (const ancestor of chain(id)) for (const contract of entries.get(ancestor)?.requires ?? []) if (!out.includes(contract)) out.push(contract);
|
|
236
|
+
return out;
|
|
237
|
+
},
|
|
238
|
+
isA: (id, ancestorId) => {
|
|
239
|
+
try {
|
|
240
|
+
return chain(id).includes(ancestorId);
|
|
241
|
+
} catch {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
check: () => {
|
|
246
|
+
const found = [...problems];
|
|
247
|
+
for (const [id, def] of entries) {
|
|
248
|
+
if (def.extends !== void 0 && !entries.has(def.extends)) found.push(`category "${id}" extends unknown "${def.extends}"`);
|
|
249
|
+
else {
|
|
250
|
+
try {
|
|
251
|
+
chain(id);
|
|
252
|
+
} catch (error) {
|
|
253
|
+
const message = error.message;
|
|
254
|
+
if (message.startsWith("category cycle") && !found.includes(message)) found.push(message);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return found;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
return registry;
|
|
262
|
+
};
|
|
263
|
+
var SURFACE_IDS = ["concrete", "asphalt", "wood", "tile", "dirt", "grass", "gravel", "sand", "metal", "water", "glass", "carpet"];
|
|
264
|
+
var GAIT_IDS = ["walk", "run"];
|
|
265
|
+
var LANDING_IDS = ["light", "heavy"];
|
|
266
|
+
var BODY_SOUND_IDS = [
|
|
267
|
+
"jump",
|
|
268
|
+
"cloth_rustle",
|
|
269
|
+
"body_fall",
|
|
270
|
+
"fall_damage",
|
|
271
|
+
"player_hurt",
|
|
272
|
+
"player_breath_run",
|
|
273
|
+
"player_death",
|
|
274
|
+
"bite",
|
|
275
|
+
"grab",
|
|
276
|
+
"punch_swing",
|
|
277
|
+
"punch_hit_body",
|
|
278
|
+
"punch_hit_face",
|
|
279
|
+
"punch_hit_object",
|
|
280
|
+
"kick_swing",
|
|
281
|
+
"kick_hit",
|
|
282
|
+
"kick_hit_object",
|
|
283
|
+
"shove_two_hands",
|
|
284
|
+
"knife_swing",
|
|
285
|
+
"knife_stab",
|
|
286
|
+
"knife_slash",
|
|
287
|
+
"knife_hit_object",
|
|
288
|
+
"blunt_swing",
|
|
289
|
+
"blunt_hit",
|
|
290
|
+
"blunt_hit_object",
|
|
291
|
+
"axe_swing",
|
|
292
|
+
"axe_chop",
|
|
293
|
+
"axe_hit_object"
|
|
294
|
+
];
|
|
295
|
+
var footstepSoundId = (surface, gait) => `footstep_${surface}_${gait}`;
|
|
296
|
+
var FOOTSTEP_SOUND_IDS = SURFACE_IDS.flatMap((surface) => GAIT_IDS.map((gait) => footstepSoundId(surface, gait)));
|
|
297
|
+
var LAND_SOUND_IDS = SURFACE_IDS.flatMap((surface) => LANDING_IDS.map((landing) => `land_${surface}_${landing}`));
|
|
298
|
+
var BODY_FOLEY_IDS = [...FOOTSTEP_SOUND_IDS, ...LAND_SOUND_IDS, ...BODY_SOUND_IDS];
|
|
139
299
|
|
|
140
300
|
// ../game-items-goods/dist/index.js
|
|
141
301
|
var FLOORPLAN_POOL_KEYS = {
|
|
@@ -2114,7 +2274,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
2114
2274
|
"road"
|
|
2115
2275
|
]
|
|
2116
2276
|
},
|
|
2117
|
-
model: "canned_sardines"
|
|
2277
|
+
model: "canned_sardines",
|
|
2278
|
+
seal: {
|
|
2279
|
+
byHand: true,
|
|
2280
|
+
spoilsWhenBreached: true
|
|
2281
|
+
}
|
|
2118
2282
|
},
|
|
2119
2283
|
{
|
|
2120
2284
|
id: "canned_corn_and_peas",
|
|
@@ -2296,7 +2460,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
2296
2460
|
"school"
|
|
2297
2461
|
]
|
|
2298
2462
|
},
|
|
2299
|
-
model: "rice"
|
|
2463
|
+
model: "rice",
|
|
2464
|
+
powder: {
|
|
2465
|
+
color: 15722710
|
|
2466
|
+
},
|
|
2467
|
+
estimated: [
|
|
2468
|
+
"powder"
|
|
2469
|
+
]
|
|
2300
2470
|
},
|
|
2301
2471
|
{
|
|
2302
2472
|
id: "beans",
|
|
@@ -2634,7 +2804,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
2634
2804
|
nonPerishable: true,
|
|
2635
2805
|
estimated: [
|
|
2636
2806
|
"nonPerishable"
|
|
2637
|
-
]
|
|
2807
|
+
],
|
|
2808
|
+
seal: {
|
|
2809
|
+
byHand: true
|
|
2810
|
+
}
|
|
2638
2811
|
},
|
|
2639
2812
|
{
|
|
2640
2813
|
id: "bread",
|
|
@@ -3176,7 +3349,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3176
3349
|
"lodge"
|
|
3177
3350
|
]
|
|
3178
3351
|
},
|
|
3179
|
-
model: "home_preserves"
|
|
3352
|
+
model: "home_preserves",
|
|
3353
|
+
seal: {
|
|
3354
|
+
byHand: true
|
|
3355
|
+
}
|
|
3180
3356
|
},
|
|
3181
3357
|
{
|
|
3182
3358
|
id: "dog_food",
|
|
@@ -3249,8 +3425,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
3249
3425
|
},
|
|
3250
3426
|
model: "sugar",
|
|
3251
3427
|
nonPerishable: true,
|
|
3428
|
+
powder: {
|
|
3429
|
+
color: 16184558
|
|
3430
|
+
},
|
|
3252
3431
|
estimated: [
|
|
3253
|
-
"nonPerishable"
|
|
3432
|
+
"nonPerishable",
|
|
3433
|
+
"powder"
|
|
3254
3434
|
]
|
|
3255
3435
|
},
|
|
3256
3436
|
{
|
|
@@ -3288,8 +3468,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
3288
3468
|
},
|
|
3289
3469
|
model: "salt",
|
|
3290
3470
|
nonPerishable: true,
|
|
3471
|
+
powder: {
|
|
3472
|
+
color: 15921902
|
|
3473
|
+
},
|
|
3291
3474
|
estimated: [
|
|
3292
|
-
"nonPerishable"
|
|
3475
|
+
"nonPerishable",
|
|
3476
|
+
"powder"
|
|
3293
3477
|
]
|
|
3294
3478
|
},
|
|
3295
3479
|
{
|
|
@@ -3326,7 +3510,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3326
3510
|
"supermarket"
|
|
3327
3511
|
]
|
|
3328
3512
|
},
|
|
3329
|
-
model: "cooking_oil"
|
|
3513
|
+
model: "cooking_oil",
|
|
3514
|
+
seal: {
|
|
3515
|
+
byHand: true
|
|
3516
|
+
}
|
|
3330
3517
|
},
|
|
3331
3518
|
{
|
|
3332
3519
|
id: "coffee",
|
|
@@ -3364,7 +3551,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
3364
3551
|
"police_station"
|
|
3365
3552
|
]
|
|
3366
3553
|
},
|
|
3367
|
-
model: "coffee"
|
|
3554
|
+
model: "coffee",
|
|
3555
|
+
powder: {
|
|
3556
|
+
color: 4861984
|
|
3557
|
+
},
|
|
3558
|
+
estimated: [
|
|
3559
|
+
"powder"
|
|
3560
|
+
]
|
|
3368
3561
|
},
|
|
3369
3562
|
{
|
|
3370
3563
|
id: "water_bottle",
|
|
@@ -3408,7 +3601,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3408
3601
|
estimated: [
|
|
3409
3602
|
"nonPerishable",
|
|
3410
3603
|
"fluid"
|
|
3411
|
-
]
|
|
3604
|
+
],
|
|
3605
|
+
seal: {
|
|
3606
|
+
byHand: true
|
|
3607
|
+
}
|
|
3412
3608
|
},
|
|
3413
3609
|
{
|
|
3414
3610
|
id: "water_jug_5l",
|
|
@@ -3448,7 +3644,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3448
3644
|
estimated: [
|
|
3449
3645
|
"nonPerishable",
|
|
3450
3646
|
"fluid"
|
|
3451
|
-
]
|
|
3647
|
+
],
|
|
3648
|
+
seal: {
|
|
3649
|
+
byHand: true
|
|
3650
|
+
}
|
|
3452
3651
|
},
|
|
3453
3652
|
{
|
|
3454
3653
|
id: "dirty_water",
|
|
@@ -3485,7 +3684,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3485
3684
|
estimated: [
|
|
3486
3685
|
"nonPerishable",
|
|
3487
3686
|
"fluid"
|
|
3488
|
-
]
|
|
3687
|
+
],
|
|
3688
|
+
seal: {
|
|
3689
|
+
byHand: true
|
|
3690
|
+
}
|
|
3489
3691
|
},
|
|
3490
3692
|
{
|
|
3491
3693
|
id: "soda_can",
|
|
@@ -3693,7 +3895,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3693
3895
|
},
|
|
3694
3896
|
estimated: [
|
|
3695
3897
|
"fluid"
|
|
3696
|
-
]
|
|
3898
|
+
],
|
|
3899
|
+
seal: {
|
|
3900
|
+
byHand: true
|
|
3901
|
+
}
|
|
3697
3902
|
},
|
|
3698
3903
|
{
|
|
3699
3904
|
id: "energy_drink",
|
|
@@ -3734,7 +3939,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
3734
3939
|
},
|
|
3735
3940
|
estimated: [
|
|
3736
3941
|
"fluid"
|
|
3737
|
-
]
|
|
3942
|
+
],
|
|
3943
|
+
seal: {
|
|
3944
|
+
byHand: true,
|
|
3945
|
+
spoilsWhenBreached: true
|
|
3946
|
+
}
|
|
3738
3947
|
},
|
|
3739
3948
|
{
|
|
3740
3949
|
id: "coconut_water",
|
|
@@ -3774,7 +3983,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3774
3983
|
},
|
|
3775
3984
|
estimated: [
|
|
3776
3985
|
"fluid"
|
|
3777
|
-
]
|
|
3986
|
+
],
|
|
3987
|
+
seal: {
|
|
3988
|
+
byHand: true
|
|
3989
|
+
}
|
|
3778
3990
|
},
|
|
3779
3991
|
{
|
|
3780
3992
|
id: "beer_can",
|
|
@@ -3874,7 +4086,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3874
4086
|
"parts",
|
|
3875
4087
|
"impact",
|
|
3876
4088
|
"leftover"
|
|
3877
|
-
]
|
|
4089
|
+
],
|
|
4090
|
+
seal: {
|
|
4091
|
+
byHand: true
|
|
4092
|
+
}
|
|
3878
4093
|
},
|
|
3879
4094
|
{
|
|
3880
4095
|
id: "communion_wine",
|
|
@@ -3930,7 +4145,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
3930
4145
|
"parts",
|
|
3931
4146
|
"impact",
|
|
3932
4147
|
"leftover"
|
|
3933
|
-
]
|
|
4148
|
+
],
|
|
4149
|
+
seal: {
|
|
4150
|
+
byHand: true
|
|
4151
|
+
}
|
|
3934
4152
|
},
|
|
3935
4153
|
{
|
|
3936
4154
|
id: "bandage",
|
|
@@ -10476,9 +10694,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
10476
10694
|
hydration: -8
|
|
10477
10695
|
},
|
|
10478
10696
|
shelfLife: 365,
|
|
10697
|
+
powder: {
|
|
10698
|
+
color: 15986662
|
|
10699
|
+
},
|
|
10479
10700
|
estimated: [
|
|
10480
10701
|
"nutrition",
|
|
10481
|
-
"shelfLife"
|
|
10702
|
+
"shelfLife",
|
|
10703
|
+
"powder"
|
|
10482
10704
|
]
|
|
10483
10705
|
},
|
|
10484
10706
|
{
|
|
@@ -10503,9 +10725,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
10503
10725
|
hydration: -5
|
|
10504
10726
|
},
|
|
10505
10727
|
shelfLife: 270,
|
|
10728
|
+
powder: {
|
|
10729
|
+
color: 14201962
|
|
10730
|
+
},
|
|
10506
10731
|
estimated: [
|
|
10507
10732
|
"nutrition",
|
|
10508
|
-
"shelfLife"
|
|
10733
|
+
"shelfLife",
|
|
10734
|
+
"powder"
|
|
10509
10735
|
]
|
|
10510
10736
|
},
|
|
10511
10737
|
{
|
|
@@ -12622,101 +12848,983 @@ var GameInteractablesHousehold = (() => {
|
|
|
12622
12848
|
]
|
|
12623
12849
|
}
|
|
12624
12850
|
];
|
|
12625
|
-
var
|
|
12851
|
+
var kinds_default = [
|
|
12626
12852
|
{
|
|
12627
|
-
id: "
|
|
12628
|
-
|
|
12853
|
+
id: "item",
|
|
12854
|
+
abstract: true,
|
|
12855
|
+
requires: [
|
|
12856
|
+
"physical",
|
|
12857
|
+
"destructible",
|
|
12858
|
+
"impact"
|
|
12859
|
+
],
|
|
12860
|
+
defaults: {
|
|
12861
|
+
impact: {
|
|
12862
|
+
response: "dent",
|
|
12863
|
+
pushImpulse: true
|
|
12864
|
+
}
|
|
12865
|
+
}
|
|
12629
12866
|
},
|
|
12630
12867
|
{
|
|
12631
|
-
id: "
|
|
12632
|
-
|
|
12868
|
+
id: "consumable",
|
|
12869
|
+
extends: "item",
|
|
12870
|
+
abstract: true,
|
|
12871
|
+
defaults: {
|
|
12872
|
+
leftover: "none"
|
|
12873
|
+
}
|
|
12633
12874
|
},
|
|
12634
12875
|
{
|
|
12635
|
-
id: "
|
|
12636
|
-
|
|
12876
|
+
id: "food_ready",
|
|
12877
|
+
extends: "consumable",
|
|
12878
|
+
requires: [
|
|
12879
|
+
"edible",
|
|
12880
|
+
"use_animation",
|
|
12881
|
+
"leftover"
|
|
12882
|
+
],
|
|
12883
|
+
defaults: {
|
|
12884
|
+
lootCategory: [
|
|
12885
|
+
"food"
|
|
12886
|
+
],
|
|
12887
|
+
parts: [
|
|
12888
|
+
{
|
|
12889
|
+
id: "body",
|
|
12890
|
+
material: "flesh_fruit"
|
|
12891
|
+
}
|
|
12892
|
+
],
|
|
12893
|
+
impact: {
|
|
12894
|
+
response: "squash",
|
|
12895
|
+
pushImpulse: true
|
|
12896
|
+
},
|
|
12897
|
+
use: {
|
|
12898
|
+
clip: "eat_food",
|
|
12899
|
+
sounds: [
|
|
12900
|
+
"chew"
|
|
12901
|
+
]
|
|
12902
|
+
},
|
|
12903
|
+
rawEffect: {
|
|
12904
|
+
sickChance: 0
|
|
12905
|
+
}
|
|
12906
|
+
}
|
|
12637
12907
|
},
|
|
12638
12908
|
{
|
|
12639
|
-
id: "
|
|
12640
|
-
|
|
12909
|
+
id: "canned_food",
|
|
12910
|
+
extends: "food_ready",
|
|
12911
|
+
defaults: {
|
|
12912
|
+
parts: [
|
|
12913
|
+
{
|
|
12914
|
+
id: "body",
|
|
12915
|
+
material: "steel",
|
|
12916
|
+
thickness: 2e-4
|
|
12917
|
+
}
|
|
12918
|
+
],
|
|
12919
|
+
impact: {
|
|
12920
|
+
response: "dent",
|
|
12921
|
+
pushImpulse: true,
|
|
12922
|
+
shed: false
|
|
12923
|
+
},
|
|
12924
|
+
use: {
|
|
12925
|
+
clip: "open_can_eat",
|
|
12926
|
+
sounds: [
|
|
12927
|
+
"can_open",
|
|
12928
|
+
"chew"
|
|
12929
|
+
]
|
|
12930
|
+
},
|
|
12931
|
+
seal: {
|
|
12932
|
+
openWith: [
|
|
12933
|
+
"can_opener",
|
|
12934
|
+
"pocket_knife",
|
|
12935
|
+
"knife",
|
|
12936
|
+
"tactical_knife"
|
|
12937
|
+
],
|
|
12938
|
+
spoilsWhenBreached: true
|
|
12939
|
+
},
|
|
12940
|
+
leftover: {
|
|
12941
|
+
item: "empty_can",
|
|
12942
|
+
despawnSeconds: 600
|
|
12943
|
+
}
|
|
12944
|
+
}
|
|
12641
12945
|
},
|
|
12642
12946
|
{
|
|
12643
|
-
id: "
|
|
12644
|
-
|
|
12947
|
+
id: "food_improves_cooked",
|
|
12948
|
+
extends: "consumable",
|
|
12949
|
+
requires: [
|
|
12950
|
+
"edible",
|
|
12951
|
+
"use_animation",
|
|
12952
|
+
"leftover"
|
|
12953
|
+
],
|
|
12954
|
+
defaults: {
|
|
12955
|
+
lootCategory: [
|
|
12956
|
+
"food"
|
|
12957
|
+
],
|
|
12958
|
+
parts: [
|
|
12959
|
+
{
|
|
12960
|
+
id: "body",
|
|
12961
|
+
material: "flesh_fruit"
|
|
12962
|
+
}
|
|
12963
|
+
],
|
|
12964
|
+
impact: {
|
|
12965
|
+
response: "squash",
|
|
12966
|
+
pushImpulse: true
|
|
12967
|
+
},
|
|
12968
|
+
use: {
|
|
12969
|
+
clip: "eat_food",
|
|
12970
|
+
sounds: [
|
|
12971
|
+
"chew"
|
|
12972
|
+
]
|
|
12973
|
+
},
|
|
12974
|
+
rawEffect: {
|
|
12975
|
+
sickChance: 0.05
|
|
12976
|
+
}
|
|
12977
|
+
}
|
|
12645
12978
|
},
|
|
12646
12979
|
{
|
|
12647
|
-
id: "
|
|
12648
|
-
|
|
12980
|
+
id: "food_needs_prep",
|
|
12981
|
+
extends: "consumable",
|
|
12982
|
+
requires: [
|
|
12983
|
+
"edible",
|
|
12984
|
+
"use_animation",
|
|
12985
|
+
"leftover",
|
|
12986
|
+
"preparation"
|
|
12987
|
+
],
|
|
12988
|
+
defaults: {
|
|
12989
|
+
lootCategory: [
|
|
12990
|
+
"food"
|
|
12991
|
+
],
|
|
12992
|
+
parts: [
|
|
12993
|
+
{
|
|
12994
|
+
id: "body",
|
|
12995
|
+
material: "flesh_fruit"
|
|
12996
|
+
}
|
|
12997
|
+
],
|
|
12998
|
+
impact: {
|
|
12999
|
+
response: "squash",
|
|
13000
|
+
pushImpulse: true
|
|
13001
|
+
},
|
|
13002
|
+
use: {
|
|
13003
|
+
clip: "eat_food",
|
|
13004
|
+
sounds: [
|
|
13005
|
+
"chew"
|
|
13006
|
+
]
|
|
13007
|
+
},
|
|
13008
|
+
rawEffect: {
|
|
13009
|
+
sickChance: 0.5
|
|
13010
|
+
}
|
|
13011
|
+
}
|
|
12649
13012
|
},
|
|
12650
13013
|
{
|
|
12651
|
-
id: "
|
|
12652
|
-
|
|
13014
|
+
id: "ingredient",
|
|
13015
|
+
extends: "consumable",
|
|
13016
|
+
requires: [
|
|
13017
|
+
"edible",
|
|
13018
|
+
"recipe_input"
|
|
13019
|
+
],
|
|
13020
|
+
defaults: {
|
|
13021
|
+
lootCategory: [
|
|
13022
|
+
"food"
|
|
13023
|
+
],
|
|
13024
|
+
parts: [
|
|
13025
|
+
{
|
|
13026
|
+
id: "body",
|
|
13027
|
+
material: "flesh_fruit"
|
|
13028
|
+
}
|
|
13029
|
+
],
|
|
13030
|
+
impact: {
|
|
13031
|
+
response: "squash",
|
|
13032
|
+
pushImpulse: true
|
|
13033
|
+
},
|
|
13034
|
+
rawEffect: {
|
|
13035
|
+
sickChance: 0
|
|
13036
|
+
}
|
|
13037
|
+
}
|
|
12653
13038
|
},
|
|
12654
13039
|
{
|
|
12655
|
-
id: "
|
|
12656
|
-
|
|
13040
|
+
id: "drink_ready",
|
|
13041
|
+
extends: "consumable",
|
|
13042
|
+
requires: [
|
|
13043
|
+
"edible",
|
|
13044
|
+
"use_animation",
|
|
13045
|
+
"leftover",
|
|
13046
|
+
"liquid_container"
|
|
13047
|
+
],
|
|
13048
|
+
defaults: {
|
|
13049
|
+
lootCategory: [
|
|
13050
|
+
"drink"
|
|
13051
|
+
],
|
|
13052
|
+
parts: [
|
|
13053
|
+
{
|
|
13054
|
+
id: "body",
|
|
13055
|
+
material: "plastic",
|
|
13056
|
+
thickness: 4e-4
|
|
13057
|
+
}
|
|
13058
|
+
],
|
|
13059
|
+
impact: {
|
|
13060
|
+
response: "dent",
|
|
13061
|
+
pushImpulse: true
|
|
13062
|
+
},
|
|
13063
|
+
use: {
|
|
13064
|
+
clip: "drink",
|
|
13065
|
+
sounds: [
|
|
13066
|
+
"gulp"
|
|
13067
|
+
]
|
|
13068
|
+
},
|
|
13069
|
+
leftover: {
|
|
13070
|
+
item: "pet_bottle",
|
|
13071
|
+
despawnSeconds: 600
|
|
13072
|
+
},
|
|
13073
|
+
rawEffect: {
|
|
13074
|
+
sickChance: 0
|
|
13075
|
+
}
|
|
13076
|
+
}
|
|
12657
13077
|
},
|
|
12658
13078
|
{
|
|
12659
|
-
id: "
|
|
12660
|
-
|
|
13079
|
+
id: "canned_drink",
|
|
13080
|
+
extends: "drink_ready",
|
|
13081
|
+
defaults: {
|
|
13082
|
+
parts: [
|
|
13083
|
+
{
|
|
13084
|
+
id: "body",
|
|
13085
|
+
material: "aluminium",
|
|
13086
|
+
thickness: 1e-4
|
|
13087
|
+
}
|
|
13088
|
+
],
|
|
13089
|
+
impact: {
|
|
13090
|
+
response: "dent",
|
|
13091
|
+
pushImpulse: true,
|
|
13092
|
+
shed: false
|
|
13093
|
+
},
|
|
13094
|
+
use: {
|
|
13095
|
+
clip: "open_can_drink",
|
|
13096
|
+
sounds: [
|
|
13097
|
+
"can_open",
|
|
13098
|
+
"gulp"
|
|
13099
|
+
]
|
|
13100
|
+
},
|
|
13101
|
+
seal: {
|
|
13102
|
+
byHand: true,
|
|
13103
|
+
spoilsWhenBreached: true
|
|
13104
|
+
},
|
|
13105
|
+
leftover: {
|
|
13106
|
+
item: "empty_can",
|
|
13107
|
+
despawnSeconds: 600
|
|
13108
|
+
}
|
|
13109
|
+
}
|
|
12661
13110
|
},
|
|
12662
13111
|
{
|
|
12663
|
-
id: "
|
|
12664
|
-
|
|
13112
|
+
id: "drink_untreated",
|
|
13113
|
+
extends: "consumable",
|
|
13114
|
+
requires: [
|
|
13115
|
+
"edible",
|
|
13116
|
+
"use_animation",
|
|
13117
|
+
"leftover",
|
|
13118
|
+
"liquid_container",
|
|
13119
|
+
"preparation"
|
|
13120
|
+
],
|
|
13121
|
+
defaults: {
|
|
13122
|
+
lootCategory: [
|
|
13123
|
+
"drink"
|
|
13124
|
+
],
|
|
13125
|
+
parts: [
|
|
13126
|
+
{
|
|
13127
|
+
id: "body",
|
|
13128
|
+
material: "plastic",
|
|
13129
|
+
thickness: 4e-4
|
|
13130
|
+
}
|
|
13131
|
+
],
|
|
13132
|
+
impact: {
|
|
13133
|
+
response: "dent",
|
|
13134
|
+
pushImpulse: true
|
|
13135
|
+
},
|
|
13136
|
+
use: {
|
|
13137
|
+
clip: "drink",
|
|
13138
|
+
sounds: [
|
|
13139
|
+
"gulp"
|
|
13140
|
+
]
|
|
13141
|
+
},
|
|
13142
|
+
leftover: {
|
|
13143
|
+
item: "pet_bottle",
|
|
13144
|
+
despawnSeconds: 600
|
|
13145
|
+
},
|
|
13146
|
+
rawEffect: {
|
|
13147
|
+
sickChance: 0.4
|
|
13148
|
+
}
|
|
13149
|
+
}
|
|
12665
13150
|
},
|
|
12666
13151
|
{
|
|
12667
|
-
id: "
|
|
12668
|
-
|
|
13152
|
+
id: "medicine",
|
|
13153
|
+
extends: "consumable",
|
|
13154
|
+
requires: [
|
|
13155
|
+
"use_animation",
|
|
13156
|
+
"leftover"
|
|
13157
|
+
],
|
|
13158
|
+
defaults: {
|
|
13159
|
+
lootCategory: [
|
|
13160
|
+
"medical"
|
|
13161
|
+
],
|
|
13162
|
+
parts: [
|
|
13163
|
+
{
|
|
13164
|
+
id: "body",
|
|
13165
|
+
material: "paper",
|
|
13166
|
+
thickness: 5e-4
|
|
13167
|
+
}
|
|
13168
|
+
],
|
|
13169
|
+
impact: {
|
|
13170
|
+
response: "tear",
|
|
13171
|
+
pushImpulse: true
|
|
13172
|
+
},
|
|
13173
|
+
use: {
|
|
13174
|
+
clip: "take_medicine",
|
|
13175
|
+
sounds: [
|
|
13176
|
+
"pill_shake"
|
|
13177
|
+
]
|
|
13178
|
+
}
|
|
13179
|
+
}
|
|
12669
13180
|
},
|
|
12670
13181
|
{
|
|
12671
|
-
id: "
|
|
12672
|
-
|
|
13182
|
+
id: "first_aid",
|
|
13183
|
+
extends: "medicine",
|
|
13184
|
+
defaults: {
|
|
13185
|
+
parts: [
|
|
13186
|
+
{
|
|
13187
|
+
id: "body",
|
|
13188
|
+
material: "fabric"
|
|
13189
|
+
}
|
|
13190
|
+
],
|
|
13191
|
+
use: {
|
|
13192
|
+
clip: "apply_dressing",
|
|
13193
|
+
sounds: [
|
|
13194
|
+
"cloth_rip"
|
|
13195
|
+
]
|
|
13196
|
+
}
|
|
13197
|
+
}
|
|
12673
13198
|
},
|
|
12674
13199
|
{
|
|
12675
|
-
id: "
|
|
12676
|
-
|
|
13200
|
+
id: "container",
|
|
13201
|
+
extends: "item",
|
|
13202
|
+
abstract: true
|
|
12677
13203
|
},
|
|
12678
13204
|
{
|
|
12679
|
-
id: "
|
|
12680
|
-
|
|
13205
|
+
id: "packaging",
|
|
13206
|
+
extends: "container",
|
|
13207
|
+
abstract: true
|
|
12681
13208
|
},
|
|
12682
13209
|
{
|
|
12683
|
-
id: "
|
|
12684
|
-
|
|
13210
|
+
id: "metal_can",
|
|
13211
|
+
extends: "packaging",
|
|
13212
|
+
defaults: {
|
|
13213
|
+
lootCategory: [
|
|
13214
|
+
"materials",
|
|
13215
|
+
"tools"
|
|
13216
|
+
],
|
|
13217
|
+
parts: [
|
|
13218
|
+
{
|
|
13219
|
+
id: "body",
|
|
13220
|
+
material: "steel",
|
|
13221
|
+
thickness: 2e-4
|
|
13222
|
+
}
|
|
13223
|
+
],
|
|
13224
|
+
impact: {
|
|
13225
|
+
response: "dent",
|
|
13226
|
+
pushImpulse: true,
|
|
13227
|
+
shed: false
|
|
13228
|
+
}
|
|
13229
|
+
}
|
|
12685
13230
|
},
|
|
12686
13231
|
{
|
|
12687
|
-
id: "
|
|
12688
|
-
|
|
13232
|
+
id: "glass_bottle",
|
|
13233
|
+
extends: "packaging",
|
|
13234
|
+
defaults: {
|
|
13235
|
+
lootCategory: [
|
|
13236
|
+
"materials"
|
|
13237
|
+
],
|
|
13238
|
+
parts: [
|
|
13239
|
+
{
|
|
13240
|
+
id: "body",
|
|
13241
|
+
material: "glass",
|
|
13242
|
+
thickness: 3e-3
|
|
13243
|
+
}
|
|
13244
|
+
],
|
|
13245
|
+
impact: {
|
|
13246
|
+
response: "shatter",
|
|
13247
|
+
pushImpulse: true,
|
|
13248
|
+
shed: true
|
|
13249
|
+
}
|
|
13250
|
+
}
|
|
12689
13251
|
},
|
|
12690
13252
|
{
|
|
12691
|
-
id: "
|
|
12692
|
-
|
|
13253
|
+
id: "plastic_bottle",
|
|
13254
|
+
extends: "packaging",
|
|
13255
|
+
defaults: {
|
|
13256
|
+
lootCategory: [
|
|
13257
|
+
"materials"
|
|
13258
|
+
],
|
|
13259
|
+
parts: [
|
|
13260
|
+
{
|
|
13261
|
+
id: "body",
|
|
13262
|
+
material: "plastic",
|
|
13263
|
+
thickness: 4e-4
|
|
13264
|
+
}
|
|
13265
|
+
],
|
|
13266
|
+
impact: {
|
|
13267
|
+
response: "dent",
|
|
13268
|
+
pushImpulse: true,
|
|
13269
|
+
shed: false
|
|
13270
|
+
}
|
|
13271
|
+
}
|
|
12693
13272
|
},
|
|
12694
13273
|
{
|
|
12695
|
-
id: "
|
|
12696
|
-
|
|
13274
|
+
id: "jar",
|
|
13275
|
+
extends: "packaging",
|
|
13276
|
+
defaults: {
|
|
13277
|
+
lootCategory: [
|
|
13278
|
+
"materials"
|
|
13279
|
+
],
|
|
13280
|
+
parts: [
|
|
13281
|
+
{
|
|
13282
|
+
id: "body",
|
|
13283
|
+
material: "glass",
|
|
13284
|
+
thickness: 4e-3
|
|
13285
|
+
}
|
|
13286
|
+
],
|
|
13287
|
+
impact: {
|
|
13288
|
+
response: "shatter",
|
|
13289
|
+
pushImpulse: true,
|
|
13290
|
+
shed: true
|
|
13291
|
+
}
|
|
13292
|
+
}
|
|
12697
13293
|
},
|
|
12698
13294
|
{
|
|
12699
|
-
id: "
|
|
12700
|
-
|
|
13295
|
+
id: "cookware",
|
|
13296
|
+
extends: "container",
|
|
13297
|
+
requires: [
|
|
13298
|
+
"heat_resistant"
|
|
13299
|
+
],
|
|
13300
|
+
defaults: {
|
|
13301
|
+
lootCategory: [
|
|
13302
|
+
"tools"
|
|
13303
|
+
],
|
|
13304
|
+
parts: [
|
|
13305
|
+
{
|
|
13306
|
+
id: "body",
|
|
13307
|
+
material: "steel",
|
|
13308
|
+
thickness: 2e-3
|
|
13309
|
+
}
|
|
13310
|
+
],
|
|
13311
|
+
impact: {
|
|
13312
|
+
response: "dent",
|
|
13313
|
+
pushImpulse: true
|
|
13314
|
+
}
|
|
13315
|
+
}
|
|
12701
13316
|
},
|
|
12702
13317
|
{
|
|
12703
|
-
id: "
|
|
12704
|
-
|
|
13318
|
+
id: "tableware",
|
|
13319
|
+
extends: "container",
|
|
13320
|
+
defaults: {
|
|
13321
|
+
lootCategory: [
|
|
13322
|
+
"tools"
|
|
13323
|
+
],
|
|
13324
|
+
parts: [
|
|
13325
|
+
{
|
|
13326
|
+
id: "body",
|
|
13327
|
+
material: "ceramic",
|
|
13328
|
+
thickness: 4e-3
|
|
13329
|
+
}
|
|
13330
|
+
],
|
|
13331
|
+
impact: {
|
|
13332
|
+
response: "shatter",
|
|
13333
|
+
pushImpulse: true,
|
|
13334
|
+
shed: true
|
|
13335
|
+
}
|
|
13336
|
+
}
|
|
12705
13337
|
},
|
|
12706
13338
|
{
|
|
12707
|
-
id: "
|
|
12708
|
-
|
|
13339
|
+
id: "tank",
|
|
13340
|
+
extends: "container",
|
|
13341
|
+
requires: [
|
|
13342
|
+
"liquid_container"
|
|
13343
|
+
],
|
|
13344
|
+
defaults: {
|
|
13345
|
+
lootCategory: [
|
|
13346
|
+
"tools",
|
|
13347
|
+
"outdoors"
|
|
13348
|
+
],
|
|
13349
|
+
parts: [
|
|
13350
|
+
{
|
|
13351
|
+
id: "body",
|
|
13352
|
+
material: "plastic",
|
|
13353
|
+
thickness: 3e-3
|
|
13354
|
+
}
|
|
13355
|
+
],
|
|
13356
|
+
impact: {
|
|
13357
|
+
response: "dent",
|
|
13358
|
+
pushImpulse: true
|
|
13359
|
+
}
|
|
13360
|
+
}
|
|
12709
13361
|
},
|
|
12710
13362
|
{
|
|
12711
|
-
id: "
|
|
12712
|
-
|
|
13363
|
+
id: "weapon",
|
|
13364
|
+
extends: "item",
|
|
13365
|
+
abstract: true,
|
|
13366
|
+
defaults: {
|
|
13367
|
+
lootCategory: [
|
|
13368
|
+
"melee"
|
|
13369
|
+
]
|
|
13370
|
+
}
|
|
12713
13371
|
},
|
|
12714
13372
|
{
|
|
12715
|
-
id: "
|
|
12716
|
-
|
|
13373
|
+
id: "melee",
|
|
13374
|
+
extends: "weapon",
|
|
13375
|
+
requires: [
|
|
13376
|
+
"weapon"
|
|
13377
|
+
],
|
|
13378
|
+
defaults: {
|
|
13379
|
+
parts: [
|
|
13380
|
+
{
|
|
13381
|
+
id: "body",
|
|
13382
|
+
material: "steel",
|
|
13383
|
+
thickness: 4e-3
|
|
13384
|
+
}
|
|
13385
|
+
],
|
|
13386
|
+
impact: {
|
|
13387
|
+
response: "dent",
|
|
13388
|
+
pushImpulse: true
|
|
13389
|
+
}
|
|
13390
|
+
}
|
|
12717
13391
|
},
|
|
12718
13392
|
{
|
|
12719
|
-
id: "
|
|
13393
|
+
id: "ranged",
|
|
13394
|
+
extends: "weapon",
|
|
13395
|
+
requires: [
|
|
13396
|
+
"weapon"
|
|
13397
|
+
],
|
|
13398
|
+
defaults: {
|
|
13399
|
+
parts: [
|
|
13400
|
+
{
|
|
13401
|
+
id: "body",
|
|
13402
|
+
material: "wood_hard",
|
|
13403
|
+
thickness: 0.02
|
|
13404
|
+
}
|
|
13405
|
+
],
|
|
13406
|
+
impact: {
|
|
13407
|
+
response: "break",
|
|
13408
|
+
pushImpulse: true
|
|
13409
|
+
}
|
|
13410
|
+
}
|
|
13411
|
+
},
|
|
13412
|
+
{
|
|
13413
|
+
id: "firearm",
|
|
13414
|
+
extends: "weapon",
|
|
13415
|
+
requires: [
|
|
13416
|
+
"weapon"
|
|
13417
|
+
],
|
|
13418
|
+
defaults: {
|
|
13419
|
+
parts: [
|
|
13420
|
+
{
|
|
13421
|
+
id: "body",
|
|
13422
|
+
material: "steel",
|
|
13423
|
+
thickness: 4e-3
|
|
13424
|
+
}
|
|
13425
|
+
],
|
|
13426
|
+
impact: {
|
|
13427
|
+
response: "dent",
|
|
13428
|
+
pushImpulse: true
|
|
13429
|
+
}
|
|
13430
|
+
}
|
|
13431
|
+
},
|
|
13432
|
+
{
|
|
13433
|
+
id: "ammo",
|
|
13434
|
+
extends: "weapon",
|
|
13435
|
+
requires: [
|
|
13436
|
+
"weapon"
|
|
13437
|
+
],
|
|
13438
|
+
defaults: {
|
|
13439
|
+
parts: [
|
|
13440
|
+
{
|
|
13441
|
+
id: "body",
|
|
13442
|
+
material: "steel",
|
|
13443
|
+
thickness: 2e-3
|
|
13444
|
+
}
|
|
13445
|
+
],
|
|
13446
|
+
impact: {
|
|
13447
|
+
response: "dent",
|
|
13448
|
+
pushImpulse: true
|
|
13449
|
+
}
|
|
13450
|
+
}
|
|
13451
|
+
},
|
|
13452
|
+
{
|
|
13453
|
+
id: "throwable",
|
|
13454
|
+
extends: "weapon",
|
|
13455
|
+
requires: [
|
|
13456
|
+
"weapon"
|
|
13457
|
+
],
|
|
13458
|
+
defaults: {
|
|
13459
|
+
parts: [
|
|
13460
|
+
{
|
|
13461
|
+
id: "body",
|
|
13462
|
+
material: "steel",
|
|
13463
|
+
thickness: 3e-3
|
|
13464
|
+
}
|
|
13465
|
+
],
|
|
13466
|
+
impact: {
|
|
13467
|
+
response: "dent",
|
|
13468
|
+
pushImpulse: true
|
|
13469
|
+
}
|
|
13470
|
+
}
|
|
13471
|
+
},
|
|
13472
|
+
{
|
|
13473
|
+
id: "wearable",
|
|
13474
|
+
extends: "item",
|
|
13475
|
+
abstract: true
|
|
13476
|
+
},
|
|
13477
|
+
{
|
|
13478
|
+
id: "clothing",
|
|
13479
|
+
extends: "wearable",
|
|
13480
|
+
requires: [
|
|
13481
|
+
"wearable"
|
|
13482
|
+
],
|
|
13483
|
+
defaults: {
|
|
13484
|
+
lootCategory: [
|
|
13485
|
+
"clothing"
|
|
13486
|
+
],
|
|
13487
|
+
parts: [
|
|
13488
|
+
{
|
|
13489
|
+
id: "body",
|
|
13490
|
+
material: "fabric",
|
|
13491
|
+
thickness: 2e-3
|
|
13492
|
+
}
|
|
13493
|
+
],
|
|
13494
|
+
impact: {
|
|
13495
|
+
response: "tear",
|
|
13496
|
+
pushImpulse: false
|
|
13497
|
+
}
|
|
13498
|
+
}
|
|
13499
|
+
},
|
|
13500
|
+
{
|
|
13501
|
+
id: "bag",
|
|
13502
|
+
extends: "wearable",
|
|
13503
|
+
requires: [
|
|
13504
|
+
"wearable"
|
|
13505
|
+
],
|
|
13506
|
+
defaults: {
|
|
13507
|
+
lootCategory: [
|
|
13508
|
+
"bags"
|
|
13509
|
+
],
|
|
13510
|
+
parts: [
|
|
13511
|
+
{
|
|
13512
|
+
id: "body",
|
|
13513
|
+
material: "fabric",
|
|
13514
|
+
thickness: 2e-3
|
|
13515
|
+
}
|
|
13516
|
+
],
|
|
13517
|
+
impact: {
|
|
13518
|
+
response: "tear",
|
|
13519
|
+
pushImpulse: false
|
|
13520
|
+
}
|
|
13521
|
+
}
|
|
13522
|
+
},
|
|
13523
|
+
{
|
|
13524
|
+
id: "equipment",
|
|
13525
|
+
extends: "item",
|
|
13526
|
+
abstract: true
|
|
13527
|
+
},
|
|
13528
|
+
{
|
|
13529
|
+
id: "tool",
|
|
13530
|
+
extends: "equipment",
|
|
13531
|
+
defaults: {
|
|
13532
|
+
lootCategory: [
|
|
13533
|
+
"tools",
|
|
13534
|
+
"outdoors",
|
|
13535
|
+
"medical",
|
|
13536
|
+
"collectibles",
|
|
13537
|
+
"electronics"
|
|
13538
|
+
],
|
|
13539
|
+
parts: [
|
|
13540
|
+
{
|
|
13541
|
+
id: "body",
|
|
13542
|
+
material: "steel",
|
|
13543
|
+
thickness: 3e-3
|
|
13544
|
+
}
|
|
13545
|
+
],
|
|
13546
|
+
impact: {
|
|
13547
|
+
response: "dent",
|
|
13548
|
+
pushImpulse: true
|
|
13549
|
+
}
|
|
13550
|
+
}
|
|
13551
|
+
},
|
|
13552
|
+
{
|
|
13553
|
+
id: "electronics",
|
|
13554
|
+
extends: "equipment",
|
|
13555
|
+
requires: [
|
|
13556
|
+
"battery"
|
|
13557
|
+
],
|
|
13558
|
+
defaults: {
|
|
13559
|
+
lootCategory: [
|
|
13560
|
+
"electronics",
|
|
13561
|
+
"tools",
|
|
13562
|
+
"fuel"
|
|
13563
|
+
],
|
|
13564
|
+
parts: [
|
|
13565
|
+
{
|
|
13566
|
+
id: "body",
|
|
13567
|
+
material: "plastic",
|
|
13568
|
+
thickness: 2e-3
|
|
13569
|
+
}
|
|
13570
|
+
],
|
|
13571
|
+
impact: {
|
|
13572
|
+
response: "break",
|
|
13573
|
+
pushImpulse: true
|
|
13574
|
+
}
|
|
13575
|
+
}
|
|
13576
|
+
},
|
|
13577
|
+
{
|
|
13578
|
+
id: "fuel",
|
|
13579
|
+
extends: "equipment",
|
|
13580
|
+
requires: [
|
|
13581
|
+
"liquid_container"
|
|
13582
|
+
],
|
|
13583
|
+
defaults: {
|
|
13584
|
+
lootCategory: [
|
|
13585
|
+
"fuel"
|
|
13586
|
+
],
|
|
13587
|
+
parts: [
|
|
13588
|
+
{
|
|
13589
|
+
id: "body",
|
|
13590
|
+
material: "plastic",
|
|
13591
|
+
thickness: 2e-3
|
|
13592
|
+
}
|
|
13593
|
+
],
|
|
13594
|
+
impact: {
|
|
13595
|
+
response: "dent",
|
|
13596
|
+
pushImpulse: true
|
|
13597
|
+
}
|
|
13598
|
+
}
|
|
13599
|
+
},
|
|
13600
|
+
{
|
|
13601
|
+
id: "camping",
|
|
13602
|
+
extends: "equipment",
|
|
13603
|
+
defaults: {
|
|
13604
|
+
lootCategory: [
|
|
13605
|
+
"tools",
|
|
13606
|
+
"outdoors",
|
|
13607
|
+
"fuel",
|
|
13608
|
+
"electronics",
|
|
13609
|
+
"clothing"
|
|
13610
|
+
],
|
|
13611
|
+
parts: [
|
|
13612
|
+
{
|
|
13613
|
+
id: "body",
|
|
13614
|
+
material: "fabric",
|
|
13615
|
+
thickness: 2e-3
|
|
13616
|
+
}
|
|
13617
|
+
],
|
|
13618
|
+
impact: {
|
|
13619
|
+
response: "tear",
|
|
13620
|
+
pushImpulse: false
|
|
13621
|
+
}
|
|
13622
|
+
}
|
|
13623
|
+
},
|
|
13624
|
+
{
|
|
13625
|
+
id: "material_misc",
|
|
13626
|
+
extends: "item",
|
|
13627
|
+
abstract: true
|
|
13628
|
+
},
|
|
13629
|
+
{
|
|
13630
|
+
id: "material",
|
|
13631
|
+
extends: "material_misc",
|
|
13632
|
+
defaults: {
|
|
13633
|
+
lootCategory: [
|
|
13634
|
+
"materials",
|
|
13635
|
+
"outdoors"
|
|
13636
|
+
],
|
|
13637
|
+
parts: [
|
|
13638
|
+
{
|
|
13639
|
+
id: "body",
|
|
13640
|
+
material: "wood_soft",
|
|
13641
|
+
thickness: 0.02
|
|
13642
|
+
}
|
|
13643
|
+
],
|
|
13644
|
+
impact: {
|
|
13645
|
+
response: "break",
|
|
13646
|
+
pushImpulse: true
|
|
13647
|
+
}
|
|
13648
|
+
}
|
|
13649
|
+
},
|
|
13650
|
+
{
|
|
13651
|
+
id: "book",
|
|
13652
|
+
extends: "material_misc",
|
|
13653
|
+
defaults: {
|
|
13654
|
+
lootCategory: [
|
|
13655
|
+
"books",
|
|
13656
|
+
"collectibles"
|
|
13657
|
+
],
|
|
13658
|
+
parts: [
|
|
13659
|
+
{
|
|
13660
|
+
id: "body",
|
|
13661
|
+
material: "paper",
|
|
13662
|
+
thickness: 5e-3
|
|
13663
|
+
}
|
|
13664
|
+
],
|
|
13665
|
+
impact: {
|
|
13666
|
+
response: "tear",
|
|
13667
|
+
pushImpulse: false
|
|
13668
|
+
}
|
|
13669
|
+
}
|
|
13670
|
+
},
|
|
13671
|
+
{
|
|
13672
|
+
id: "key",
|
|
13673
|
+
extends: "material_misc",
|
|
13674
|
+
defaults: {
|
|
13675
|
+
lootCategory: [
|
|
13676
|
+
"keys"
|
|
13677
|
+
],
|
|
13678
|
+
parts: [
|
|
13679
|
+
{
|
|
13680
|
+
id: "body",
|
|
13681
|
+
material: "steel",
|
|
13682
|
+
thickness: 2e-3
|
|
13683
|
+
}
|
|
13684
|
+
],
|
|
13685
|
+
impact: {
|
|
13686
|
+
response: "dent",
|
|
13687
|
+
pushImpulse: true
|
|
13688
|
+
}
|
|
13689
|
+
}
|
|
13690
|
+
},
|
|
13691
|
+
{
|
|
13692
|
+
id: "collectible",
|
|
13693
|
+
extends: "material_misc",
|
|
13694
|
+
defaults: {
|
|
13695
|
+
lootCategory: [
|
|
13696
|
+
"collectibles"
|
|
13697
|
+
],
|
|
13698
|
+
parts: [
|
|
13699
|
+
{
|
|
13700
|
+
id: "body",
|
|
13701
|
+
material: "paper",
|
|
13702
|
+
thickness: 1e-3
|
|
13703
|
+
}
|
|
13704
|
+
],
|
|
13705
|
+
impact: {
|
|
13706
|
+
response: "tear",
|
|
13707
|
+
pushImpulse: false
|
|
13708
|
+
}
|
|
13709
|
+
}
|
|
13710
|
+
},
|
|
13711
|
+
{
|
|
13712
|
+
id: "hygiene",
|
|
13713
|
+
extends: "material_misc",
|
|
13714
|
+
defaults: {
|
|
13715
|
+
lootCategory: [
|
|
13716
|
+
"medical",
|
|
13717
|
+
"clothing"
|
|
13718
|
+
],
|
|
13719
|
+
parts: [
|
|
13720
|
+
{
|
|
13721
|
+
id: "body",
|
|
13722
|
+
material: "plastic",
|
|
13723
|
+
thickness: 1e-3
|
|
13724
|
+
}
|
|
13725
|
+
],
|
|
13726
|
+
impact: {
|
|
13727
|
+
response: "dent",
|
|
13728
|
+
pushImpulse: true
|
|
13729
|
+
}
|
|
13730
|
+
}
|
|
13731
|
+
}
|
|
13732
|
+
];
|
|
13733
|
+
var places_default = [
|
|
13734
|
+
{
|
|
13735
|
+
id: "house",
|
|
13736
|
+
name: "House"
|
|
13737
|
+
},
|
|
13738
|
+
{
|
|
13739
|
+
id: "apartment",
|
|
13740
|
+
name: "Apartment building"
|
|
13741
|
+
},
|
|
13742
|
+
{
|
|
13743
|
+
id: "supermarket",
|
|
13744
|
+
name: "Supermarket"
|
|
13745
|
+
},
|
|
13746
|
+
{
|
|
13747
|
+
id: "pharmacy",
|
|
13748
|
+
name: "Pharmacy"
|
|
13749
|
+
},
|
|
13750
|
+
{
|
|
13751
|
+
id: "gun_shop",
|
|
13752
|
+
name: "Gun and hunting shop"
|
|
13753
|
+
},
|
|
13754
|
+
{
|
|
13755
|
+
id: "mall",
|
|
13756
|
+
name: "Mall"
|
|
13757
|
+
},
|
|
13758
|
+
{
|
|
13759
|
+
id: "police_station",
|
|
13760
|
+
name: "Police station"
|
|
13761
|
+
},
|
|
13762
|
+
{
|
|
13763
|
+
id: "hospital",
|
|
13764
|
+
name: "Hospital"
|
|
13765
|
+
},
|
|
13766
|
+
{
|
|
13767
|
+
id: "school",
|
|
13768
|
+
name: "School"
|
|
13769
|
+
},
|
|
13770
|
+
{
|
|
13771
|
+
id: "gas_station",
|
|
13772
|
+
name: "Gas station"
|
|
13773
|
+
},
|
|
13774
|
+
{
|
|
13775
|
+
id: "church",
|
|
13776
|
+
name: "Church"
|
|
13777
|
+
},
|
|
13778
|
+
{
|
|
13779
|
+
id: "warehouse",
|
|
13780
|
+
name: "Warehouse and metalworks"
|
|
13781
|
+
},
|
|
13782
|
+
{
|
|
13783
|
+
id: "farm",
|
|
13784
|
+
name: "Farm"
|
|
13785
|
+
},
|
|
13786
|
+
{
|
|
13787
|
+
id: "military_base",
|
|
13788
|
+
name: "Military base and roadblock"
|
|
13789
|
+
},
|
|
13790
|
+
{
|
|
13791
|
+
id: "workshop",
|
|
13792
|
+
name: "Car workshop"
|
|
13793
|
+
},
|
|
13794
|
+
{
|
|
13795
|
+
id: "car",
|
|
13796
|
+
name: "Abandoned car"
|
|
13797
|
+
},
|
|
13798
|
+
{
|
|
13799
|
+
id: "road",
|
|
13800
|
+
name: "Road and camp"
|
|
13801
|
+
},
|
|
13802
|
+
{
|
|
13803
|
+
id: "train",
|
|
13804
|
+
name: "Derailed train"
|
|
13805
|
+
},
|
|
13806
|
+
{
|
|
13807
|
+
id: "prison",
|
|
13808
|
+
name: "Prison"
|
|
13809
|
+
},
|
|
13810
|
+
{
|
|
13811
|
+
id: "mine",
|
|
13812
|
+
name: "Mine and quarry"
|
|
13813
|
+
},
|
|
13814
|
+
{
|
|
13815
|
+
id: "docks",
|
|
13816
|
+
name: "Docks and fish market"
|
|
13817
|
+
},
|
|
13818
|
+
{
|
|
13819
|
+
id: "lodge",
|
|
13820
|
+
name: "Inn and chalet"
|
|
13821
|
+
},
|
|
13822
|
+
{
|
|
13823
|
+
id: "dam",
|
|
13824
|
+
name: "Hydroelectric dam"
|
|
13825
|
+
},
|
|
13826
|
+
{
|
|
13827
|
+
id: "zombie_corpse",
|
|
12720
13828
|
name: "Zombie corpse"
|
|
12721
13829
|
}
|
|
12722
13830
|
];
|
|
@@ -16247,46 +17355,277 @@ var GameInteractablesHousehold = (() => {
|
|
|
16247
17355
|
aliasOf: housePoolsFile.aliasOf
|
|
16248
17356
|
};
|
|
16249
17357
|
var GOODS_PROVENANCE = provenance_default;
|
|
16250
|
-
var
|
|
16251
|
-
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
|
|
16255
|
-
|
|
16256
|
-
useEffects: GOODS_USE_EFFECTS,
|
|
16257
|
-
recipes: GOODS_RECIPES,
|
|
16258
|
-
pools: GOODS_HOUSE_POOLS.pools,
|
|
16259
|
-
poolAliases: { ...GOODS_HOUSE_POOLS.aliasOf, ...FLOORPLAN_POOL_ALIASES }
|
|
17358
|
+
var GOODS_KINDS = kinds_default;
|
|
17359
|
+
var item_contracts_default = {
|
|
17360
|
+
densityKgPerLitre: { min: 0.02, max: 22 },
|
|
17361
|
+
impactResponses: ["dent", "break", "shatter", "tear", "squash", "pierce", "none"],
|
|
17362
|
+
heatResistantMaterials: ["steel", "cast_iron", "aluminium", "copper", "ceramic", "tempered_glass", "stone", "brick"],
|
|
17363
|
+
bodySlots: ["head", "eyes", "torso", "arms", "hands", "legs", "feet", "over"]
|
|
16260
17364
|
};
|
|
16261
|
-
var
|
|
16262
|
-
|
|
16263
|
-
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
|
|
16289
|
-
|
|
17365
|
+
var IMPACT_RESPONSES = item_contracts_default.impactResponses;
|
|
17366
|
+
var HEAT_RESISTANT_MATERIALS = item_contracts_default.heatResistantMaterials;
|
|
17367
|
+
var DENSITY_KG_PER_LITRE = item_contracts_default.densityKgPerLitre;
|
|
17368
|
+
var BODY_SLOTS = item_contracts_default.bodySlots;
|
|
17369
|
+
var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
|
|
17370
|
+
var LITRES_PER_CUBIC_METRE = 1e3;
|
|
17371
|
+
var isNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
17372
|
+
var isFraction = (value) => isNumber(value) && value >= 0 && value <= 1;
|
|
17373
|
+
var catalogOf = (options) => options.items ?? GOODS_ITEMS;
|
|
17374
|
+
var parts = (item) => Array.isArray(item.parts) ? item.parts : [];
|
|
17375
|
+
var physical = (options) => {
|
|
17376
|
+
const range = options.density ?? DENSITY_KG_PER_LITRE;
|
|
17377
|
+
return {
|
|
17378
|
+
id: "physical",
|
|
17379
|
+
check: (item) => {
|
|
17380
|
+
const problems = [];
|
|
17381
|
+
const size = item.size;
|
|
17382
|
+
const sizeOk = Array.isArray(size) && size.length === 3 && size.every((side) => isNumber(side) && side > 0);
|
|
17383
|
+
if (!sizeOk) problems.push("size must be 3 finite positive numbers in metres");
|
|
17384
|
+
if (!isNumber(item.weight) || item.weight < 0) problems.push("weight must be a finite number >= 0 (kg)");
|
|
17385
|
+
if (sizeOk && isNumber(item.weight) && item.weight > 0) {
|
|
17386
|
+
const [width, height, depth] = size;
|
|
17387
|
+
const density = item.weight / (width * height * depth * LITRES_PER_CUBIC_METRE);
|
|
17388
|
+
if (density < range.min || density > range.max) problems.push(`density ${Number(density.toPrecision(2))} kg/L is outside ${range.min}..${range.max}`);
|
|
17389
|
+
}
|
|
17390
|
+
return problems;
|
|
17391
|
+
}
|
|
17392
|
+
};
|
|
17393
|
+
};
|
|
17394
|
+
var destructible = (options) => {
|
|
17395
|
+
const materials = options.materials ? new Set(options.materials) : void 0;
|
|
17396
|
+
return {
|
|
17397
|
+
id: "destructible",
|
|
17398
|
+
check: (item) => {
|
|
17399
|
+
const list = parts(item);
|
|
17400
|
+
if (list.length === 0) return ["missing parts"];
|
|
17401
|
+
const problems = [];
|
|
17402
|
+
const seen = /* @__PURE__ */ new Set();
|
|
17403
|
+
for (const part of list) {
|
|
17404
|
+
if (typeof part.id !== "string" || part.id === "") problems.push("a part has no id");
|
|
17405
|
+
else if (seen.has(part.id)) problems.push(`duplicate part "${part.id}"`);
|
|
17406
|
+
else seen.add(part.id);
|
|
17407
|
+
if (typeof part.material !== "string" || part.material === "") problems.push(`part "${part.id}" has no material`);
|
|
17408
|
+
else if (materials && !materials.has(part.material)) problems.push(`part "${part.id}" has unknown material "${part.material}"`);
|
|
17409
|
+
if (part.thickness !== void 0 && !(isNumber(part.thickness) && part.thickness > 0)) problems.push(`part "${part.id}" thickness must be a positive number`);
|
|
17410
|
+
}
|
|
17411
|
+
if (problems.length === 0 && list.every((part) => part.shape !== void 0 && part.position !== void 0)) {
|
|
17412
|
+
const report = checkSpec({ parts: list }, materials ? { materials } : {});
|
|
17413
|
+
for (const problem of report.problems) problems.push(`spec: ${problem}`);
|
|
17414
|
+
}
|
|
17415
|
+
return problems;
|
|
17416
|
+
}
|
|
17417
|
+
};
|
|
17418
|
+
};
|
|
17419
|
+
var impact = {
|
|
17420
|
+
id: "impact",
|
|
17421
|
+
check: (item) => {
|
|
17422
|
+
const value = item.impact;
|
|
17423
|
+
if (!value) return ["missing impact"];
|
|
17424
|
+
const problems = [];
|
|
17425
|
+
if (!IMPACT_RESPONSES.includes(value.response ?? "")) problems.push(`impact.response must be one of ${IMPACT_RESPONSES.join(", ")}`);
|
|
17426
|
+
if (typeof value.pushImpulse !== "boolean") problems.push("impact.pushImpulse must be true or false");
|
|
17427
|
+
if (value.shed !== void 0 && typeof value.shed !== "boolean") problems.push("impact.shed must be true or false");
|
|
17428
|
+
return problems;
|
|
17429
|
+
}
|
|
17430
|
+
};
|
|
17431
|
+
var useAnimation = {
|
|
17432
|
+
id: "use_animation",
|
|
17433
|
+
check: (item) => {
|
|
17434
|
+
const problems = [];
|
|
17435
|
+
const clip = item.use?.clip;
|
|
17436
|
+
if (clip === void 0) problems.push("missing use.clip");
|
|
17437
|
+
else if (!SNAKE_CASE.test(clip)) problems.push(`use.clip "${clip}" must be snake_case`);
|
|
17438
|
+
const sounds = item.use?.sounds;
|
|
17439
|
+
if (!Array.isArray(sounds) || sounds.length === 0 || sounds.some((sound) => typeof sound !== "string" || sound === "")) problems.push("missing use.sounds (a non-empty list of sound ids)");
|
|
17440
|
+
return problems;
|
|
17441
|
+
}
|
|
17442
|
+
};
|
|
17443
|
+
var leftover = (options) => {
|
|
17444
|
+
const ids = new Set(catalogOf(options).map((item) => item.id));
|
|
17445
|
+
return {
|
|
17446
|
+
id: "leftover",
|
|
17447
|
+
check: (item) => {
|
|
17448
|
+
const value = item.leftover;
|
|
17449
|
+
if (value === void 0) return ["missing leftover"];
|
|
17450
|
+
if (value === "none") return [];
|
|
17451
|
+
const problems = [];
|
|
17452
|
+
if (typeof value !== "object" || value === null) return ['leftover must be an object or "none"'];
|
|
17453
|
+
if (typeof value.item !== "string" || value.item === "") problems.push("missing leftover.item");
|
|
17454
|
+
else if (!ids.has(value.item)) problems.push(`leftover.item "${value.item}" is not in the catalog`);
|
|
17455
|
+
if (!isNumber(value.despawnSeconds) || value.despawnSeconds < 0) problems.push("missing leftover.despawnSeconds");
|
|
17456
|
+
return problems;
|
|
17457
|
+
}
|
|
17458
|
+
};
|
|
17459
|
+
};
|
|
17460
|
+
var edible = {
|
|
17461
|
+
id: "edible",
|
|
17462
|
+
check: (item) => {
|
|
17463
|
+
const problems = [];
|
|
17464
|
+
const nutrition = item.nutrition;
|
|
17465
|
+
if (!nutrition || !(isNumber(nutrition.satiety) || isNumber(nutrition.hydration))) problems.push("missing nutrition");
|
|
17466
|
+
if (item.shelfLife === void 0 && item.nonPerishable !== true) problems.push("missing shelfLife (a number of days, or nonPerishable: true)");
|
|
17467
|
+
else if (item.shelfLife !== void 0 && !(isNumber(item.shelfLife) && item.shelfLife > 0)) problems.push("shelfLife must be a positive number of days");
|
|
17468
|
+
if (!isFraction(item.rawEffect?.sickChance)) problems.push("missing rawEffect.sickChance (0..1)");
|
|
17469
|
+
return problems;
|
|
17470
|
+
}
|
|
17471
|
+
};
|
|
17472
|
+
var inputsOf = (recipe) => recipe.inputs ?? [];
|
|
17473
|
+
var toolsOf = (recipe) => recipe.tools ?? [];
|
|
17474
|
+
var consumes = (input, item) => {
|
|
17475
|
+
if (input.item === item.id) return true;
|
|
17476
|
+
if (input.any?.includes(item.id)) return true;
|
|
17477
|
+
if (!input.match) return false;
|
|
17478
|
+
const entries = Object.entries(input.match);
|
|
17479
|
+
return entries.length > 0 && entries.every(([key, value]) => item[key] === value);
|
|
17480
|
+
};
|
|
17481
|
+
var recipeInput = (options) => {
|
|
17482
|
+
const recipes = options.recipes ?? GOODS_RECIPES;
|
|
17483
|
+
return {
|
|
17484
|
+
id: "recipe_input",
|
|
17485
|
+
check: (item) => recipes.some((recipe) => inputsOf(recipe).some((input) => consumes(input, item))) ? [] : ["is not an input of any recipe"]
|
|
17486
|
+
};
|
|
17487
|
+
};
|
|
17488
|
+
var preparation = (options) => {
|
|
17489
|
+
const recipes = options.recipes ?? GOODS_RECIPES;
|
|
17490
|
+
const cookware = new Set(catalogOf(options).filter((item) => item.kind === "cookware").map((item) => item.id));
|
|
17491
|
+
return {
|
|
17492
|
+
id: "preparation",
|
|
17493
|
+
check: (item) => {
|
|
17494
|
+
const usable = recipes.filter((recipe) => inputsOf(recipe).some((input) => consumes(input, item)));
|
|
17495
|
+
if (usable.length === 0) return ["has no recipe that prepares it"];
|
|
17496
|
+
const prepares = usable.some((recipe) => {
|
|
17497
|
+
const heat = toolsOf(recipe).some((tool) => tool.world?.includes("fire"));
|
|
17498
|
+
const vessel = [...inputsOf(recipe).flatMap((input) => input.item ? [input.item] : []), ...toolsOf(recipe).flatMap((tool) => tool.anyOf ?? [])].some((id) => cookware.has(id));
|
|
17499
|
+
return heat && vessel;
|
|
17500
|
+
});
|
|
17501
|
+
return prepares ? [] : ["has no recipe that needs fire and a cooking vessel"];
|
|
17502
|
+
}
|
|
17503
|
+
};
|
|
17504
|
+
};
|
|
17505
|
+
var liquidContainer = {
|
|
17506
|
+
id: "liquid_container",
|
|
17507
|
+
check: (item) => {
|
|
17508
|
+
const fluid = item.fluid;
|
|
17509
|
+
if (fluid) {
|
|
17510
|
+
const problems = [];
|
|
17511
|
+
if (typeof fluid.liquid !== "string" || !SNAKE_CASE.test(fluid.liquid)) problems.push("fluid.liquid must be a liquid id");
|
|
17512
|
+
if (!isNumber(fluid.liters) || fluid.liters < 0) problems.push("fluid.liters must be a number >= 0");
|
|
17513
|
+
return problems;
|
|
17514
|
+
}
|
|
17515
|
+
return isNumber(item.container?.capacityLiters) && (item.container?.capacityLiters ?? 0) > 0 ? [] : ["missing fluid { liquid, liters } or container.capacityLiters"];
|
|
17516
|
+
}
|
|
17517
|
+
};
|
|
17518
|
+
var heatResistant = (options) => {
|
|
17519
|
+
const allowed = new Set(options.heatResistant ?? HEAT_RESISTANT_MATERIALS);
|
|
17520
|
+
return {
|
|
17521
|
+
id: "heat_resistant",
|
|
17522
|
+
check: (item) => parts(item).filter((part) => !allowed.has(part.material)).map((part) => `part "${part.id}" is ${part.material}, which does not take a flame`)
|
|
17523
|
+
};
|
|
17524
|
+
};
|
|
17525
|
+
var weapon = (options) => {
|
|
17526
|
+
const weaponIds = options.weaponIds ? new Set(options.weaponIds) : void 0;
|
|
17527
|
+
const calibers = options.calibers ? new Set(options.calibers) : void 0;
|
|
17528
|
+
return {
|
|
17529
|
+
id: "weapon",
|
|
17530
|
+
check: (item, ctx) => {
|
|
17531
|
+
if (ctx.chain.includes("ammo")) {
|
|
17532
|
+
if (typeof item.caliber !== "string" || item.caliber === "") return ["missing caliber"];
|
|
17533
|
+
return calibers && !calibers.has(item.caliber) ? [`caliber "${item.caliber}" is not in the arsenal`] : [];
|
|
17534
|
+
}
|
|
17535
|
+
if (typeof item.weapon !== "string" || item.weapon === "") return ["missing weapon (the arsenal id)"];
|
|
17536
|
+
return weaponIds && !weaponIds.has(item.weapon) ? [`weapon "${item.weapon}" is not in the arsenal`] : [];
|
|
17537
|
+
}
|
|
17538
|
+
};
|
|
17539
|
+
};
|
|
17540
|
+
var wearable = {
|
|
17541
|
+
id: "wearable",
|
|
17542
|
+
check: (item, ctx) => {
|
|
17543
|
+
const problems = [];
|
|
17544
|
+
const { protection, carry } = item;
|
|
17545
|
+
if (!protection && !carry) return [ctx.chain.includes("bag") ? "missing carry" : "missing protection"];
|
|
17546
|
+
if (ctx.chain.includes("bag") && !carry) problems.push("missing carry");
|
|
17547
|
+
if (ctx.chain.includes("clothing") && !protection) problems.push("missing protection");
|
|
17548
|
+
if (protection) {
|
|
17549
|
+
const slots = protection.slots;
|
|
17550
|
+
if (!Array.isArray(slots) || slots.length === 0) problems.push("protection.slots must list at least one body slot");
|
|
17551
|
+
else for (const slot of slots) if (!BODY_SLOTS.includes(slot)) problems.push(`protection.slots has unknown slot "${slot}"`);
|
|
17552
|
+
for (const field of ["bite", "scratch", "warmth"]) if (protection[field] !== void 0 && !isFraction(protection[field])) problems.push(`protection.${field} must be between 0 and 1`);
|
|
17553
|
+
}
|
|
17554
|
+
if (carry) {
|
|
17555
|
+
if (!(isNumber(carry.capacityKg) && carry.capacityKg > 0)) problems.push("carry.capacityKg must be positive");
|
|
17556
|
+
if (!isFraction(carry.weightReduction)) problems.push("carry.weightReduction must be between 0 and 1");
|
|
17557
|
+
if (!(isNumber(carry.quickSlots) && carry.quickSlots >= 0)) problems.push("carry.quickSlots must be >= 0");
|
|
17558
|
+
}
|
|
17559
|
+
return problems;
|
|
17560
|
+
}
|
|
17561
|
+
};
|
|
17562
|
+
var battery = {
|
|
17563
|
+
id: "battery",
|
|
17564
|
+
check: (item) => isNumber(item.charge?.lossPerMonth) && (item.charge?.lossPerMonth ?? -1) >= 0 ? [] : ["missing charge.lossPerMonth"]
|
|
17565
|
+
};
|
|
17566
|
+
var createItemContracts = (options = {}) => [
|
|
17567
|
+
physical(options),
|
|
17568
|
+
destructible(options),
|
|
17569
|
+
impact,
|
|
17570
|
+
useAnimation,
|
|
17571
|
+
leftover(options),
|
|
17572
|
+
edible,
|
|
17573
|
+
preparation(options),
|
|
17574
|
+
recipeInput(options),
|
|
17575
|
+
liquidContainer,
|
|
17576
|
+
heatResistant(options),
|
|
17577
|
+
weapon(options),
|
|
17578
|
+
wearable,
|
|
17579
|
+
battery
|
|
17580
|
+
];
|
|
17581
|
+
var ITEM_CONTRACTS = createItemContracts();
|
|
17582
|
+
var createGoodsKinds = (options = {}) => defineCategories(GOODS_KINDS, options);
|
|
17583
|
+
var KINDS = createGoodsKinds();
|
|
17584
|
+
var withSeal = (item) => {
|
|
17585
|
+
const kind = item.kind;
|
|
17586
|
+
const seal = kind && KINDS.has(kind) ? KINDS.defaults(kind).seal : void 0;
|
|
17587
|
+
return seal ? { ...item, seal: { ...seal, ...item.seal } } : item;
|
|
17588
|
+
};
|
|
17589
|
+
var goodsPack = {
|
|
17590
|
+
id: "goods",
|
|
17591
|
+
items: GOODS_ITEMS.map(withSeal),
|
|
17592
|
+
categories: GOODS_CATEGORIES,
|
|
17593
|
+
places: GOODS_PLACES,
|
|
17594
|
+
containers: GOODS_CONTAINERS,
|
|
17595
|
+
useEffects: GOODS_USE_EFFECTS,
|
|
17596
|
+
recipes: GOODS_RECIPES,
|
|
17597
|
+
pools: GOODS_HOUSE_POOLS.pools,
|
|
17598
|
+
poolAliases: { ...GOODS_HOUSE_POOLS.aliasOf, ...FLOORPLAN_POOL_ALIASES }
|
|
17599
|
+
};
|
|
17600
|
+
var en_default = {
|
|
17601
|
+
"item.canned_beans": "Canned beans",
|
|
17602
|
+
"item.canned_sardines": "Canned sardines",
|
|
17603
|
+
"item.canned_corn_and_peas": "Canned corn and peas",
|
|
17604
|
+
"item.canned_sausages": "Canned sausages",
|
|
17605
|
+
"item.condensed_milk": "Condensed milk",
|
|
17606
|
+
"item.military_ration": "Army field ration",
|
|
17607
|
+
"item.rice": "Rice (1 kg)",
|
|
17608
|
+
"item.beans": "Beans (1 kg)",
|
|
17609
|
+
"item.pasta": "Pasta",
|
|
17610
|
+
"item.instant_noodles": "Instant noodles",
|
|
17611
|
+
"item.cassava_flour": "Cassava flour (1 kg)",
|
|
17612
|
+
"item.biscuits": "Biscuits",
|
|
17613
|
+
"item.snack_chips": "Bagged snack chips",
|
|
17614
|
+
"item.chocolate_bar": "Chocolate bar",
|
|
17615
|
+
"item.rapadura": "Rapadura (raw cane sugar block)",
|
|
17616
|
+
"item.honey_jar": "Jar of honey",
|
|
17617
|
+
"item.bread": "Bread",
|
|
17618
|
+
"item.cheese": "Cheese",
|
|
17619
|
+
"item.mortadella": "Mortadella (whole piece)",
|
|
17620
|
+
"item.raw_beef": "Raw beef (1 kg)",
|
|
17621
|
+
"item.frozen_chicken": "Frozen chicken",
|
|
17622
|
+
"item.eggs": "Eggs (dozen)",
|
|
17623
|
+
"item.banana_bunch": "Bunch of bananas",
|
|
17624
|
+
"item.orange": "Orange",
|
|
17625
|
+
"item.potatoes": "Potatoes (1 kg)",
|
|
17626
|
+
"item.cassava_root": "Cassava root",
|
|
17627
|
+
"item.fresh_fish": "Fresh fish",
|
|
17628
|
+
"item.salted_fish": "Salted fish",
|
|
16290
17629
|
"item.jerked_beef": "Jerked beef",
|
|
16291
17630
|
"item.game_meat": "Game meat (capybara, wild boar)",
|
|
16292
17631
|
"item.home_preserves": "Home preserves (jar)",
|
|
@@ -17275,229 +18614,6 @@ var GameInteractablesHousehold = (() => {
|
|
|
17275
18614
|
"kind.hygiene.description": "Sabonete, pasta de dente, papel higi\xEAnico e toalha."
|
|
17276
18615
|
};
|
|
17277
18616
|
var GOODS_STRINGS = { en: en_default, "pt-BR": pt_BR_default };
|
|
17278
|
-
var item_contracts_default = {
|
|
17279
|
-
densityKgPerLitre: { min: 0.02, max: 22 },
|
|
17280
|
-
impactResponses: ["dent", "break", "shatter", "tear", "squash", "pierce", "none"],
|
|
17281
|
-
heatResistantMaterials: ["steel", "cast_iron", "aluminium", "copper", "ceramic", "tempered_glass", "stone", "brick"],
|
|
17282
|
-
bodySlots: ["head", "eyes", "torso", "arms", "hands", "legs", "feet", "over"]
|
|
17283
|
-
};
|
|
17284
|
-
var IMPACT_RESPONSES = item_contracts_default.impactResponses;
|
|
17285
|
-
var HEAT_RESISTANT_MATERIALS = item_contracts_default.heatResistantMaterials;
|
|
17286
|
-
var DENSITY_KG_PER_LITRE = item_contracts_default.densityKgPerLitre;
|
|
17287
|
-
var BODY_SLOTS = item_contracts_default.bodySlots;
|
|
17288
|
-
var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
|
|
17289
|
-
var LITRES_PER_CUBIC_METRE = 1e3;
|
|
17290
|
-
var isNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
17291
|
-
var isFraction = (value) => isNumber(value) && value >= 0 && value <= 1;
|
|
17292
|
-
var catalogOf = (options) => options.items ?? GOODS_ITEMS;
|
|
17293
|
-
var parts = (item) => Array.isArray(item.parts) ? item.parts : [];
|
|
17294
|
-
var physical = (options) => {
|
|
17295
|
-
const range = options.density ?? DENSITY_KG_PER_LITRE;
|
|
17296
|
-
return {
|
|
17297
|
-
id: "physical",
|
|
17298
|
-
check: (item) => {
|
|
17299
|
-
const problems = [];
|
|
17300
|
-
const size = item.size;
|
|
17301
|
-
const sizeOk = Array.isArray(size) && size.length === 3 && size.every((side) => isNumber(side) && side > 0);
|
|
17302
|
-
if (!sizeOk) problems.push("size must be 3 finite positive numbers in metres");
|
|
17303
|
-
if (!isNumber(item.weight) || item.weight < 0) problems.push("weight must be a finite number >= 0 (kg)");
|
|
17304
|
-
if (sizeOk && isNumber(item.weight) && item.weight > 0) {
|
|
17305
|
-
const [width, height, depth] = size;
|
|
17306
|
-
const density = item.weight / (width * height * depth * LITRES_PER_CUBIC_METRE);
|
|
17307
|
-
if (density < range.min || density > range.max) problems.push(`density ${Number(density.toPrecision(2))} kg/L is outside ${range.min}..${range.max}`);
|
|
17308
|
-
}
|
|
17309
|
-
return problems;
|
|
17310
|
-
}
|
|
17311
|
-
};
|
|
17312
|
-
};
|
|
17313
|
-
var destructible = (options) => {
|
|
17314
|
-
const materials = options.materials ? new Set(options.materials) : void 0;
|
|
17315
|
-
return {
|
|
17316
|
-
id: "destructible",
|
|
17317
|
-
check: (item) => {
|
|
17318
|
-
const list = parts(item);
|
|
17319
|
-
if (list.length === 0) return ["missing parts"];
|
|
17320
|
-
const problems = [];
|
|
17321
|
-
const seen = /* @__PURE__ */ new Set();
|
|
17322
|
-
for (const part of list) {
|
|
17323
|
-
if (typeof part.id !== "string" || part.id === "") problems.push("a part has no id");
|
|
17324
|
-
else if (seen.has(part.id)) problems.push(`duplicate part "${part.id}"`);
|
|
17325
|
-
else seen.add(part.id);
|
|
17326
|
-
if (typeof part.material !== "string" || part.material === "") problems.push(`part "${part.id}" has no material`);
|
|
17327
|
-
else if (materials && !materials.has(part.material)) problems.push(`part "${part.id}" has unknown material "${part.material}"`);
|
|
17328
|
-
if (part.thickness !== void 0 && !(isNumber(part.thickness) && part.thickness > 0)) problems.push(`part "${part.id}" thickness must be a positive number`);
|
|
17329
|
-
}
|
|
17330
|
-
if (problems.length === 0 && list.every((part) => part.shape !== void 0 && part.position !== void 0)) {
|
|
17331
|
-
const report = checkSpec({ parts: list }, materials ? { materials } : {});
|
|
17332
|
-
for (const problem of report.problems) problems.push(`spec: ${problem}`);
|
|
17333
|
-
}
|
|
17334
|
-
return problems;
|
|
17335
|
-
}
|
|
17336
|
-
};
|
|
17337
|
-
};
|
|
17338
|
-
var impact = {
|
|
17339
|
-
id: "impact",
|
|
17340
|
-
check: (item) => {
|
|
17341
|
-
const value = item.impact;
|
|
17342
|
-
if (!value) return ["missing impact"];
|
|
17343
|
-
const problems = [];
|
|
17344
|
-
if (!IMPACT_RESPONSES.includes(value.response ?? "")) problems.push(`impact.response must be one of ${IMPACT_RESPONSES.join(", ")}`);
|
|
17345
|
-
if (typeof value.pushImpulse !== "boolean") problems.push("impact.pushImpulse must be true or false");
|
|
17346
|
-
if (value.shed !== void 0 && typeof value.shed !== "boolean") problems.push("impact.shed must be true or false");
|
|
17347
|
-
return problems;
|
|
17348
|
-
}
|
|
17349
|
-
};
|
|
17350
|
-
var useAnimation = {
|
|
17351
|
-
id: "use_animation",
|
|
17352
|
-
check: (item) => {
|
|
17353
|
-
const problems = [];
|
|
17354
|
-
const clip = item.use?.clip;
|
|
17355
|
-
if (clip === void 0) problems.push("missing use.clip");
|
|
17356
|
-
else if (!SNAKE_CASE.test(clip)) problems.push(`use.clip "${clip}" must be snake_case`);
|
|
17357
|
-
const sounds = item.use?.sounds;
|
|
17358
|
-
if (!Array.isArray(sounds) || sounds.length === 0 || sounds.some((sound) => typeof sound !== "string" || sound === "")) problems.push("missing use.sounds (a non-empty list of sound ids)");
|
|
17359
|
-
return problems;
|
|
17360
|
-
}
|
|
17361
|
-
};
|
|
17362
|
-
var leftover = (options) => {
|
|
17363
|
-
const ids = new Set(catalogOf(options).map((item) => item.id));
|
|
17364
|
-
return {
|
|
17365
|
-
id: "leftover",
|
|
17366
|
-
check: (item) => {
|
|
17367
|
-
const value = item.leftover;
|
|
17368
|
-
if (value === void 0) return ["missing leftover"];
|
|
17369
|
-
if (value === "none") return [];
|
|
17370
|
-
const problems = [];
|
|
17371
|
-
if (typeof value !== "object" || value === null) return ['leftover must be an object or "none"'];
|
|
17372
|
-
if (typeof value.item !== "string" || value.item === "") problems.push("missing leftover.item");
|
|
17373
|
-
else if (!ids.has(value.item)) problems.push(`leftover.item "${value.item}" is not in the catalog`);
|
|
17374
|
-
if (!isNumber(value.despawnSeconds) || value.despawnSeconds < 0) problems.push("missing leftover.despawnSeconds");
|
|
17375
|
-
return problems;
|
|
17376
|
-
}
|
|
17377
|
-
};
|
|
17378
|
-
};
|
|
17379
|
-
var edible = {
|
|
17380
|
-
id: "edible",
|
|
17381
|
-
check: (item) => {
|
|
17382
|
-
const problems = [];
|
|
17383
|
-
const nutrition = item.nutrition;
|
|
17384
|
-
if (!nutrition || !(isNumber(nutrition.satiety) || isNumber(nutrition.hydration))) problems.push("missing nutrition");
|
|
17385
|
-
if (item.shelfLife === void 0 && item.nonPerishable !== true) problems.push("missing shelfLife (a number of days, or nonPerishable: true)");
|
|
17386
|
-
else if (item.shelfLife !== void 0 && !(isNumber(item.shelfLife) && item.shelfLife > 0)) problems.push("shelfLife must be a positive number of days");
|
|
17387
|
-
if (!isFraction(item.rawEffect?.sickChance)) problems.push("missing rawEffect.sickChance (0..1)");
|
|
17388
|
-
return problems;
|
|
17389
|
-
}
|
|
17390
|
-
};
|
|
17391
|
-
var inputsOf = (recipe) => recipe.inputs ?? [];
|
|
17392
|
-
var toolsOf = (recipe) => recipe.tools ?? [];
|
|
17393
|
-
var consumes = (input, item) => {
|
|
17394
|
-
if (input.item === item.id) return true;
|
|
17395
|
-
if (input.any?.includes(item.id)) return true;
|
|
17396
|
-
if (!input.match) return false;
|
|
17397
|
-
const entries = Object.entries(input.match);
|
|
17398
|
-
return entries.length > 0 && entries.every(([key, value]) => item[key] === value);
|
|
17399
|
-
};
|
|
17400
|
-
var recipeInput = (options) => {
|
|
17401
|
-
const recipes = options.recipes ?? GOODS_RECIPES;
|
|
17402
|
-
return {
|
|
17403
|
-
id: "recipe_input",
|
|
17404
|
-
check: (item) => recipes.some((recipe) => inputsOf(recipe).some((input) => consumes(input, item))) ? [] : ["is not an input of any recipe"]
|
|
17405
|
-
};
|
|
17406
|
-
};
|
|
17407
|
-
var preparation = (options) => {
|
|
17408
|
-
const recipes = options.recipes ?? GOODS_RECIPES;
|
|
17409
|
-
const cookware = new Set(catalogOf(options).filter((item) => item.kind === "cookware").map((item) => item.id));
|
|
17410
|
-
return {
|
|
17411
|
-
id: "preparation",
|
|
17412
|
-
check: (item) => {
|
|
17413
|
-
const usable = recipes.filter((recipe) => inputsOf(recipe).some((input) => consumes(input, item)));
|
|
17414
|
-
if (usable.length === 0) return ["has no recipe that prepares it"];
|
|
17415
|
-
const prepares = usable.some((recipe) => {
|
|
17416
|
-
const heat = toolsOf(recipe).some((tool) => tool.world?.includes("fire"));
|
|
17417
|
-
const vessel = [...inputsOf(recipe).flatMap((input) => input.item ? [input.item] : []), ...toolsOf(recipe).flatMap((tool) => tool.anyOf ?? [])].some((id) => cookware.has(id));
|
|
17418
|
-
return heat && vessel;
|
|
17419
|
-
});
|
|
17420
|
-
return prepares ? [] : ["has no recipe that needs fire and a cooking vessel"];
|
|
17421
|
-
}
|
|
17422
|
-
};
|
|
17423
|
-
};
|
|
17424
|
-
var liquidContainer = {
|
|
17425
|
-
id: "liquid_container",
|
|
17426
|
-
check: (item) => {
|
|
17427
|
-
const fluid = item.fluid;
|
|
17428
|
-
if (fluid) {
|
|
17429
|
-
const problems = [];
|
|
17430
|
-
if (typeof fluid.liquid !== "string" || !SNAKE_CASE.test(fluid.liquid)) problems.push("fluid.liquid must be a liquid id");
|
|
17431
|
-
if (!isNumber(fluid.liters) || fluid.liters < 0) problems.push("fluid.liters must be a number >= 0");
|
|
17432
|
-
return problems;
|
|
17433
|
-
}
|
|
17434
|
-
return isNumber(item.container?.capacityLiters) && (item.container?.capacityLiters ?? 0) > 0 ? [] : ["missing fluid { liquid, liters } or container.capacityLiters"];
|
|
17435
|
-
}
|
|
17436
|
-
};
|
|
17437
|
-
var heatResistant = (options) => {
|
|
17438
|
-
const allowed = new Set(options.heatResistant ?? HEAT_RESISTANT_MATERIALS);
|
|
17439
|
-
return {
|
|
17440
|
-
id: "heat_resistant",
|
|
17441
|
-
check: (item) => parts(item).filter((part) => !allowed.has(part.material)).map((part) => `part "${part.id}" is ${part.material}, which does not take a flame`)
|
|
17442
|
-
};
|
|
17443
|
-
};
|
|
17444
|
-
var weapon = (options) => {
|
|
17445
|
-
const weaponIds = options.weaponIds ? new Set(options.weaponIds) : void 0;
|
|
17446
|
-
const calibers = options.calibers ? new Set(options.calibers) : void 0;
|
|
17447
|
-
return {
|
|
17448
|
-
id: "weapon",
|
|
17449
|
-
check: (item, ctx) => {
|
|
17450
|
-
if (ctx.chain.includes("ammo")) {
|
|
17451
|
-
if (typeof item.caliber !== "string" || item.caliber === "") return ["missing caliber"];
|
|
17452
|
-
return calibers && !calibers.has(item.caliber) ? [`caliber "${item.caliber}" is not in the arsenal`] : [];
|
|
17453
|
-
}
|
|
17454
|
-
if (typeof item.weapon !== "string" || item.weapon === "") return ["missing weapon (the arsenal id)"];
|
|
17455
|
-
return weaponIds && !weaponIds.has(item.weapon) ? [`weapon "${item.weapon}" is not in the arsenal`] : [];
|
|
17456
|
-
}
|
|
17457
|
-
};
|
|
17458
|
-
};
|
|
17459
|
-
var wearable = {
|
|
17460
|
-
id: "wearable",
|
|
17461
|
-
check: (item, ctx) => {
|
|
17462
|
-
const problems = [];
|
|
17463
|
-
const { protection, carry } = item;
|
|
17464
|
-
if (!protection && !carry) return [ctx.chain.includes("bag") ? "missing carry" : "missing protection"];
|
|
17465
|
-
if (ctx.chain.includes("bag") && !carry) problems.push("missing carry");
|
|
17466
|
-
if (ctx.chain.includes("clothing") && !protection) problems.push("missing protection");
|
|
17467
|
-
if (protection) {
|
|
17468
|
-
const slots = protection.slots;
|
|
17469
|
-
if (!Array.isArray(slots) || slots.length === 0) problems.push("protection.slots must list at least one body slot");
|
|
17470
|
-
else for (const slot of slots) if (!BODY_SLOTS.includes(slot)) problems.push(`protection.slots has unknown slot "${slot}"`);
|
|
17471
|
-
for (const field of ["bite", "scratch", "warmth"]) if (protection[field] !== void 0 && !isFraction(protection[field])) problems.push(`protection.${field} must be between 0 and 1`);
|
|
17472
|
-
}
|
|
17473
|
-
if (carry) {
|
|
17474
|
-
if (!(isNumber(carry.capacityKg) && carry.capacityKg > 0)) problems.push("carry.capacityKg must be positive");
|
|
17475
|
-
if (!isFraction(carry.weightReduction)) problems.push("carry.weightReduction must be between 0 and 1");
|
|
17476
|
-
if (!(isNumber(carry.quickSlots) && carry.quickSlots >= 0)) problems.push("carry.quickSlots must be >= 0");
|
|
17477
|
-
}
|
|
17478
|
-
return problems;
|
|
17479
|
-
}
|
|
17480
|
-
};
|
|
17481
|
-
var battery = {
|
|
17482
|
-
id: "battery",
|
|
17483
|
-
check: (item) => isNumber(item.charge?.lossPerMonth) && (item.charge?.lossPerMonth ?? -1) >= 0 ? [] : ["missing charge.lossPerMonth"]
|
|
17484
|
-
};
|
|
17485
|
-
var createItemContracts = (options = {}) => [
|
|
17486
|
-
physical(options),
|
|
17487
|
-
destructible(options),
|
|
17488
|
-
impact,
|
|
17489
|
-
useAnimation,
|
|
17490
|
-
leftover(options),
|
|
17491
|
-
edible,
|
|
17492
|
-
preparation(options),
|
|
17493
|
-
recipeInput(options),
|
|
17494
|
-
liquidContainer,
|
|
17495
|
-
heatResistant(options),
|
|
17496
|
-
weapon(options),
|
|
17497
|
-
wearable,
|
|
17498
|
-
battery
|
|
17499
|
-
];
|
|
17500
|
-
var ITEM_CONTRACTS = createItemContracts();
|
|
17501
18617
|
|
|
17502
18618
|
// src/destruction.ts
|
|
17503
18619
|
var door = (material, joint = "hinge", piece2 = "door") => ({ material, joint, piece: piece2 });
|
|
@@ -19279,7 +20395,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
19279
20395
|
h: 1.8,
|
|
19280
20396
|
y: 0,
|
|
19281
20397
|
solid: true,
|
|
19282
|
-
|
|
20398
|
+
pushable: true,
|
|
20399
|
+
massKg: 70,
|
|
20400
|
+
sounds: {
|
|
20401
|
+
leaves: {
|
|
20402
|
+
"*": "fridge"
|
|
20403
|
+
}
|
|
20404
|
+
}
|
|
19283
20405
|
},
|
|
19284
20406
|
{
|
|
19285
20407
|
id: "fridge_compact",
|
|
@@ -19289,7 +20411,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
19289
20411
|
h: 0.85,
|
|
19290
20412
|
y: 0,
|
|
19291
20413
|
solid: true,
|
|
19292
|
-
|
|
20414
|
+
pushable: true,
|
|
20415
|
+
massKg: 30,
|
|
20416
|
+
sounds: {
|
|
20417
|
+
leaves: {
|
|
20418
|
+
"*": "fridge"
|
|
20419
|
+
}
|
|
20420
|
+
}
|
|
19293
20421
|
},
|
|
19294
20422
|
{
|
|
19295
20423
|
id: "kitchen_cabinet_base",
|
|
@@ -19299,6 +20427,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19299
20427
|
h: 0.9,
|
|
19300
20428
|
y: 0,
|
|
19301
20429
|
solid: true,
|
|
20430
|
+
pushable: true,
|
|
19302
20431
|
massKg: 35
|
|
19303
20432
|
},
|
|
19304
20433
|
{
|
|
@@ -19319,6 +20448,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19319
20448
|
h: 2,
|
|
19320
20449
|
y: 0,
|
|
19321
20450
|
solid: true,
|
|
20451
|
+
pushable: true,
|
|
19322
20452
|
massKg: 50
|
|
19323
20453
|
},
|
|
19324
20454
|
{
|
|
@@ -19329,6 +20459,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19329
20459
|
h: 2.1,
|
|
19330
20460
|
y: 0,
|
|
19331
20461
|
solid: true,
|
|
20462
|
+
pushable: true,
|
|
19332
20463
|
massKg: 90
|
|
19333
20464
|
},
|
|
19334
20465
|
{
|
|
@@ -19339,6 +20470,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19339
20470
|
h: 0.9,
|
|
19340
20471
|
y: 0,
|
|
19341
20472
|
solid: true,
|
|
20473
|
+
pushable: true,
|
|
19342
20474
|
massKg: 45
|
|
19343
20475
|
},
|
|
19344
20476
|
{
|
|
@@ -19349,6 +20481,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19349
20481
|
h: 0.55,
|
|
19350
20482
|
y: 0,
|
|
19351
20483
|
solid: true,
|
|
20484
|
+
pushable: true,
|
|
19352
20485
|
massKg: 12
|
|
19353
20486
|
},
|
|
19354
20487
|
{
|
|
@@ -19369,6 +20502,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19369
20502
|
h: 0.9,
|
|
19370
20503
|
y: 0,
|
|
19371
20504
|
solid: true,
|
|
20505
|
+
pushable: true,
|
|
19372
20506
|
massKg: 45
|
|
19373
20507
|
},
|
|
19374
20508
|
{
|
|
@@ -19509,7 +20643,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
19509
20643
|
h: 0.3,
|
|
19510
20644
|
y: 0.9,
|
|
19511
20645
|
solid: false,
|
|
19512
|
-
massKg: 14
|
|
20646
|
+
massKg: 14,
|
|
20647
|
+
sounds: {
|
|
20648
|
+
leaves: {
|
|
20649
|
+
"*": "microwave"
|
|
20650
|
+
}
|
|
20651
|
+
}
|
|
19513
20652
|
},
|
|
19514
20653
|
{
|
|
19515
20654
|
id: "washing_machine",
|
|
@@ -19519,6 +20658,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19519
20658
|
h: 0.85,
|
|
19520
20659
|
y: 0,
|
|
19521
20660
|
solid: true,
|
|
20661
|
+
pushable: true,
|
|
19522
20662
|
massKg: 70
|
|
19523
20663
|
},
|
|
19524
20664
|
{
|
|
@@ -19529,6 +20669,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19529
20669
|
h: 0.85,
|
|
19530
20670
|
y: 0,
|
|
19531
20671
|
solid: true,
|
|
20672
|
+
pushable: true,
|
|
19532
20673
|
massKg: 45
|
|
19533
20674
|
},
|
|
19534
20675
|
{
|
|
@@ -19539,6 +20680,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19539
20680
|
h: 0.85,
|
|
19540
20681
|
y: 0,
|
|
19541
20682
|
solid: true,
|
|
20683
|
+
pushable: true,
|
|
19542
20684
|
massKg: 25
|
|
19543
20685
|
},
|
|
19544
20686
|
{
|
|
@@ -19559,6 +20701,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19559
20701
|
h: 0.95,
|
|
19560
20702
|
y: 0,
|
|
19561
20703
|
solid: true,
|
|
20704
|
+
pushable: true,
|
|
19562
20705
|
massKg: 60
|
|
19563
20706
|
},
|
|
19564
20707
|
{
|
|
@@ -19569,6 +20712,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19569
20712
|
h: 0.9,
|
|
19570
20713
|
y: 0,
|
|
19571
20714
|
solid: true,
|
|
20715
|
+
pushable: true,
|
|
19572
20716
|
massKg: 30
|
|
19573
20717
|
},
|
|
19574
20718
|
{
|
|
@@ -19579,6 +20723,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19579
20723
|
h: 0.85,
|
|
19580
20724
|
y: 0,
|
|
19581
20725
|
solid: true,
|
|
20726
|
+
pushable: true,
|
|
19582
20727
|
massKg: 15
|
|
19583
20728
|
},
|
|
19584
20729
|
{
|
|
@@ -19619,6 +20764,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19619
20764
|
h: 1.05,
|
|
19620
20765
|
y: 0,
|
|
19621
20766
|
solid: true,
|
|
20767
|
+
pushable: true,
|
|
19622
20768
|
massKg: 12
|
|
19623
20769
|
},
|
|
19624
20770
|
{
|
|
@@ -19639,6 +20785,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19639
20785
|
h: 0.85,
|
|
19640
20786
|
y: 0,
|
|
19641
20787
|
solid: true,
|
|
20788
|
+
pushable: true,
|
|
19642
20789
|
massKg: 20
|
|
19643
20790
|
},
|
|
19644
20791
|
{
|
|
@@ -19649,6 +20796,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19649
20796
|
h: 1.9,
|
|
19650
20797
|
y: 0,
|
|
19651
20798
|
solid: true,
|
|
20799
|
+
pushable: true,
|
|
19652
20800
|
massKg: 400
|
|
19653
20801
|
},
|
|
19654
20802
|
{
|
|
@@ -19669,6 +20817,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19669
20817
|
h: 1.75,
|
|
19670
20818
|
y: 0,
|
|
19671
20819
|
solid: true,
|
|
20820
|
+
pushable: true,
|
|
19672
20821
|
massKg: 75
|
|
19673
20822
|
},
|
|
19674
20823
|
{
|
|
@@ -19679,6 +20828,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19679
20828
|
h: 2.3,
|
|
19680
20829
|
y: 0,
|
|
19681
20830
|
solid: true,
|
|
20831
|
+
pushable: true,
|
|
19682
20832
|
massKg: 120
|
|
19683
20833
|
},
|
|
19684
20834
|
{
|