Skip to content

fix: Replace new Locker instance creation with Get method - #779

Merged
louis1706 merged 1 commit into
ExMod-Team:devfrom
MS-crew:patch-10
Mar 18, 2026
Merged

fix: Replace new Locker instance creation with Get method#779
louis1706 merged 1 commit into
ExMod-Team:devfrom
MS-crew:patch-10

Conversation

@MS-crew

@MS-crew MS-crew commented Mar 17, 2026

Copy link
Copy Markdown

Description

Describe the changes
[2026-03-17 02:37:26.739 +03:00] [STDOUT] ArgumentException: An item with the same key has already been added. Key: Scp1344PedestalStructure Variant(Clone) (MapGeneration.Distributors.PedestalScpLocker)
[2026-03-17 02:37:26.739 +03:00] [STDOUT] at System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <13c0c460649d4ce49f991e2c222fa635>:0 [2026-03-17 02:37:26.739 +03:00] [STDOUT] at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <13c0c460649d4ce49f991e2c222fa635>:0
[2026-03-17 02:37:26.740 +03:00] [STDOUT] at Exiled.API.Features.Lockers.Locker..ctor (MapGeneration.Distributors.Locker locker) [0x00019] in <5824ee89dbbc4693a659efef2f01ee35>:0
[2026-03-17 02:37:26.740 +03:00] [STDOUT] at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.MapGeneration.Distributors.SpawnableStructure.Start_Patch1(MapGeneration.Distributors.SpawnableStructure)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior? (if this is a feature change)

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

@MS-crew MS-crew changed the title Replace new Locker instance creation with Get method fix: Replace new Locker instance creation with Get method Mar 17, 2026
@MS-crew MS-crew closed this Mar 17, 2026
@MS-crew MS-crew reopened this Mar 17, 2026
@louis1706
louis1706 merged commit d82093d into ExMod-Team:dev Mar 18, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants