边缘世界 RimWorld

边缘世界 RimWorld

188 个评价
Lockable doors
   
奖励
收藏
已收藏
取消收藏
Mod, 1.5, 1.6
文件大小
发表于
更新日期
429.687 KB
2024 年 12 月 25 日 上午 4:05
9 月 7 日 上午 6:36
7 项改动说明 ( 查看 )

订阅以下载
Lockable doors

描述
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.
75 条留言
Espiovvv 10 月 12 日 上午 8:15 
Thank you!
Zeracronius  [作者] 10 月 12 日 上午 7:40 
It is already updated. If Rimpy doesn't recognise it then it is because Rimpy is outdated.
Jikulopo's mod is listed in the metadata as alternative to prepatcher dependency.
Espiovvv 10 月 12 日 上午 6:24 
It says in RimPy that I'm missing zetrith.prepatcher, that's because I'm using jikulopo.prepatcher, can you please update the dependency to the unofficial 1.6 update of Prepatcher?
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3563469557
Zeracronius  [作者] 10 月 6 日 上午 3:32 
Specifically power-tab appends their tab to the same list for all objects that has power component.
Zeracronius  [作者] 10 月 6 日 上午 3:31 
Thing is, i don't decide where the tab is placed. I add it to the list of tabs for all implementations of Rimworld's Door, and then Rimworld decides where and how to display the tab button.
Power-tab does the same thing, so there is no conflicts.

What Powered doors are you referring to? And do they work normally without Power-tab?
Vril 10 月 6 日 上午 2:52 
Yeah, the normal doors have the access icon/button displayed properly, powered do not. You need a patch for power tab mod.
Vril 10 月 6 日 上午 2:51 
I dont see access button? i use power tab mod, maybe it overlap it?
Zeracronius  [作者] 10 月 4 日 上午 8:46 
Unfortunately not, this mod only adds additional criteria for when pawns check if they can open a door. A check that is skipped by Rimworld if the door is already open, at which point any pawn can pass through without these checks being triggered.

A vac barrier counts as a door that is always open. Blocking pawns from pathing through that would require me to add entirely new checks that then check if door is vac barrier specifically. This would add more overhead across all doors.
Stim The One 10 月 4 日 上午 8:35 
Any chance to also include vac barriers as lockable? We can go about vaccum resistance later, I want to use it as a tox cloud barrier and have only mechs go through.
Zeracronius  [作者] 10 月 3 日 上午 5:25 
@GoatSkin
Did you check your log for errors? And if none, can you provide a screenshot of harmony patches tab in Dubs Performance Analyser?