How to disable lava and water source?

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 00:35

Hi all,
We're continually being griefed by people adding lava and water sources to our world.

Is there any way to disable these two items unless a user has a permission to use them?

Thanks!!
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: How to disable lava and water source?

by KCoombes » Thu Feb 11, 2016 01:06

Disable buckets.
 

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

Re: How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 02:51

And how does one do this? :) I looked into it and the best suggestions I could find is to delete a "buckets" mod, but that mod does not exist.
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 

User avatar
oleastre
Member
 
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: How to disable lava and water source?

by oleastre » Thu Feb 11, 2016 08:07

If your server is based on minetest_game, there should be a bucket folder in the games/minetest_game/mods/ folder.
This should remove buckets for everyone.

A more friendly way to do it is to avoid people to create buckets (but let you and permitted users to get one via creative inventory or /giveme command).
To do that, edit the games/minetest_game/mods/bucket/init.lua file and remove the following lines:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_craft({
        output = 'bucket:bucket_empty 1',
        recipe = {
                {'default:steel_ingot', '', 'default:steel_ingot'},
                {'', 'default:steel_ingot', ''},
        }
})
 

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

Re: How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 17:01

Thanks oleastre.

We are running minetestserver on Linux without minetest_game.

Should we be using minetest_game for some reason on our server? Till now I've just been using the engine, and adding any mods I want.
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 

User avatar
oleastre
Member
 
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: How to disable lava and water source?

by oleastre » Thu Feb 11, 2016 17:30

You must have a "game" installed somewhere... otherwise, the engine will not even start and your world would be quite empty :)

minetest_game is the default "game", or world type if you prefer, and it comes bundled with the various minetest distributions.

For example, if you installed minetest from the ubuntu ppa; the game is located in:
/usr/share/games/minetest/games/minetest_game/

Unfortunately, if you change those files, your modifications will be overwritten on the next package update.

But, there is still hope :) You can create a new bucket mod !
Just copy the existing one, modify the init.lua file, and add it to your world as any other mod. It will be used instead of the default one.
 

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

Re: How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 17:34

/usr/share/games/minetest/games/minetest_game/

That's the missing piece :) I was looking for a "games" folder inside ~/.minetest

Thanks for the info... so since I'm about to move over to a git build, looks like I'll find what I need in the places I expect.

So, if "bucket" is a mod, why does it not show up as being able to be disabled in the mod list for the world? Is it just hard-coded to always be in place?
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 

User avatar
oleastre
Member
 
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: How to disable lava and water source?

by oleastre » Thu Feb 11, 2016 17:49

As the bucket mod is part of the game you use, you can not deactivate it from the UI.

And in fact, each game is just a collection of mods working together; minetest_game includes default, beds, boats, bucket ...

On my own little home server, I use my own game that's just a copy of minetest_game with some small tweaks and I added some extra mods in the game's mod folder. The advantage is when I create a new world, I only have to select my game and I have all my mods activated.
 

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

Re: How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 18:09

Interesting. So could I copy the minetest_game folder and create a new subgame containing my preferred mods? Then do I just edit something in my world's folder to tell it which subgame to use? Or how do I connect the two?

Thanks!
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 

User avatar
oleastre
Member
 
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: How to disable lava and water source?

by oleastre » Thu Feb 11, 2016 18:29

Yes you can do that; just copy /usr/share/games/minetest/games/minetest_game to your own folder (like .minetest/games/manglefox).

Then, in that folder, locate the game.conf file and change the name to whatever you want.
You can also change the menu/header.png and menu/icon.png files. Those are used in the UI to visually identify your game (at least, add something in those images to see the difference).

To change an existing world:
- first, make a backup of your world folder !
- next, in the world folder, there is a file named world.mt. In that file, locate the following line and replace "minetest_game" with your game folder name:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
gameid = minetest_game
 

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

Re: How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 18:38

Thank you! Sounds awesome.
I guess if I do this, I just have to keep an eye on minetest_game development and perhaps do a diff on the updated versions to see what I need to add/remove/edit in my subgame, eh?
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 

User avatar
oleastre
Member
 
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: How to disable lava and water source?

by oleastre » Thu Feb 11, 2016 19:42

Yes, that's exactly what I do (In fact, I wrote some scripts that does this for me).

The trick is: when a new version of minetest_game is out, create a diff between the old version and your subgame. Then, apply that diff to the new minetest_game, and you have your new game version.

Do not try to create the diff between two versions of minetest_game and apply that diff to your subgame; it should works, but in case of merge problem, it's more difficult to find what is going wrong and to understand the problem.

If you know how to use git, it's quite easy to do... the magic command is git rebase

:)
 

User avatar
MangleFox70
Member
 
Posts: 61
Joined: Mon Feb 01, 2016 14:50
GitHub: Cat5TV
IRC: MangleFox70
In-game: MangleFox70

Re: How to disable lava and water source?

by MangleFox70 » Thu Feb 11, 2016 19:51

Thanks. New to git, but savvy with the Linux terminal. I'll check out "rebase" to learn more. Thanks again!
#ThePixelShadow on YouTube
A Weekly Minetest Webcast hosted by MangleFox70
Have a mod you'd like featured? Want to participate in our show? Join servers.minetest.tv Port 30000 for creative or 30001 for survival.
Upload your own skin via our web site: Minetest.TV
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 32 guests

cron