Page 1 of 1

[Mod] Mese crystal (fragments) in gravel [1.5][meseingravel]

PostPosted: Sun Jun 29, 2014 11:53
by jaandrle
Hello cubic people, the mod add new way to get mese crystals (mainly crystal fragments). I inspirated by gold prospecting, but you need really big imagination too see it.

Describe
At first you must add gravel block to a bucket with water ...
+ Spoiler
... now you only pour the bucket of a "watergravel" on a ground. But it is important to know that water will disappear if you place the watergravel on nonsolid blocks (sand, gravel, dirt). After a lapse of time you see yellow points on the watergravel texture. You only dig the block and it drops mese a crystal fragment (+ crystal fragment with rarity 2 and another with rarity 4 and mese crystal with rarity 16).

Demonstartion
Image
A few minits after...
Image

For inspiration
Mese mining room, inside the room, containers behind the walls.

Note
If you want take the watergravel back it is better to have empty bucket and shovel. Of course you can use only hands, but ... ;)

Informations
Minetest version: 0.4.9 and newer
Depends: default, bucket (by default)
License: WTFPL (code), CC BY-SA 3.0 (texture ... modify default texture pack)
Download: Meseingravel_v1.5 (short url: http://1drv.ms/1mjDfjg)
Old: Meseingravel_v1
Browse source code: Github

Re: [Mod] Mese crystal (fragments) in gravel [v1] [meseingra

PostPosted: Sun Jun 29, 2014 13:57
by DS-minetest
WOW good idea and very nice

Re: [Mod] Mese crystal (fragments) in gravel [v1] [meseingra

PostPosted: Mon Jun 30, 2014 03:38
by philipbenr
I'm a prospector! Go pannin' for gold, an strike it rich!
Also, a use for gravel. ;)

Re: [Mod] Mese crystal (fragments) in gravel [v1] [meseingra

PostPosted: Thu Jul 17, 2014 01:14
by kerikter4of7
Oh, thank you for thinking of this, this will make casual playing so much more enjoyable. I'm sure someone could tie in a couple other "finds" in this, should be interesting.

Re: [Mod] Mese crystal (fragments) in gravel [v1] [meseingra

PostPosted: Thu Jul 31, 2014 17:56
by trainwrecktony
Received this error today, think it has happened before but deleted debug since and forgot to mention it

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
12:55:37: ERROR[main]: ERROR: An unhandled exception occurred: c:\minetestdev\bin\..\games\twt\mods\meseingravel\init.lua:33: attempt to call method 'get_puncher_control' (a nil value)
12:55:37: ERROR[main]: stack traceback:
12:55:37: ERROR[main]:    c:\minetestdev\bin\..\games\twt\mods\meseingravel\init.lua:33: in function <c:\minetestdev\bin\..\games\twt\mods\meseingravel\init.lua:16>

Re: [Mod] Mese crystal (fragments) in gravel [v1] [meseingra

PostPosted: Tue Aug 05, 2014 18:14
by Cryterion
Here's the image of an automated machine to process it, sometimes I get the wet gravel node through the node breaker, not sure if this is the possible cause of Tony's error, as the system runs on Tony's server.

download/file.php?id=960

EDIT: noted that wet gravel requires an empty bucket to be dug!!!

Re: [Mod] Mese crystal (fragments) in gravel [v1] [meseingra

PostPosted: Tue Aug 05, 2014 19:15
by jaandrle
to trainwrecktony: bug is fixed in new version
to Cryterion:
Cryterion wrote:... not sure if this is the possible cause of Tony's error ...

probably not
Cryterion wrote:... sometimes I get the wet gravel node through the node breaker ...

I have not this problem, but I am looking at it and trying fix it

Re: [Mod] Mese crystal (fragments) in gravel [1.5][meseingra

PostPosted: Thu Aug 14, 2014 11:54
by Cryterion
I rechecked with your latest version and can confirm a node-breaker will remove the wetgravel node.

Hope you don't mind, but I jumped into the source to see if I could find it and came up with the following: -

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_node("meseingravel:watergravel_1", {
   tiles = {"meseingravel_watergravel_1.png"},
   groups = {falling_node=1},
   diggable = false,
   on_punch = function(pos, node, puncher)
   -- \check\ If you have a shovel and an empty bucket, your bucket will be replaced by bucket_gravel
         local tool = puncher:get_wielded_item():get_name()
         if string.find(tool, "shovel") then
            diggable = true
            for i=0, 32, 1 do
               name = puncher:get_inventory():get_stack("main", i):get_name()
               if name == "bucket:bucket_empty" then
                  puncher:get_inventory():remove_item("main", "bucket:bucket_empty 1")
                  puncher:get_inventory():add_item("main", "meseingravel:bucket_gravel 1")
                  minetest.remove_node(pos)
                  return
               end
            end
            minetest.remove_node(pos)
            minetest.add_node(pos, {name="default:water_source"})
            minetest.add_item(pos, {name="default:gravel"})
   -- /check/
         else
   -- | If you have not shovel the watergravel_ will be replaced by water and drop gravel
         minetest.remove_node(pos)
         minetest.add_node(pos, {name="default:water_source"})
         minetest.add_item(pos, {name="default:gravel"})
         end
   end,
   sounds = default.node_sound_dirt_defaults({
      footstep = {name="default_gravel_footstep", gain=0.45},
   })
})


made the node diggable = false unless the wielded tool is a shovel, then switches to true.
Also added extra lines to make the gravel drop from the water if using a shovel, but without an available empty bucket. This way, the gravel drops out on all tools or punch ;)

It doesn't allow the node breaker to remove the node with a bucket however, but don't why anyone would if you're putting it out to dry!

Re: [Mod] Mese crystal (fragments) in gravel [1.5][meseingra

PostPosted: Fri Aug 15, 2014 20:26
by jaandrle
Cryterion wrote:... Hope you don't mind, but I jumped into the source to see if I could find it and came up with the following: ...

No, all suggestions are welcome. I am working on some improvements of the mod. So I am including my and yours ideas in new version.