more grass + story mod update

This commit is contained in:
cale 2016-01-25 18:01:46 +01:00
parent 8424c61949
commit 8298775602
12 changed files with 302 additions and 44 deletions

View File

@ -116,20 +116,65 @@ minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
noise_params = {
offset = -0.015,
scale = 0.5,
spread = {x=200, y=200, z=200},
seed = 329,
octaves = 3,
persist = 0.6
fill_ratio = 0.07,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.07,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass_2",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.06,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass_3",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.04,
biomes = {
"grassland"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass",
decoration = "default:plant_grass_4",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.04,
biomes = {
"grassland"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass_5",
})
minetest.register_decoration({

View File

@ -116,20 +116,65 @@ minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
noise_params = {
offset = -0.015,
scale = 0.5,
spread = {x=200, y=200, z=200},
seed = 329,
octaves = 3,
persist = 0.6
fill_ratio = 0.07,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.07,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass_2",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.06,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass_3",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.04,
biomes = {
"grassland"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass",
decoration = "default:plant_grass_4",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.04,
biomes = {
"grassland"
},
y_min = 0,
y_max = 31000,
decoration = "default:plant_grass_5",
})
minetest.register_decoration({

View File

@ -347,6 +347,54 @@ minetest.register_node("default:plant_grass", {
groups = {crumbly = 3, plant = 1},
})
minetest.register_node("default:plant_grass_2", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_2.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_2.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:plant_grass_3", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_3.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_3.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:plant_grass_4", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_4.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_4.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:plant_grass_5", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_5.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_5.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:flower_1", {
description = "Flower",
tiles = {"default_flower_1.png"},

View File

@ -347,6 +347,54 @@ minetest.register_node("default:plant_grass", {
groups = {crumbly = 3, plant = 1},
})
minetest.register_node("default:plant_grass_2", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_2.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_2.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:plant_grass_3", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_3.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_3.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:plant_grass_4", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_4.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_4.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:plant_grass_5", {
description = "Grass (Plant)",
tiles = {"default_plant_grass_5.png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = "default_plant_grass_5.png",
buildable_to = true,
walkable = false,
groups = {crumbly = 3, plant = 1},
drop = "default:plant_grass",
})
minetest.register_node("default:flower_1", {
description = "Flower",
tiles = {"default_flower_1.png"},

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

View File

@ -53,6 +53,38 @@ minetest.override_item("default:plant_grass", {drop = {
}
}})
minetest.override_item("default:plant_grass_2", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.override_item("default:plant_grass_3", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.override_item("default:plant_grass_4", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.override_item("default:plant_grass_5", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.register_craftitem("farming:flour", {
description = "Flour",
inventory_image = "farming_flour.png",

View File

@ -53,6 +53,38 @@ minetest.override_item("default:plant_grass", {drop = {
}
}})
minetest.override_item("default:plant_grass_2", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.override_item("default:plant_grass_3", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.override_item("default:plant_grass_4", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.override_item("default:plant_grass_5", {drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}})
minetest.register_craftitem("farming:flour", {
description = "Flour",
inventory_image = "farming_flour.png",

View File

@ -39,8 +39,8 @@ end)
story.generator = {}
story.generator.names = {"A", "B", "C", "D", "E", "F", "G"}
story.generator.file_paths = {minetest.get_modpath(minetest.get_current_modname()).."/parts/test"}
story.generator.parts = {}
story.generator.dialogs = {}
story.generator.players_storys = {}
function story.generator.gen_next_step(player)
@ -85,21 +85,26 @@ function story.generator.new_player(player)
story.generator.players_storys[player:get_player_name()].met_characters_num = 0
end
function story.generator.load_parts()
-- testing
local file = io.open(story.generator.file_paths[1], "r")
story.generator.parts[1] = file:read()
io.close(file)
function story.generator.get_part(name)
if not story.generator.parts[name] then
local file = io.open(minetest.get_modpath(minetest.get_current_modname()).."/parts/"..name..".part", "r")
story.generator.parts[name] = file:read()
io.close(file)
return story.generator.parts[name]
else
return story.generator.parts[name]
end
end
function story.generator.gen_dialog(player)
-- coming soon
str = ""
for i = 0, 10 do
str = str
function story.generator.get_dialog(name)
if not story.generator.dialogs[name] then
local file = io.open(minetest.get_modpath(minetest.get_current_modname()).."/parts/"..name..".dialog", "r")
story.generator.dialogs[name] = file:read()
io.close(file)
return story.generator.dialogs[name]
else
return story.generator.dialogs[name]
end
return str
end
minetest.register_on_newplayer(function(player)
@ -165,4 +170,3 @@ minetest.register_craftitem("story:human", {
end,
})
story.generator.load_parts()

View File

@ -39,8 +39,8 @@ end)
story.generator = {}
story.generator.names = {"A", "B", "C", "D", "E", "F", "G"}
story.generator.file_paths = {minetest.get_modpath(minetest.get_current_modname()).."/parts/test"}
story.generator.parts = {}
story.generator.dialogs = {}
story.generator.players_storys = {}
function story.generator.gen_next_step(player)
@ -85,21 +85,26 @@ function story.generator.new_player(player)
story.generator.players_storys[player:get_player_name()].met_characters_num = 0
end
function story.generator.load_parts()
-- testing
local file = io.open(story.generator.file_paths[1], "r")
story.generator.parts[1] = file:read()
io.close(file)
function story.generator.get_part(name)
if not story.generator.parts[name] then
local file = io.open(minetest.get_modpath(minetest.get_current_modname()).."/parts/"..name..".part", "r")
story.generator.parts[name] = file:read()
io.close(file)
return story.generator.parts[name]
else
return story.generator.parts[name]
end
end
function story.generator.gen_dialog(player)
-- coming soon
str = ""
for i = 0, 10 do
str = str
function story.generator.get_dialog(name)
if not story.generator.dialogs[name] then
local file = io.open(minetest.get_modpath(minetest.get_current_modname()).."/parts/"..name..".dialog", "r")
story.generator.dialogs[name] = file:read()
io.close(file)
return story.generator.dialogs[name]
else
return story.generator.dialogs[name]
end
return str
end
minetest.register_on_newplayer(function(player)
@ -165,4 +170,3 @@ minetest.register_craftitem("story:human", {
end,
})
story.generator.load_parts()