Clean up stuff

master
Ginger88895 2015-09-20 06:11:10 +00:00
parent d1f3766faa
commit d64fba28e5
29 changed files with 52 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -6,8 +6,8 @@ search_item = 'default:stone'
minetest.register_node("mineral_detector:detector", {
description = "Mineral Detector",
tile_images = {"mineral_detector_none_none_none.png", "default_steel_block.png"},
inventory_image = "mineral_detector_inv.png",
tile_images = {"mineral_detector.png", "default_steel_block.png"},
inventory_image = "mineral_detector.png",
is_ground_content = true,
groups = {cracky=1, level=2},
drop = 'mineral_detector:detector 1',
@ -94,7 +94,7 @@ function(pos, newnode, placer)
if newnode.name == "mineral_detector:detector" then
UpdateDetectorAll(pos, min_search_distance, search_item)
end
if newnode.name == "mineral_detector:materializer" then
if newnode.name == "mineral_detector:materializer" or newnode.name == "mineral_detector:materializer2" then
UpdateMaterializerAll(pos, search_item)
end
end
@ -105,8 +105,8 @@ end
minetest.register_node("mineral_detector:materializer", {
description = "Item Materializer",
tile_images = {"mineral_detector_none_none_none.png", "default_steel_block.png"},
inventory_image = "mineral_detector_inv.png",
tile_images = {"mineral_materializer.png", "default_steel_block.png"},
inventory_image = "mineral_materializer.png",
is_ground_content = true,
groups = {cracky=1, level=2},
drop = 'mineral_detector:materializer 1',
@ -148,3 +148,50 @@ minetest.register_abm({
end,
})
-- Materializer MKII
minetest.register_node("mineral_detector:materializer2", {
description = "Item Materializer MKII",
tile_images = {"mineral_materializer2.png", "default_steel_block.png"},
inventory_image = "mineral_materializer2.png",
is_ground_content = true,
groups = {cracky=1, level=2},
drop = 'mineral_detector:materializer2 1',
metadata_name = "generic",
on_construct = function(pos)
--local n = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[text;;${text}]")
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
fields.text = fields.text or ""
if fields.text == "" then
return
end
UpdateMaterializerAll(pos, fields.text);
end
})
minetest.register_craft({
output = 'mineral_detector:materializer2 1',
recipe = {
{'mineral_detector:materializer', 'mineral_detector:materializer', 'mineral_detector:materializer'},
{'mineral_detector:materializer', 'mineral_detector:materializer', 'mineral_detector:materializer'},
{'mineral_detector:materializer', 'mineral_detector:materializer', 'mineral_detector:materializer'},
}
})
minetest.register_abm({
nodenames = {'mineral_detector:materializer2'},
interval = 10.0,
chance = 100.0,
action = function(pos)
local meta = minetest.get_meta(pos)
pos.y = pos.y+1
if minetest.registered_nodes[meta:get_string("search_item")] ~= nil then
minetest.add_node(pos,{name=meta:get_string("search_item")})
end
end,
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B