Lockpicks Mod help

Post Reply
User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Lockpicks Mod help

by sparky » Post

So, I'm trying to make a simpler version of lockpicks but I am running into an issue, which I believe is related to digging groups.

The lockpick tools have a "locked" group that allows them to, in theory, "dig" a node with a "locked" group in a certain amount of time.

When a player picks a lock successfully, using on_dig, the owner string on the node is set to nothing. (sometimes the node needs to be changed in order to allow anyone to use when owner == "")

My issue is this: closed steel doors aren't diggable by any of the lockpicks. (open ones are diggable, for some odd reason)

I noticed that even though all the nodes I set as pickable have the same "locked" group value (3, the easiest) the picking times still do vary from locked chests to steel trapdoors.

I'm weirded out, since both open and closed doors seem to share the same groups: 1 cracky, level 2.
and steel trapdoors also have 1 cracky and level 2, but they are diggable.
(also, steel trapdoors arent diggable with the lockpicks if you dont make them pickable)

I'm using the doors and locked chests that released with 0.4.16

I need to be able to "dig" the steel door with the lockpick in order for the on_dig function to run.
any help would be appreciated.

browse code
Attachments
lockpicks.zip
(5.93 KiB) Downloaded 42 times

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: Lockpicks Mod help

by ChimneySwift » Post

This doesn't really answer your question, because I too am confused as to what is wrong here... But perhaps this might be a good alternate solution:
- person punches locked item with lockpick tool
- they have a 1 in 20 or so chance of unlocking the door
- when the door is unlocked, run a fake on_rightclick on the node in question, with the clicker's name being the owner name, so the door thinks it's getting opened by the owner, removing all the need for fancy metadata modification.
or - Use on_key_use on that door
A spoon is basically a tiny bowl with a stick on it

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: Lockpicks Mod help

by Stix » Post

Ugh your using the textures from the original lockpicks mod? They are way to ugly, use these instead (License: WTFPL): viewtopic.php?t=9224#p312209
Hey, what can i say? I'm the bad guy.

User avatar
csirolli
Member
Posts: 133
Joined: Mon Jan 15, 2018 21:46
GitHub: HeyITGuyFixIt
IRC: CSirolli
In-game: CSirolli
Location: Florida, USA
Contact:

Re: Lockpicks Mod help

by csirolli » Post

I am using the Minetest Game for 0.4.17 with 0.4.17 MTE, and it seems to work fine. One issue I did see is that the lockpicks can remove lockpicked doors and empty lockpicked chests. This was in singleplayer mode. I haven't tested it in multiplayer yet.

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: Lockpicks Mod help

by sparky » Post

Chimmeny, players on pc can punch 20 times in a matter of seconds, whereas mobile takes a minute or two. :/

Thanks for the textures, Stix

cisirolli, does it take the same amount of time to pick a steel door as it does to pick a locked chest?

Also just as a note, the mod might not work as it's supposed to, since I had to change the chests and doors to accept any interaction when owner is nothing. but if you're able to dig it, the rest will work in my setup.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests