Updated to 2.0

master
jojoa1997 2013-09-04 19:55:03 -04:00
parent a816798f23
commit 481e1ed565
14 changed files with 183 additions and 36 deletions

4
config.lua Normal file
View File

@ -0,0 +1,4 @@
-- Disable to make the uranium only be "technic"uranium". Enable to add "display_blocks:uranium"
enable_display_uranium = true
--Enable to make "technic:uranium" spawning like "display_blocks:uranium".
technic_uranium_new_ore_gen = true

View File

@ -1 +1,2 @@
default
technic?

175
init.lua
View File

@ -1,12 +1,15 @@
technic_uranium = false
local PATH = minetest.get_modpath("display_blocks")
if technic_uranium == false then
dofile(PATH.."/config.lua")
if enable_display_uranium == true then
dofile(minetest.get_modpath("display_blocks").."/uranium.lua")
elseif technic_uranium == true then
minetest.register_alias("display_blocks:uranium_dust", "technic:uranium_block")
minetest.register_alias("display_blocks:uranium_block", "technic:uranium_block")
elseif dofile(minetest.get_modpath("technic")) then
dofile(PATH.."/tecnic.lua")
end
local Scale = 0.9
function disp(base, name, light, rec, rp)
minetest.register_node( "display_blocks:"..base.."_base", {
description = name.."Display Base",
@ -25,8 +28,13 @@ function disp(base, name, light, rec, rp)
tile_images = { "display_blocks_"..base.."_crystal.png" },
is_ground_content = true,
paramtype = "light",
visual_scale = 1.2,
visual_scale = Scale,
groups = {immortal=1, not_in_creative_inventory=1},
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
walkable = false,
})
minetest.register_abm({
@ -66,12 +74,10 @@ disp("glass", "Glass", 0, "default:sand", "")
disp("fire", "Fire", 12, "bucket:bucket_lava" ,"bucket:bucket_empty")
disp("air", "Air", 5, "bucket:bucket_empty", "bucket:bucket_empty")
disp("water", "Water", 0, "bucket:bucket_water", "bucket:bucket_empty")
--[[
disp("uranium", "Uranium", 10, "display_blocks:uranium_block", "")
disp("earth", "Earth", 0, "display_blocks:compressed_earth", "")
disp("metal", "Metal", 2, "default:steel_block", "")
disp("universia", "Universia", 15, "", "")
]]
disp("metal", "Metal", 2, "default:steelblock", "")
if minetest.get_modpath("titanium") then
disp("titanium", "Titanium", 0, "titanium:block", "")
@ -92,8 +98,8 @@ minetest.register_node( "display_blocks:mese_giver_base", {
minetest.register_abm({
nodenames = {"display_blocks:mese_giver_base"},
interval = 60.0,
chance = 2,
interval = 30.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
pos.y = pos.y + 1
minetest.env:add_node(pos, {name="default:mese"})
@ -119,54 +125,121 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'display_blocks:uranium_base 5',
recipe = {
{'', 'default:mese_crystal_fragment', ''},
{'technic:uranium', 'default:glass', 'technic:uranium'},
{'', 'technic:uranium', ''},
}
--
-- Universia Display
--
minetest.register_node( "display_blocks:universia_base", {
description = "Universia Display Base",
tile_images = {"display_blocks_universia_block.png"},
is_ground_content = true,
groups = {cracky=3,},
light_source = 15,
sunlight_propagates = true,
paramtype = "light",
drawtype = "glasslike",
})
--[[
minetest.register_node( "display_blocks:universia_crystal", {
description = "Universia Display Crystal",
drawtype = "plantlike",
tile_images = {"display_blocks_universia_crystal.png"},
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
walkable = false,
is_ground_content = true,
paramtype = "light",
visual_scale = Scale,
groups = {immortal=1, not_in_creative_inventory=1},
})
minetest.register_abm({
nodenames = {"display_blocks:universia_base"},
interval = 1.0,
chance = 1.0,
action = function(pos, node, active_object_count, active_object_count_wider)
pos.y = pos.y + 1
minetest.env:add_node(pos, {name="display_blocks:universia_crystal"})
end
})
function remove_crystal(pos, node, active_object_count, active_object_count_wider)
if
node.name == "display_blocks:universia_base"
then
pos.y = pos.y + 1
minetest.env:remove_node(pos, {name="display_blocks:universia_crystal"})
end
end
minetest.register_on_dignode(remove_crystal)
minetest.register_craft({
output = "display_blocks:universia_base",
recipe = {
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
{'display_blocks:natura_cube', 'display_blocks:mese_giver_base', 'display_blocks:industria_cube'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
},
})
--
-- Other Blocks
--
minetest.register_node("display_blocks:compressed_earth", {
description = "Compressed Dirt",
tile_images = {"display_blocks_compressed_dirt.png"},
description = "Compressed Earth",
tile_images = {"display_blocks_compressed_earth.png"},
groups = {crumbly=3,soil=1},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.25},
}),
light_source = 15,
})
]]
minetest.register_node("display_blocks:empty_display", {
description = "Empty Display",
tile_images = {"display_blocks_empty_display.pmg"},
tile_images = {"display_blocks_empty_display.png"},
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
sunlight_propagates = true,
paramtype = "light",
drawtype = "glasslike",
is_ground_content = true,
})
--[[
minetest.register_node("display_blocks:industria_cube", {
description = "Industria Cube"
tile_images = "display_blocks_industria_cube.png",
description = "Industria Cube",
tile_images = {"display_blocks_industria_cube.png"},
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
sunlight_propagates = true,
paramtype = "light",
drawtype = "glasslike",
is_ground_content = true,
})
minetest.register_node("display_blocks:natura_cube", {
description = "Natura Cube",
tile_images = {"display_blocks_natura_cube.png",
tile_images = {"display_blocks_natura_cube.png"},
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
sunlight_propagates = true,
paramtype = "light",
drawtype = "glasslike",
is_ground_content = true,
})
minetest.register_craft({
output= "display_blocks:compressed_dirt",
output= "display_blocks:compressed_earth",
recipe = {
{'default:gravel', 'default:dirt', 'default:gravel'},
{'default:dirt', 'default:gravel', 'default:dirt'},
{'default:gravel', 'default:dirt', 'default:gravel'},
}
})
]]
minetest.register_craft({
output = "display_blocks:empty_display",
recipe = {
@ -175,7 +248,7 @@ minetest.register_craft({
{'default:sand', 'default:glass', 'default:desert_sand'},
},
})
--[[
minetest.register_craft({
output = "display_blocks:natura_cube",
recipe = {
@ -194,9 +267,41 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "display_blocks:universia_base",
recipe = {{'display_blocks:natura_cube', 'deisplay_blocks:mese_giver', 'display_blocks:industria_cube'}},
--
-- Compressed Earth Ore Gen
--
minetest.register_ore({
ore_type = "scatter",
ore = "display_blocks:compressed_earth",
wherein = "default:dirt",
clust_scarcity = 25*25*25,
clust_num_ores = 20,
clust_size = 5,
height_max = -5,
height_min = -15,
})
]]
minetest.register_ore({
ore_type = "scatter",
ore = "display_blocks:compressed_earth",
wherein = "default:dirt",
clust_scarcity = 20*20*20,
clust_num_ores = 50,
clust_size = 5,
height_max = -16,
height_min = -29,
})
minetest.register_ore({
ore_type = "scatter",
ore = "display_blocks:compressed_earth",
wherein = "default:dirt",
clust_scarcity = 15*15*15,
clust_num_ores = 80,
clust_size = 5,
height_max = -30,
height_min = -100,
})
print("[Display Blocks] Loaded! by jojoa1997 :-)")

37
technic.lua Normal file
View File

@ -0,0 +1,37 @@
if enable_display_uranium == false then
minetest.register_alias("display_blocks:uranium_dust", "technic:uranium_block")
minetest.register_alias("display_blocks:uranium_block", "technic:uranium_block")
end
if technic_uranium_new_ore_gen = true then
minetest.register_ore({
ore_type = "scatter",
ore = "technic:uranium_mineral",
wherein = "default:stone",
clust_scarcity = 20*20*20,
clust_num_ores = 18,
clust_size = 3,
height_min = -3000,
height_max = -2000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:uranium_mineral",
wherein = "default:stone",
clust_scarcity =30*30*30,
clust_num_ores = 40,
clust_size = 4,
height_min = -7000,
height_max = -5000,
})
end
minetest.register_craft({
output = 'display_blocks:uranium_base 5',
recipe = {
{'', 'default:mese_crystal_fragment', ''},
{'technic:uranium', 'default:glass', 'technic:uranium'},
{'', 'technic:uranium', ''},
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -41,7 +41,7 @@ minetest.register_ore({
clust_num_ores =18,
clust_size = 3,
height_min = -3000,
height_max = -200,
height_max = -2000,
})
minetest.register_ore({