minetest.register_tool("modname:admin_stick", {
description = "Admin Stick",
inventory_image = "default_tool_woodaxe.png",
stack_max = 1,
tool_capabilities = {
full_punch_interval = 0.7,
max_drop_level=1,
groupcaps={
choppy ={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
cracky ={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
crumbly={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
snappy ={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
},
damage_groups = {fleshy=10},
},
on_place = function(itemstack, user, pointed_thing)
local privs = minetest.get_player_privs(user:get_player_name())
if privs["server"] then
if pointed_thing.type == "node" then
local pos = pointed_thing.under
minetest.place_schematic(
pos,
-- place air schem to fix lighting and air node for update
{size = {x = 1, y = 1, z = 1}, data = {{name="air", param1=255}}},
"", {}, true)
end
end
end,
})
minetest.register_biome({
name = "minetyst:negxo",
node_dust = "minetyst:negxa_bloko",
node_top = "minetyst:tero_kun_negxo",
depth_top = 1,
node_filler = "minetyst:tero",
depth_filler = 3,
node_stone = "minetyst:sxtono_ciankolora",
node_water_top = "minetyst:glacio",
depth_water_top = 2,
node_water = "minetyst:dolcxakva_fonto",
y_min = -31000,
y_max = 31000,
heat_point = 0,
humidity_point = 100,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "minetyst:tero_kun_negxo",
fill_ratio = 0.005,
sidelen = 16,
biomes = {"minetyst:negxo"},
decoration = "minetyst:pinarbido",
})
minetest.register_node("minetyst:pinarbido", {
description = "Pinarba Grajno",
tiles = {"minetyst-pinarbido.png"},
inventory_image = "minetyst-pinsemo.png",
wield_image = "minetyst-pinsemo.png",
drawtype = "plantlike",
paramtype = "light",
is_ground_content = false,
walkable = false,
groups = {attached_node=1, arbido=1},
arbo = {
axiom = "dddTTTTTTff&&RAA",
rules_a = "[^R+R+RR+RR+RRR]G[^f+f+ff+ff+fff+RRR+RRRR+RRRR+RRRRR]G[^f+f+ff+ff+fff+fff+ffff+ffff+fffff+RRRRR+RRRRRR+RRRRRR+RRRRRRR]G[^f+f+ff+ff+fff+fff+ffff+ffff+fffff+fffff+ffffff+ffffff+fffffff]G",
rules_d = "T",
trunk = "minetyst:pinarbo",
leaves = "minetyst:pinarba_folioj",
leaves2 = "minetyst:strobilo",
leaves2_chance = 10,
angle = 90,
iterations = 2,
random_level = 1,
trunk_type = "single",
fruit_chance = 0,
fruit = "minetyst:negxo"
},
})
minetest.register_on_generated(function(minimumo, maksimumo, semo)
local arbidoj = minetest.find_nodes_in_area(minimumo, maksimumo, "group:arbido")
for elemento,koordinatoj in pairs(arbidoj) do
local arbido = minetest.get_node(koordinatoj)
minetest.remove_node(koordinatoj)
if minetest.get_node({x=koordinatoj.x,y=koordinatoj.y+1,z=koordinatoj.z}).name == "minetyst:negxa_bloko" then
minetest.remove_node({x=koordinatoj.x,y=koordinatoj.y+1,z=koordinatoj.z})
end
minetest.spawn_tree(koordinatoj, minetest.registered_nodes[arbido.name].arbo)
end
end)
y.st. wrote: If someone places a schematic-using sapling under another player's locked chest, that locked chest and all its contents will be destroyed.
y.st. wrote:The problem with placing scematics is that it is a duplication of functionality. Every time an update is made, I have to figure out how to make the same change both in the schematic code and in the minetest.spawn_tree() code. It's hard enough trying to get the minetest.spawn_tree() function alone to play nicely.
Sokomine wrote:...
paramat wrote:...
Users browsing this forum: No registered users and 8 guests