[wip] Mod: reject locked chests from different players close quarters

Post Reply
User avatar
chlue
Member
Posts: 19
Joined: Wed Dec 21, 2011 23:08

[wip] Mod: reject locked chests from different players close quarters

by chlue » Post

Hello,

I try to create a mod that disallows locked chests from different players to be placed close to each other, because I am quiet feed up by the fact, that there are a lot of *insert vulgar expression here* around, who seem to only like to destroy other peoples works on public servers. In addition to normal stealing and vandalism filling the area with locked chests seem to be quiet common too and in that case you have basically lost and can only move somewhere else.

For example see here: This was a small house and my locked chest is in the middle of the chestwall
Image

So I thought about fixing some of this aspects with a mod. My dream would be something like this:
- If you find an empty area you can build something and 'protect' it with locked chests
- griefers cannot destroy the area
- griefers cannot surround your chests with other chests. (this is the only thing the mods currently archives)
- If you don't visit the server for some days/weeks, the chest is replaced by a normal chest
--> someone else can reclaim the abandoned area

So far the mod does the following:
- locked chests from different players cannot be placed withing 5 nodes of a locked from another player
- if you punch a locked chest it converts itself to a normal chest keeping the content

But now I am stuck. I don't know how to do the following things:
- store some counter in the metadata of the node
- detect if the owner of the chest has interacted with the chest
- I suspect disallowing digging blocks around a locked chest is not possible in a performance friendly way in lua, or do I miss some nice function here?

I have uploaded the file so far at this place:
https://gitorious.org/chlue-minetest-mo ... ommits/dev

Does anyone have some hints how to proceed (if this is actually possible with the current mod api)

User avatar
Wolfgang
Member
Posts: 37
Joined: Thu Jun 23, 2011 11:21

by Wolfgang » Post

Freemove through enemy's chest to get you stuff.

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Wolfgang posted a solution, but I like your Ideas +1
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Wolfgang
Member
Posts: 37
Joined: Thu Jun 23, 2011 11:21

by Wolfgang » Post

No real solution. Your building is still ruined by the wall.

User avatar
Mineing Master
Member
Posts: 26
Joined: Mon Jun 25, 2012 18:04
Location: Wisconsin
Contact:

by Mineing Master » Post

I tried to download the code but i couldn't git the code please help me.

User avatar
Mito551
Member
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Post

good idea! keep up the hard work, that would help a lot. but the name of the topic is confusing.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests