From ee7c2aab368b78f009c43335507b9b80861c3b75 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 20 Mar 2024 17:47:48 +0000 Subject: [PATCH] Nullguard inspecting a keycard when scav has no encyclopedia init --- project/src/controllers/InventoryController.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/project/src/controllers/InventoryController.ts b/project/src/controllers/InventoryController.ts index 7bf184f6..9cbe2617 100644 --- a/project/src/controllers/InventoryController.ts +++ b/project/src/controllers/InventoryController.ts @@ -663,6 +663,11 @@ export class InventoryController fullProfile.characters.pmc.Encyclopedia[itemTpl] = false; fullProfile.characters.scav.Info.Experience += item._props.ExamineExperience; + + if (!fullProfile.characters.scav.Encyclopedia) + { + fullProfile.characters.scav.Encyclopedia = {}; + } fullProfile.characters.scav.Encyclopedia[itemTpl] = false; }