Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Locks Fix - Existing Doors

Locks Fix - Existing Doors

Fixes Locks mod crashing on doors that existed before the mod was installed. No more need to rebuild doors.

Locks Compatibility Fix

Adding the Locks mod to an existing save? Enjoy your NullReferenceException on every door.

This fix patches the crash that occurs when doors built before installing Locks lack the expected lock state data. No more rebuilding every door in your colony.

The problem

The Locks mod expects all doors to have initialized lock data (allowed pawns lists, mechanoid access lists, etc.). Doors that existed before Locks was installed have null values for these fields, causing a crash when the mod tries to copy lock state.

The fix

A Harmony prefix on LockState.CopyFrom() that initializes null collections with empty lists before the original method runs. Simple, targeted, no side effects.

Compatibility

  • Requires: Harmony and Locks
  • Safe to add mid-save (that's the whole point)
  • Does nothing on new saves where the issue doesn't exist

Credits

This is a compatibility patch for Locks by Avius. All credit for the original Locks mod goes to them — this mod only fixes a specific crash when adding Locks to an existing save.


Compatible with RimWorld 1.6

Рейтинг

Войдите, чтобы голосовать.
🏅 Нет оценок

Базовые теги:

Зависимости мода

Логотип мода

Harmony

Логотип мода

Locks

Загрузить 94.9 KB