From 62b6df38738354122b25f050a24eca88ecd8fb9a Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:24:10 +0000 Subject: [PATCH] Lock HSC armoury items (#785) Resolves #783. --- CHANGELOG.md | 1 + .../Randomizers/TR3/Remastered/TR3RItemRandomizer.cs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f402344..8745d2bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [Unreleased](https://github.com/LostArtefacts/TR-Rando/compare/V1.9.3...master) - xxxx-xx-xx - added (experimental) support for Linux (#143) - changed the number of secrets in TR3R Coastal Village to four to match the statistics (#775) +- fixed being unable to pick-up some items in TR3R High Security Compound (#783) - fixed unreachable item locations in Coastal Village (#774) - fixed the cobra not rendering properly in TR3R if used cross-level (#782) diff --git a/TRRandomizerCore/Randomizers/TR3/Remastered/TR3RItemRandomizer.cs b/TRRandomizerCore/Randomizers/TR3/Remastered/TR3RItemRandomizer.cs index 0c1faea9..a75a31a5 100644 --- a/TRRandomizerCore/Randomizers/TR3/Remastered/TR3RItemRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR3/Remastered/TR3RItemRandomizer.cs @@ -33,6 +33,14 @@ public override void Randomize(int seed) continue; } + if (lvl.Is(TR3LevelNames.HSC)) + { + // These can't be picked up if they are moved out of these rooms. + _levelInstance.Data.Entities.Where(e => TR3TypeUtilities.IsAnyPickupType(e.TypeID) && (e.Room == 167 || e.Room == 168)) + .ToList() + .ForEach(e => ItemFactory.LockItem(_levelInstance.Name, _levelInstance.Data.Entities.IndexOf(e))); + } + _allocator.RandomizeItems(_levelInstance.Name, _levelInstance.Data, _levelInstance.Script.RemovesWeapons, _levelInstance.Script.OriginalSequence, _levelInstance.HasExposureMeter);