Lockable doors

If you liked this item, please rate it up on Steam Workshop page.

Author: Zeracronius

Last revision: 7 Sep, 2025 at 14:36 UTC (2)

File size: 429.69 KB

On Steam Workshop

Description:
Short description:

A simple and performance friendly door lock.

Detailed explanation:

The reason door lock mods tend to be heavy on performance is because the additional conditions to pass through a door are checked every time any pawn attempts to path through it.

This mod uses Zetrith’s prepatcher to make this logic as fast as possible to minimize overhead, which is why it is required.

By default a locked door is locked for everyone, including your own pawns, pets, mechs and allies. There is the ability to set exceptions on locked doors, however these take (slightly) longer to process compared to locked doors without exceptions.

A locked door only applies additional restrictions, vanilla and other limitations still apply.

All injected logic and overhead can be monitored in a single harmony patch under "Harmony Patches" in Dub’s Analyser.

Performance impact scales by number of locked doors and number of enabled exceptions.

Remember that if you have available jobs in areas that some pawns can’t get to, if those pawns are idling they will keep trying to path to those unattended jobs.

The shown analyser picture is 150+ locked doors with 28 pawns locked in separate rooms with plenty of work to do. So pretty much a worst case scenario running at 360 tps.
Please note, the end result in analyser also depends on how powerful your system is, so values could greatly vary based on your cpu model and modlist content.

Exceptions

The following groups can be allowed access through locked doors on a door by door basis:

– Colonists.

Regular colonists.

– Colony mechs.

Biotech mechs owned by colony.

– Slaves.

Ideology slaves owned by colony.

– Pets.

Tamed animals owned by colony.

– Allies.

Any members of factions that are not hostile to colony

Links:

Github[github.com]
Previous versions[github.com]
Change notes

Credits:

Madman666: Icons and preview.
Dubwise’s discord server, where many performance friendly mods are born.

Download
Required items:

Click the title to search on this site.


HarmonySteam Workshop
PrepatcherSteam Workshop
Revisions:

Old revisions of this mod are available below. Click the link to download.