[1.1] Locks

Started by Avius, October 03, 2017, 05:34:07 PM

Previous topic - Next topic

Avius



Description
This addon adds new locking door system.

  • Doors can be unlocked to allow enemies and prisoners to pass by (only races that have inteligence "humanlike" or above).
  • Doors can exclude visitors (wanna lock some traders?).
  • Doors can be assigned to colonists (you can simply restrict rooms to specific colonists without allowed area manager).
  • Pet doors for small animals can now be added to doors.
  • New Flicking job: Locking/unlocking doors, it has higher priority than normal flicking job. ("Flicking" doors is needed).

How to use
Select door and left click "Lock" command if you want to unlock/lock door. Right click for more options.

Performance
This mod has almost zero impact on performance. It's quick and light.

Compatibility

  • You can enable this mod to old saves.
  • You can disable this mod from saves, but you need to clear all locking/unlocking job first (all semi-transparent locks shouldn't be visible).
  • For DoorsExpanded use this mod.
  • Clutter Structure mod compatibility - this mod leaves management to Clutter Structures, expect you can now "unlock" doors with Locks.
  • There can be compatibility issues with mods that add custom doors with custom security mechanics.

Links
Download
Steam workshop
Github project
Report bug
Credits

You can include this mod in mod-packs, and mod lists. You can modify/upgrade/use this mod, but don't use this commercially, and make sure to include link to original mod.



Avius

#1
Changelog:


2.5.1
- update to Rimworld 1.2
2.5.0
- added compatibility with Multiplayer Mod (thanks to https://github.com/Cody-Spring)
2.4.0
- added compatibility with RimWorld 1.1s (thanks to https://github.com/MerGatto)
2.3.0
- added copy/paste buttons
- added cancel button
- now settings that do not apply in comparision to other settings will not be displayed on tab "Lock"
2.2.2
- changed max size for pet door to 0.86 up from 0.85
2.2.1
- updated to RimWorld 1.0
2.2.0
- updated to RimWorld beta 19
2.1.1
- wanted state of lock will be respected for colonists and allies when they are sane, instead of current state (exception is lock/unlocked state)
- fixed bug when selecting another door with lock ITab opened
2.1.0
- added Lock inspector tab for easy use (alternative management)
- added Lock comp to display text "locked", "unlocked" etc.
2.0.1
- fixed some bugs
2.0.0
- changed that every change need to be "flicked", instead of locking/unlocking
- locks now need to be changed by one of new owners
- added "add pet door", and "remove pet door" that will allow to control whetever small animals should pass the door
- changed that every change to lock settings when mulitple doors are selected affects all doors
- added Clutter Structure comaptibility by enabling "unlocking" from Locks mod, other mechanics works as in CS
- added alert that will trigger when locks can't be changed due to work settings
1.0.2
- updated to RimWorld Beta 18 (Rimworld v. 0.18.0)
1.0.1
- fixed bug that colonists-prisoners can go through locked doors
1.0.0
- initialization

Ceanox

This seems like such a better indepth lock mod, Going to try it out and give a proper review.  :D

Canute

I can see a problem with cleaning some rooms.
What do you think to add an option that a sleeping pawn lock the door when he sleep/enter his room, and unlock when he leave/wakeup.
Then cleaner can enter the room.

TheGakurniawan

this mod have "potential", but

1. screenshot of the locking, that'll help a lot
2. what if, you can unlock&lock door, but in long range,  (main controller that can control a multiple door, but it's high end)
He dig
She dig
You dig
I dig
We dig
They dig

It's not a great poem
But it's pretty deep

SpaceDorf

Locks very good Avius.
( yes I went there .. )

Maybe more useful than the autolock or other mods I have seen so far. I will test it in my new Colony
( I can't understand why people refer to it as playthrough .. most of my colonies die either of boredom, fps or a new idea )

@TheGakurniawan
Dude/tte I love your signature .. had me laughing for a hole five minutes
( yes I did this on purpose too ..  )

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Avius

Problem with locking/unlocking for certain job is game mechanics are somehow weird. It works on cache and enabling/disabling locks will have impact on performance.

But good point I will think about that.

sidfu

there 2 ways we can do cleaning

1. have a timed lock. it locks in the times  u set but is unlocked rest of time so u could have it lock during night and such
2. have it only lock when who owns the door goes past. if more than 1 person own it only lock when both are in room

Canute

The 2. way works better, if you got an nightowl the 1. way would cause problems.

mrofa

Avius best solution i found for cleaning and doctoring while doing lock mod is to check the pawn job queue. If next job is not cleaning/doctoring and job target is not in current room, checks pawn position and if pawn room != current room, revoke passage.
All i do is clutter all around.

Avius

You've missing the point. The whole system is designed with idea that changing locks are very very rare. If not the whole game will be lagging and you will loose FPS.

Each individual pawn have his own Reachability Matrix if any of these matrix is about to change all matrix of all pawns in the map will be cleared and need to be calculated from beginning.

mrofa

Oh i though you just did use vanilia pather methods to do that, my bad then sorry :P
All i do is clutter all around.

Avius

#12
Quote from: mrofa on October 07, 2017, 12:19:55 PM
Oh i though you just did use vanilia pather methods to do that, my bad then sorry :P
It is vanilla pather methods

EDIT: This happen every time you're building any structures.

Avius

Maybe if trigger would be call very rare, and condition will call one global function it could be a lot quicker, but now I think about another problem, what if pawn stuck inside room, which has transfered into locked a few seconds ago

Redfire1200

Question how do you enable it for prisoners im a bit lost (or stupid)
(Insert meme here)
The Red Empire shall rise, The Red Empire shall grow... POTATOES!!!