Update: add light staff and change crystal usage
This commit is contained in:
parent
741504fbf3
commit
e18a5e913a
@ -27,7 +27,7 @@ minetest.register_craft({
|
||||
output = "ethereal:crystal_ingot",
|
||||
recipe = {
|
||||
{"default:mese_crystal", "ethereal:crystal_spike", ""},
|
||||
{"", "", ""},
|
||||
{"ethereal:crystal_spike", "default:mese_crystal", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
||||
|
42
extra.lua
42
extra.lua
@ -264,6 +264,48 @@ minetest.register_node("ethereal:illumishroom3", {
|
||||
},
|
||||
})
|
||||
|
||||
local USES = 100
|
||||
|
||||
-- Staff of Light (by Xanthin)
|
||||
minetest.register_tool("ethereal:light_staff", {
|
||||
description = "Staff of Light",
|
||||
inventory_image = "light_staff.png",
|
||||
stack_max = 1,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
|
||||
local pos = pointed_thing.under
|
||||
|
||||
if pointed_thing.type ~= "node" then return end
|
||||
|
||||
if minetest.is_protected(pos, user:get_player_name()) then
|
||||
minetest.record_protection_violation(pos, user:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos).name
|
||||
|
||||
if node == "default:stone" then
|
||||
minetest.env:add_node(pos, {name="ethereal:glostone"})
|
||||
elseif node == "ethereal:glostone" then
|
||||
minetest.env:add_node(pos, {name="default:stone"})
|
||||
end
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535 / (USES - 1))
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ethereal:light_staff",
|
||||
recipe = {
|
||||
{"ethereal:illumishroom", "default:mese_crystal", "ethereal:illumishroom"},
|
||||
{"ethereal:illumishroom2", "default:steel_ingot", "ethereal:illumishroom2"},
|
||||
{"ethereal:illumishroom3", "default:steel_ingot", "ethereal:illumishroom3"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Generate Illumishroom in caves next to coal
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
||||
|
22
flowers.lua
22
flowers.lua
@ -2,8 +2,8 @@
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:flora"},
|
||||
neighbors = {"group:soil"},
|
||||
interval = 40,
|
||||
chance = 20,
|
||||
interval = 50,
|
||||
chance = 25,
|
||||
action = function(pos, node)
|
||||
|
||||
local light = minetest.get_node_light(pos)
|
||||
@ -17,15 +17,15 @@ minetest.register_abm({
|
||||
|
||||
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then
|
||||
|
||||
local crystal = minetest.find_nodes_in_area(pos0, pos1, {"ethereal:crystalgrass"})
|
||||
local frost = minetest.find_nodes_in_area(pos0, pos1, {"ethereal:frost_tree"})
|
||||
if #crystal > 6 and #frost > 7 then
|
||||
local ppos = crystal[1]
|
||||
ppos.y = ppos.y - 1
|
||||
local nod = minetest.get_node(ppos).name
|
||||
ppos.y = ppos.y + 1
|
||||
if nod == "ethereal:crystal_dirt" then
|
||||
minetest.set_node(crystal[1], {name="ethereal:crystal_spike"})
|
||||
local grass = minetest.find_nodes_in_area(pos0, pos1, {"ethereal:crystalgrass"})
|
||||
local crystal = minetest.find_nodes_in_area(pos0, pos1, {"ethereal:crystal_spike"})
|
||||
|
||||
if #grass > 6 and #crystal < 1 then
|
||||
grass = grass[math.random(#grass)]
|
||||
grass.y = grass.y - 1
|
||||
if minetest.get_node(grass).name == "ethereal:crystal_dirt" then
|
||||
grass.y = grass.y + 1
|
||||
minetest.set_node(grass, {name="ethereal:crystal_spike"})
|
||||
end
|
||||
end
|
||||
|
||||
|
2
init.lua
2
init.lua
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
|
||||
Minetest Ethereal Mod 1.14 (20th Jan 2015)
|
||||
Minetest Ethereal Mod 1.14 (4th Feb 2015)
|
||||
|
||||
Created by ChinChow
|
||||
|
||||
|
BIN
textures/light_staff.png
Normal file
BIN
textures/light_staff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 B |
Loading…
Reference in New Issue
Block a user