[Mod] locks [locks]

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Post

christoferlevich wrote: First of all - I can set up a wooden locked door no problem. It works great with the owner (so long as the owner has a key) but how do I give the proper key to someone else? I have tried dropping the key as owner to user. I have tried grabbing a key in creative for the user.

Does the door not work with just a key - just a code - or does it have to be both?
If you want to open shared locked objects owned by others, you do need a keychain instead of just a key. It can be any keychain and doesn't have to be a specific one (that is, just craft a keychain and keep it in your inventory; you won't need a normal key then anymore either).
christoferlevich wrote: Is the key something I could do away with entirely as it seems its only real function is to add a step to enabling others to unlock a door.
Regarding gameplay: The key (or rather, keychain) blocks one slot in your inventory. Technically it's not needed. The locks mod could work without. It even has to keep looking for key and keychain.
A list of my mods can be found here.

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: [Mod] locks [locks]

by christoferlevich » Post

So I figured out my issue and it came down to a lack of understanding how the mod was actually working. So, I've modded your mod "key chain" texture and turned it into a 'citizen card' which my students have to obtain to do many of the 'activities' (is that called a 'fork' technically? Its just some minor customization). For the purposes of my sub-games 'illusion' a card works way better than keys. :) Your mod is going to REALLY enhance what we are doing. Thank you!
everything can be a learning experience...

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: [Mod] locks [locks]

by christoferlevich » Post

New question. The kids aren't much for closing doors once they open them which takes away from the next students 'experience'. Is there a way I can have the doors close automatically within the mod?
everything can be a learning experience...

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Post

christoferlevich wrote: New question. The kids aren't much for closing doors once they open them which takes away from the next students 'experience'. Is there a way I can have the doors close automatically within the mod?
Not yet. Open doors cannot be easily identified. They just use diffrent rotation. In theory there's a way to detect open/closed - but it depends on placement of the door. It may not always be possible to place a door in the "closed" state when building. As you're using cards to obtain access to the doors - how about using sliding doors like the one in my travelnet mod? They'd fit better thematicly and they have a distinct open/closed state so that they can close automaticly after a given amount of time. They currently aren't supported by the locks mod but could be added.
A list of my mods can be found here.

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: [Mod] locks [locks]

by christoferlevich » Post

I'll figure out a mesecon solution for now. Thank you!
everything can be a learning experience...

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] locks [locks]

by ManElevation » Post

can you make locked travelnets work again?
My Public Mods! Discord: Rottweiler Games#3368

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: [Mod] locks [locks]

by christoferlevich » Post

Help! So I have a whole building full of locked doors. Their code relates to answers to questions posted next to them. Everything was going great until I started classes and NONE of the kids can open any doors. I can as admin and owner - but they cannot despite having a key chain. I reinstalled the mod but its still happening. Any thoughts or suggestions? The building is useless without this feature.
everything can be a learning experience...

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: [Mod] locks [locks]

by christoferlevich » Post

So I am still trying to figure out why doors are not saving passwords. Could it be a problem with the meta data? A corrupt database somewhere?
everything can be a learning experience...

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] locks [locks]

by azekill_DIABLO » Post

map squilte?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: [Mod] locks [locks]

by christoferlevich » Post

But the map is building correctly. I have started using a build that uses a beta version of luajit which supposedly solves the memory issue. Doors seem to be working but the real test will be with a full server as they only failed with multiusers.
everything can be a learning experience...

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Post

There was a bug related to current pipeworks that is now fixed. The chests will no longer crash the server when a pipeworks item tries to take or place something. Thanks to VanessaE for telling me!

The github user CloudyProton also did a few nice pull requests: Sound and light propagation for the blocks, adjusting the furnace formspec to the current one in default, and checks for placement in protected areas.

Another pull request, this time from the Github user adrido, does create much nicer looking and easier to use formspecs.
Image
The configuration menu for the owner:
Image
In order to gain access when not beeing the chest owner, click on the "Authorize" button and enter the password:
Image
Attachments
locks_ask_pw.jpg
locks_ask_pw.jpg (29.93 KiB) Viewed 797 times
locks_form.jpg
locks_form.jpg (55.82 KiB) Viewed 797 times
locks_new.jpg
locks_new.jpg (73.67 KiB) Viewed 797 times
A list of my mods can be found here.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] locks [locks]

by Hybrid Dog » Post

https://github.com/Sokomine/locks/blob/ ... #L596-L600
The password is obviously directly saved in meta. Every player receives the metadata of the node, so with a slightly modified client everybody can find out the password and access the chest.

To fix this problem you could either not save the password in metadata or use a password hash function: https://github.com/minetest/minetest/bl ... 3599-L3600
Saving only the hashed password would disallow viewing the current raw password.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Post

Hybrid Dog wrote: The password is obviously directly saved in meta. Every player receives the metadata of the node, so with a slightly modified client everybody can find out the password and access the chest.
I'm aware of that problem. Security through the password is quite limited.
Hybrid Dog wrote: To fix this problem you could either not save the password in metadata or use a password hash function: https://github.com/minetest/minetest/bl ... 3599-L3600
Saving only the hashed password would disallow viewing the current raw password.
Hashes are very useful in such cases. Still...I'm not certain if that would fit in well into this mod. I see its future more as a tool for puzzle games where the password is the answer to a question asked somewhere. If player cheat in such a singleplayer world it's their matter. I'm also considering moving the lock data outside of metadata into a data structure stored by the mod, with an interface for other mods to provide hints and questions for he actual puzzle. Still, need the time to actually do that...
A list of my mods can be found here.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] locks [locks]

by Hybrid Dog » Post

I now think that you can simply use the new mark_as_private method: https://github.com/minetest/minetest/bl ... .txt#L4743
I haven't tested it, it may not be available in minetest 0.4.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Post

mark_as_private is a good idea. It will now be used. New version released.
A list of my mods can be found here.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] locks [locks]

by BirgitLachner » Post

Hi
does anyone has a nice introduction hwo to use "locks" on "locked travelnet". With the help I found I was not able to use it. :-(

Regards, Birgit

Post Reply

Who is online

Users browsing this forum: YaCy [Bot] and 21 guests