[Mod] locks [locks]

Sokomine
Member
 
Posts: 3614
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Sun Jul 02, 2017 03:19

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: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: [Mod] locks [locks]

by christoferlevich » Wed Jul 12, 2017 13:19

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: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: [Mod] locks [locks]

by christoferlevich » Mon Aug 07, 2017 10:30

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: 3614
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Wed Aug 09, 2017 15:33

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: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: [Mod] locks [locks]

by christoferlevich » Thu Aug 10, 2017 09:48

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

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

Re: [Mod] locks [locks]

by ManElevation » Fri Aug 25, 2017 19:59

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

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

Re: [Mod] locks [locks]

by christoferlevich » Wed Oct 11, 2017 14:36

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: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: [Mod] locks [locks]

by christoferlevich » Sun Nov 19, 2017 16:47

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: 7385
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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

Re: [Mod] locks [locks]

by christoferlevich » Sun Nov 26, 2017 15:56

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: 3614
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Mon Jul 30, 2018 20:17

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
(29.93 KiB) Not downloaded yet
locks_form.jpg
(55.82 KiB) Not downloaded yet
locks_new.jpg
(73.67 KiB) Not downloaded yet
A list of my mods can be found here.
 

User avatar
Hybrid Dog
Member
 
Posts: 2635
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] locks [locks]

by Hybrid Dog » Sun Aug 05, 2018 05:55

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: 3614
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] locks [locks]

by Sokomine » Sun Aug 12, 2018 10:52

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: 2635
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] locks [locks]

by Hybrid Dog » Sun Aug 12, 2018 20:28

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.
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 6 guests