Mineral Detector
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
Mineral Detector
When placed the mineral detector scans all the blocks around it and gives you an indication of how much iron, coal and mese is found. The face of the detector will show colored dots if any is found and when you hove the cursor over the block it will tell you exact amounts.
UPDATE:
- Changed textures to remove compass style
- Added variable range (each time placed node is punched it will cycle through min and max ranges, 4 to 12 for now)
Updated for code changes March 2012
License: Public Domain
https://gitorious.org/randomproofs-mine ... its/master
Craft Recipe:
Detector in action:
UPDATE:
- Changed textures to remove compass style
- Added variable range (each time placed node is punched it will cycle through min and max ranges, 4 to 12 for now)
Updated for code changes March 2012
License: Public Domain
https://gitorious.org/randomproofs-mine ... its/master
Craft Recipe:
Detector in action:
Last edited by randomproof on Mon Mar 19, 2012 23:09, edited 1 time in total.
- MrThebuilder3
- Member
- Posts: 104
- Joined: Sat Nov 19, 2011 18:26
-
- Member
- Posts: 141
- Joined: Wed Dec 14, 2011 19:50
- Location: B.C Canada
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
- MrThebuilder3
- Member
- Posts: 104
- Joined: Sat Nov 19, 2011 18:26
aww i really wanted to use this but: 18:52:17: ERROR[main]: Error loading mod "randomproofs-minetest-mods-mineral_detector": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
18:52:17: ERROR[main]: Server: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
BanManager: saving to C:\Users\family\Desktop\m4\bin\..\world\ipban.txt
AuthManager: saving to C:\Users\family\Desktop\m4\bin\..\world\auth.txt
18:52:17: ERROR[main]: ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: error_message = ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: Check debug.txt for details.
18:52:17: INFO[main]: Created main menu
18:52:17: ERROR[main]: Server: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
BanManager: saving to C:\Users\family\Desktop\m4\bin\..\world\ipban.txt
AuthManager: saving to C:\Users\family\Desktop\m4\bin\..\world\auth.txt
18:52:17: ERROR[main]: ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: error_message = ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: Check debug.txt for details.
18:52:17: INFO[main]: Created main menu
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
UPDATE:
- Changed textures to remove compass style
- Added variable range (each time placed node is punched it will cycle through min and max ranges, 4 to 12 for now)
- Changed textures to remove compass style
- Added variable range (each time placed node is punched it will cycle through min and max ranges, 4 to 12 for now)
Last edited by randomproof on Fri Dec 23, 2011 00:57, edited 1 time in total.
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
If you are downloading the compressed archive you need to change the directory it is in to "mineral_detector", take out the "randomproofs-minetest-mods-" part. I need to look in to renaming all of my mods to match the default created directory, but that will most likely have to wait until tomorrow.MrThebuilder3 wrote:aww i really wanted to use this but: 18:52:17: ERROR[main]: Error loading mod "randomproofs-minetest-mods-mineral_detector": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
18:52:17: ERROR[main]: Server: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
BanManager: saving to C:\Users\family\Desktop\m4\bin\..\world\ipban.txt
AuthManager: saving to C:\Users\family\Desktop\m4\bin\..\world\auth.txt
18:52:17: ERROR[main]: ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: error_message = ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: Check debug.txt for details.
18:52:17: INFO[main]: Created main menu
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
I've thought of that and I will do that tomorrow. I've been thinking about how much info to give the player. I could go so far as to say how many ore blocks are at each range. I don't think it is good to give to much, though.sapier wrote:what about making it smaler range and only supporting on specific ore?
Last edited by randomproof on Fri Dec 23, 2011 01:05, edited 1 time in total.
- MrThebuilder3
- Member
- Posts: 104
- Joined: Sat Nov 19, 2011 18:26
ok thanks:)randomproof wrote:If you are downloading the compressed archive you need to change the directory it is in to "mineral_detector", take out the "randomproofs-minetest-mods-" part. I need to look in to renaming all of my mods to match the default created directory, but that will most likely have to wait until tomorrow.MrThebuilder3 wrote:aww i really wanted to use this but: 18:52:17: ERROR[main]: Error loading mod "randomproofs-minetest-mods-mineral_detector": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
18:52:17: ERROR[main]: Server: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
BanManager: saving to C:\Users\family\Desktop\m4\bin\..\world\ipban.txt
AuthManager: saving to C:\Users\family\Desktop\m4\bin\..\world\auth.txt
18:52:17: ERROR[main]: ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: error_message = ModError: Failed to load and run C:\Users\family\Desktop\m4\bin\..\data\mods\randomproofs-minetest-mods-mineral_detector\init.lua
18:52:17: ERROR[main]: Check debug.txt for details.
18:52:17: INFO[main]: Created main menu
- MrThebuilder3
- Member
- Posts: 104
- Joined: Sat Nov 19, 2011 18:26
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
I've got this message while trying to put detector on the ground.
Code: Select all
19:54:34: ACTION[ServerThread]: hurufu places material 2086 at (-14,-4,-72)
terminate called after throwing an instance of 'LuaError'
what(): LuaError: error: ...test-0.4d/bin/../data/mods/mineral_detector/init.lua:504: attempt to index global 'node' (a nil value)
stack traceback:
Aborted
Last edited by hurufu on Wed Dec 28, 2011 19:01, edited 1 time in total.
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
My bad for not testing the way I should have.hurufu wrote:I've got this message while trying to put detector on the ground.Code: Select all
19:54:34: ACTION[ServerThread]: hurufu places material 2086 at (-14,-4,-72) terminate called after throwing an instance of 'LuaError' what(): LuaError: error: ...test-0.4d/bin/../data/mods/mineral_detector/init.lua:504: attempt to index global 'node' (a nil value) stack traceback: Aborted
I've uploaded the fix but here it is too:
Code: Select all
minetest.register_on_placenode(
function(pos, newnode, placer)
if string.match(newnode.name, "mineral_detector:") ~= nil then
local meta = minetest.env:get_meta(pos)
meta:set_infotext("")
if newnode.name == "mineral_detector:detector" then
UpdateDetectorAll(pos, min_search_distance)
elseif newnode.name == "mineral_detector:iron_detector" then
UpdateDetectorIron(pos, min_search_distance)
elseif newnode.name == "mineral_detector:coal_detector" then
UpdateDetectorCoal(pos, min_search_distance)
elseif newnode.name == "mineral_detector:mese_detector" then
UpdateDetectorMese(pos, min_search_distance)
end
end
end
)
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
Who is online
Users browsing this forum: Kazooo and 24 guests