From de4f3d63810f9334972483cffb16b0d18607d4e1 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 24 Aug 2024 17:36:12 +0100 Subject: [PATCH] Add some safety to object path requests --- project/code/LGS/ResourcePathManager.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/project/code/LGS/ResourcePathManager.cs b/project/code/LGS/ResourcePathManager.cs index 8cf2048..ec31c1c 100644 --- a/project/code/LGS/ResourcePathManager.cs +++ b/project/code/LGS/ResourcePathManager.cs @@ -136,6 +136,7 @@ public class ResourcePathManager { if (!_initialised) return null; + objectName = objectName.ToLower(); if (_omResources.objectPathMap.TryGetValue(objectName, out var path)) { return path; @@ -147,6 +148,7 @@ public class ResourcePathManager { if (!_initialised) return null; + objectName = objectName.ToLower(); if (_fmResources.TryGetValue(campaignName, out var campaign) && campaign.objectPathMap.TryGetValue(objectName, out var path)) {