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

chlue
Member
 
Posts: 19
Joined: Wed Dec 21, 2011 23:08

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

by chlue » Thu Jan 05, 2012 20:36

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-mods/mod-spreaded_locked_chests/commits/dev

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

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

by Wolfgang » Thu Jan 05, 2012 20:50

Freemove through enemy's chest to get you stuff.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Thu Jan 05, 2012 20:52

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

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

by Wolfgang » Thu Jan 05, 2012 20:57

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

by Mineing Master » Mon Jun 25, 2012 18:06

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 » Mon Jun 25, 2012 19:34

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


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 16 guests

cron