Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
03c00a831d | |||
60520b8032 | |||
a9137e8c21 | |||
75ea7e3160 | |||
047ecea3a2 | |||
5518c277f3 | |||
4468015cbe | |||
0755a8fa05 | |||
5d8b2442ce | |||
6157982787 | |||
07dcae7258 | |||
d546a5a1fa | |||
3689bdad75 | |||
4ce47528e1 | |||
2edfb55c29 | |||
d1e715ebac | |||
c654c9fd11 | |||
2c0f716a13 | |||
64bf6c1b89 | |||
047bfb9ad1 | |||
cab01b6694 | |||
554d15fadb |
@ -17,7 +17,7 @@ Additionally, when the minetest engine is tagged to be a certain version (eg.
|
||||
0.4.10), minetest_game is tagged with the version too.
|
||||
|
||||
When stable releases are made, minetest_game is packaged and made available in
|
||||
http://minetest.net/download.php
|
||||
http://minetest.net/download
|
||||
and in case the repository has grown too much, it may be reset. In that sense,
|
||||
this is not a "real" git repository. (Package maintainers please note!)
|
||||
|
||||
|
59
game_api.txt
@ -23,15 +23,21 @@ The bucket API allows registering new types of buckets for non-default liquids.
|
||||
"bucket_lava.png", -- Bucket texture (for wielditem and inventory_image)
|
||||
"Lava Bucket" -- Bucket description
|
||||
)
|
||||
|
||||
|
||||
Doors API
|
||||
---------
|
||||
The doors mod allows modders to register custom doors.
|
||||
The doors mod allows modders to register custom doors and trapdoors.
|
||||
|
||||
doors.register_door(name, def)
|
||||
^ name: "Door name"
|
||||
^ def: See [#Door definition]
|
||||
-> Registers new door
|
||||
|
||||
doors.register_trapdoor(name, def)
|
||||
^ name: "Trapdoor name"
|
||||
^ def: See [#Trapdoor definition]
|
||||
-> Registers new trapdoor
|
||||
|
||||
doors.register_door(name, def)
|
||||
^ name: "Door name"
|
||||
^ def: See [#Door definition]
|
||||
|
||||
#Door definition
|
||||
----------------
|
||||
{
|
||||
@ -52,13 +58,28 @@ The doors mod allows modders to register custom doors.
|
||||
^ If true, only placer can open the door (locked for others)
|
||||
}
|
||||
|
||||
#Trapdoor definition
|
||||
----------------
|
||||
{
|
||||
tile_front = "doors_trapdoor.png",
|
||||
^ the texture for the front and back of the trapdoor
|
||||
tile_side: "doors_trapdoor_side.png",
|
||||
^ the tiles of the four side parts of the trapdoor
|
||||
sound_open = sound to play when opening the trapdoor, OPTIONAL,
|
||||
sound_close = sound to play when closing the trapdoor, OPTIONAL,
|
||||
-> You can add any other node definition properties for minetest.register_node,
|
||||
such as wield_image, inventory_image, sounds, groups, description, ...
|
||||
Only node_box, selection_box, tiles, drop, drawtype, paramtype, paramtype2, on_rightclick
|
||||
will be overwritten by the trapdoor registration function
|
||||
}
|
||||
|
||||
Farming API
|
||||
-----------
|
||||
The farming API allows you to easily register plants and hoes.
|
||||
|
||||
farming.register_hoe(name, hoe definition)
|
||||
-> Register a new hoe, see [#hoe definition]
|
||||
|
||||
|
||||
farming.register_plant(name, Plant definition)
|
||||
-> Register a new growing plant, see [#Plant definition]
|
||||
|
||||
@ -83,7 +104,7 @@ farming.register_plant(name, Plant definition)
|
||||
steps = 8, -- How many steps the plant has to grow, until it can be harvested
|
||||
^ Always provide a plant texture for ech step, format: modname_plantname_i.png (i = stepnumber)
|
||||
minlight = 13, -- Minimum light to grow
|
||||
maxlight = LIGHT_MAX -- Maximum light to grow
|
||||
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
||||
}
|
||||
|
||||
Stairs API
|
||||
@ -99,7 +120,7 @@ stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
|
||||
-> images: see [Tile definition]
|
||||
-> description: used for the description field in the stair's definition
|
||||
-> sounds: see [#Default sounds]
|
||||
|
||||
|
||||
stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
|
||||
-> Registers a slabs
|
||||
-> subname: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
||||
@ -108,13 +129,13 @@ stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
|
||||
-> images: see [Tile definition]
|
||||
-> description: used for the description field in the stair's definition
|
||||
-> sounds: see [#Default sounds]
|
||||
|
||||
|
||||
stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds)
|
||||
-> A wrapper for stairs.register_stair and stairs.register_slab
|
||||
-> Uses almost the same arguments as stairs.register_stair
|
||||
-> desc_stair: Description for stair node
|
||||
-> desc_slab: Description for slab node
|
||||
|
||||
|
||||
Xpanes API
|
||||
----------
|
||||
Creates panes that automatically connect to each other
|
||||
@ -148,6 +169,11 @@ default.node_sound_wood_defaults()
|
||||
default.node_sound_leaves_defaults()
|
||||
default.node_sound_glass_defaults()
|
||||
|
||||
Default constants
|
||||
-----------------
|
||||
default.LIGHT_MAX
|
||||
^ The maximum light level (see [Node definition] light_source)
|
||||
|
||||
Player API
|
||||
----------
|
||||
The player API can register player models and update the player's appearence
|
||||
@ -275,3 +301,14 @@ dye.basecolors
|
||||
|
||||
dye.excolors
|
||||
^ Array containing the names of the available extended colors
|
||||
|
||||
Trees
|
||||
-----
|
||||
default.grow_tree(pos, is_apple_tree)
|
||||
^ Grows a tree or apple tree at pos
|
||||
|
||||
default.grow_jungle_tree(pos)
|
||||
^ Grows a jungletree at pos
|
||||
|
||||
default.grow_pine_tree(pos)
|
||||
^ Grows a pinetree at pos
|
||||
|
@ -1,6 +1,3 @@
|
||||
mg_flags = dungeons
|
||||
mgv6_spflags = biomeblend, jungles
|
||||
|
||||
movement_liquid_sink = 25
|
||||
movement_liquid_fluidity = 0.8
|
||||
movement_liquid_fluidity_smooth = 2
|
||||
|
@ -1,6 +1,8 @@
|
||||
-- Minetest 0.4 mod: bones
|
||||
-- See README.txt for licensing and other information.
|
||||
|
||||
bones = {}
|
||||
|
||||
local function is_owner(pos, name)
|
||||
local owner = minetest.get_meta(pos):get_string("owner")
|
||||
if owner == "" or owner == name then
|
||||
@ -9,6 +11,19 @@ local function is_owner(pos, name)
|
||||
return false
|
||||
end
|
||||
|
||||
bones.bones_formspec =
|
||||
"size[8,9]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
"list[current_name;main;0,0.3;8,4;]"..
|
||||
"list[current_player;main;0,4.85;8,1;]"..
|
||||
"list[current_player;main;0,6.08;8,3;8]"..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
|
||||
local share_bones_time = tonumber(minetest.setting_get("share_bones_time") or 1200)
|
||||
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early") or (share_bones_time/4))
|
||||
|
||||
minetest.register_node("bones:bones", {
|
||||
description = "Bones",
|
||||
tiles = {
|
||||
@ -84,23 +99,47 @@ minetest.register_node("bones:bones", {
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local time = meta:get_int("time")+elapsed
|
||||
local publish = 1200
|
||||
if tonumber(minetest.setting_get("share_bones_time")) then
|
||||
publish = tonumber(minetest.setting_get("share_bones_time"))
|
||||
end
|
||||
if publish == 0 then
|
||||
return
|
||||
end
|
||||
if time >= publish then
|
||||
local time = meta:get_int("time") + elapsed
|
||||
if time >= share_bones_time then
|
||||
meta:set_string("infotext", meta:get_string("owner").."'s old bones")
|
||||
meta:set_string("owner", "")
|
||||
else
|
||||
meta:set_int("time", time)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local function may_replace(pos, player)
|
||||
local node_name = minetest.get_node(pos).name
|
||||
local node_definition = minetest.registered_nodes[node_name]
|
||||
|
||||
-- if the node is unknown, we let the protection mod decide
|
||||
-- this is consistent with when a player could dig or not dig it
|
||||
-- unknown decoration would often be removed
|
||||
-- while unknown building materials in use would usually be left
|
||||
if not node_definition then
|
||||
-- only replace nodes that are not protected
|
||||
return not minetest.is_protected(pos, player:get_player_name())
|
||||
end
|
||||
|
||||
-- allow replacing air and liquids
|
||||
if node_name == "air" or node_definition.liquidtype ~= "none" then
|
||||
return true
|
||||
end
|
||||
|
||||
-- don't replace filled chests and other nodes that don't allow it
|
||||
local can_dig_func = node_definition.can_dig
|
||||
if can_dig_func and not can_dig_func(pos, player) then
|
||||
return false
|
||||
end
|
||||
|
||||
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
|
||||
-- flowers being squished by bones are more realistical than a squished stone, too
|
||||
-- exception are of course any protected buildable_to
|
||||
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name())
|
||||
end
|
||||
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
if minetest.setting_getbool("creative_mode") then
|
||||
return
|
||||
@ -119,26 +158,29 @@ minetest.register_on_dieplayer(function(player)
|
||||
local param2 = minetest.dir_to_facedir(player:get_look_dir())
|
||||
local player_name = player:get_player_name()
|
||||
local player_inv = player:get_inventory()
|
||||
|
||||
local nn = minetest.get_node(pos).name
|
||||
if minetest.registered_nodes[nn].can_dig and
|
||||
not minetest.registered_nodes[nn].can_dig(pos, player) then
|
||||
|
||||
-- drop items instead of delete
|
||||
for i=1,player_inv:get_size("main") do
|
||||
minetest.add_item(pos, player_inv:get_stack("main", i))
|
||||
if (not may_replace(pos, player)) then
|
||||
if (may_replace({x=pos.x, y=pos.y+1, z=pos.z}, player)) then
|
||||
-- drop one node above if there's space
|
||||
-- this should solve most cases of protection related deaths in which players dig straight down
|
||||
-- yet keeps the bones reachable
|
||||
pos.y = pos.y+1
|
||||
else
|
||||
-- drop items instead of delete
|
||||
for i=1,player_inv:get_size("main") do
|
||||
minetest.add_item(pos, player_inv:get_stack("main", i))
|
||||
end
|
||||
for i=1,player_inv:get_size("craft") do
|
||||
minetest.add_item(pos, player_inv:get_stack("craft", i))
|
||||
end
|
||||
-- empty lists main and craft
|
||||
player_inv:set_list("main", {})
|
||||
player_inv:set_list("craft", {})
|
||||
return
|
||||
end
|
||||
for i=1,player_inv:get_size("craft") do
|
||||
minetest.add_item(pos, player_inv:get_stack("craft", i))
|
||||
end
|
||||
-- empty lists main and craft
|
||||
player_inv:set_list("main", {})
|
||||
player_inv:set_list("craft", {})
|
||||
return
|
||||
end
|
||||
|
||||
minetest.dig_node(pos)
|
||||
minetest.add_node(pos, {name="bones:bones", param2=param2})
|
||||
minetest.set_node(pos, {name="bones:bones", param2=param2})
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
@ -158,13 +200,20 @@ minetest.register_on_dieplayer(function(player)
|
||||
player_inv:set_list("main", {})
|
||||
player_inv:set_list("craft", {})
|
||||
|
||||
meta:set_string("formspec", "size[8,9;]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]")
|
||||
meta:set_string("infotext", player_name.."'s fresh bones")
|
||||
meta:set_string("formspec", bones.bones_formspec)
|
||||
meta:set_string("owner", player_name)
|
||||
meta:set_int("time", 0)
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(10)
|
||||
if share_bones_time ~= 0 then
|
||||
meta:set_string("infotext", player_name.."'s fresh bones")
|
||||
|
||||
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
|
||||
meta:set_int("time", 0)
|
||||
else
|
||||
meta:set_int("time", (share_bones_time - share_bones_time_early))
|
||||
end
|
||||
|
||||
minetest.get_node_timer(pos):start(10)
|
||||
else
|
||||
meta:set_string("infotext", player_name.."'s bones")
|
||||
end
|
||||
end)
|
||||
|
@ -82,6 +82,7 @@ creative_inventory.set_creative_formspec = function(player, start_i, pagenum)
|
||||
"list[current_player;main;5,4.75;8,3;8]"..
|
||||
"list[current_player;craft;8,0;3,3;]"..
|
||||
"list[current_player;craftpreview;12,1;1,1;]"..
|
||||
"image[11,1;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
|
||||
"list[detached:creative;main;0.3,0.5;4,6;"..tostring(start_i).."]"..
|
||||
"label[2.0,6.55;"..tostring(pagenum).."/"..tostring(pagemax).."]"..
|
||||
"button[0.3,6.5;1.6,1;creative_prev;<<]"..
|
||||
|
@ -67,7 +67,6 @@ VanessaE (WTFPL):
|
||||
Calinou (CC BY-SA):
|
||||
default_brick.png
|
||||
default_papyrus.png
|
||||
default_copper_lump.png
|
||||
default_mineral_copper.png
|
||||
default_glass_detail.png
|
||||
|
||||
@ -83,7 +82,6 @@ PilzAdam (WTFPL):
|
||||
default_junglewood.png
|
||||
default_obsidian_glass.png
|
||||
default_obsidian_shard.png
|
||||
default_gold_lump.png
|
||||
default_mineral_gold.png
|
||||
default_snowball.png
|
||||
|
||||
@ -119,17 +117,15 @@ BlockMen (CC BY-SA 3.0):
|
||||
default_stone_brick.png
|
||||
default_wood.png
|
||||
default_clay_brick.png
|
||||
default_tool_steelsword.png
|
||||
default_bronze_ingot.png
|
||||
default_copper_ingot.png
|
||||
default_iron_ingot.png
|
||||
default_gold_ingot.png
|
||||
default_tool_steelsword.png
|
||||
default_diamond.png
|
||||
default_diamond_block.png
|
||||
default_book.png
|
||||
default_tool_*.png
|
||||
default_lava_source_animated.png
|
||||
default_lava_flowing_animated.png
|
||||
default_book.png
|
||||
default_paper.png
|
||||
default_stick.png
|
||||
default_chest_front.png
|
||||
default_chest_lock.png
|
||||
@ -189,3 +185,14 @@ Mito551 (sounds) (CC BY-SA):
|
||||
default_dirt_footstep.1.ogg
|
||||
default_dirt_footstep.2.ogg
|
||||
default_glass_footstep.ogg
|
||||
|
||||
Gambit (WTFPL):
|
||||
default_bronze_ingot.png
|
||||
default_copper_ingot.png
|
||||
default_copper_lump.png
|
||||
default_iron_lump.png
|
||||
default_gold_lump.png
|
||||
default_clay_lump.png
|
||||
default_coal.png
|
||||
default_grass_*.png
|
||||
default_paper.png
|
||||
|
@ -1,6 +1,7 @@
|
||||
-- aliases (Minetest 0.4 mod)
|
||||
-- Provides alias for most default items
|
||||
-- mods/default/aliases.lua
|
||||
|
||||
-- Aliases to support loading worlds using nodes following the old naming convention
|
||||
-- These can also be helpful when using chat commands, for example /giveme
|
||||
minetest.register_alias("stone", "default:stone")
|
||||
minetest.register_alias("stone_with_coal", "default:stone_with_coal")
|
||||
minetest.register_alias("stone_with_iron", "default:stone_with_iron")
|
||||
@ -65,3 +66,7 @@ minetest.register_alias("lump_of_iron", "default:iron_lump")
|
||||
minetest.register_alias("lump_of_clay", "default:clay_lump")
|
||||
minetest.register_alias("steel_ingot", "default:steel_ingot")
|
||||
minetest.register_alias("clay_brick", "default:clay_brick")
|
||||
minetest.register_alias("snow", "default:snow")
|
||||
|
||||
-- Mese now comes in the form of blocks, ore, crystal and fragments
|
||||
minetest.register_alias("default:mese", "default:mese_block")
|
||||
|
@ -650,6 +650,12 @@ minetest.register_craft({
|
||||
recipe = "default:cobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:stone",
|
||||
recipe = "default:mossycobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:desert_stone",
|
||||
|
@ -83,50 +83,6 @@ function default.node_sound_glass_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
--
|
||||
-- Legacy
|
||||
--
|
||||
|
||||
function default.spawn_falling_node(p, nodename)
|
||||
spawn_falling_node(p, nodename)
|
||||
end
|
||||
|
||||
-- Horrible crap to support old code
|
||||
-- Don't use this and never do what this does, it's completely wrong!
|
||||
-- (More specifically, the client and the C++ code doesn't get the group)
|
||||
function default.register_falling_node(nodename, texture)
|
||||
minetest.log("error", debug.traceback())
|
||||
minetest.log('error', "WARNING: default.register_falling_node is deprecated")
|
||||
if minetest.registered_nodes[nodename] then
|
||||
minetest.registered_nodes[nodename].groups.falling_node = 1
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Global callbacks
|
||||
--
|
||||
|
||||
-- Global environment step function
|
||||
function on_step(dtime)
|
||||
-- print("on_step")
|
||||
end
|
||||
minetest.register_globalstep(on_step)
|
||||
|
||||
function on_placenode(p, node)
|
||||
--print("on_placenode")
|
||||
end
|
||||
minetest.register_on_placenode(on_placenode)
|
||||
|
||||
function on_dignode(p, node)
|
||||
--print("on_dignode")
|
||||
end
|
||||
minetest.register_on_dignode(on_dignode)
|
||||
|
||||
function on_punchnode(p, node)
|
||||
end
|
||||
minetest.register_on_punchnode(on_punchnode)
|
||||
|
||||
|
||||
--
|
||||
-- Lavacooling
|
||||
--
|
||||
@ -323,3 +279,42 @@ minetest.register_abm({
|
||||
end
|
||||
})
|
||||
|
||||
--
|
||||
-- Grass growing
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt"},
|
||||
interval = 2,
|
||||
chance = 200,
|
||||
action = function(pos, node)
|
||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if nodedef and (nodedef.sunlight_propagates or nodedef.paramtype == "light")
|
||||
and nodedef.liquidtype == "none"
|
||||
and (minetest.get_node_light(above) or 0) >= 13 then
|
||||
if name == "default:snow" or name == "default:snowblock" then
|
||||
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
||||
else
|
||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_grass"},
|
||||
interval = 2,
|
||||
chance = 20,
|
||||
action = function(pos, node)
|
||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if name ~= "ignore" and nodedef
|
||||
and not ((nodedef.sunlight_propagates or nodedef.paramtype == "light")
|
||||
and nodedef.liquidtype == "none") then
|
||||
minetest.set_node(pos, {name = "default:dirt"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -1,16 +1,13 @@
|
||||
-- Minetest 0.4 mod: default
|
||||
-- See README.txt for licensing and other information.
|
||||
|
||||
-- The API documentation in here was moved into doc/lua_api.txt
|
||||
|
||||
WATER_ALPHA = 160
|
||||
WATER_VISC = 1
|
||||
LAVA_VISC = 7
|
||||
LIGHT_MAX = 14
|
||||
-- The API documentation in here was moved into game_api.txt
|
||||
|
||||
-- Definitions made by this mod that other mods can use too
|
||||
default = {}
|
||||
|
||||
default.LIGHT_MAX = 14
|
||||
|
||||
-- GUI related stuff
|
||||
default.gui_bg = "bgcolor[#080808BB;true]"
|
||||
default.gui_bg_img = "background[5,5;1,1;gui_formbg.png;true]"
|
||||
@ -24,7 +21,7 @@ function default.get_hotbar_bg(x,y)
|
||||
return out
|
||||
end
|
||||
|
||||
default.gui_suvival_form = "size[8,8.5]"..
|
||||
default.gui_survival_form = "size[8,8.5]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
@ -46,3 +43,4 @@ dofile(minetest.get_modpath("default").."/mapgen.lua")
|
||||
dofile(minetest.get_modpath("default").."/player.lua")
|
||||
dofile(minetest.get_modpath("default").."/trees.lua")
|
||||
dofile(minetest.get_modpath("default").."/aliases.lua")
|
||||
dofile(minetest.get_modpath("default").."/legacy.lua")
|
||||
|
25
mods/default/legacy.lua
Normal file
@ -0,0 +1,25 @@
|
||||
-- mods/default/legacy.lua
|
||||
|
||||
-- Horrible crap to support old code registering falling nodes
|
||||
-- Don't use this and never do what this does, it's completely wrong!
|
||||
-- (More specifically, the client and the C++ code doesn't get the group)
|
||||
function default.register_falling_node(nodename, texture)
|
||||
minetest.log("error", debug.traceback())
|
||||
minetest.log('error', "WARNING: default.register_falling_node is deprecated")
|
||||
if minetest.registered_nodes[nodename] then
|
||||
minetest.registered_nodes[nodename].groups.falling_node = 1
|
||||
end
|
||||
end
|
||||
|
||||
function default.spawn_falling_node(p, nodename)
|
||||
spawn_falling_node(p, nodename)
|
||||
end
|
||||
|
||||
-- Liquids
|
||||
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
|
||||
WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity
|
||||
LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity
|
||||
LIGHT_MAX = default.LIGHT_MAX
|
||||
|
||||
-- Formspecs
|
||||
default.gui_suvival_form = default.gui_survival_form
|
@ -400,18 +400,9 @@ function default.mgv6_ongen(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--
|
||||
-- Detect mapgen and register suitable on-generated function
|
||||
--
|
||||
|
||||
minetest.register_on_mapgen_init(function(mg_params)
|
||||
if mg_params.mgname == "v6" then
|
||||
minetest.register_on_generated(default.mgv6_ongen)
|
||||
end
|
||||
end)
|
||||
|
||||
--
|
||||
-- Generate nyan cats in all mapgens
|
||||
--
|
||||
@ -465,3 +456,256 @@ function default.generate_nyancats(minp, maxp, seed)
|
||||
end
|
||||
|
||||
minetest.register_on_generated(default.generate_nyancats)
|
||||
|
||||
--
|
||||
-- Register biomes
|
||||
--
|
||||
|
||||
function default.register_biomes()
|
||||
|
||||
minetest.clear_registered_biomes()
|
||||
|
||||
-- Temperate biomes
|
||||
|
||||
minetest.register_biome({
|
||||
name = "grassland",
|
||||
node_top = "default:dirt_with_grass",
|
||||
node_shore_top = "default:sand",
|
||||
depth_top = 1,
|
||||
node_filler = "default:dirt",
|
||||
node_shore_filler = "default:sand",
|
||||
depth_filler = 2,
|
||||
height_shore = 3,
|
||||
node_underwater = "default:sand",
|
||||
--node_stone = "",
|
||||
--node_water_top = "",
|
||||
--depth_water_top = ,
|
||||
--node_water = "",
|
||||
--node_dust = "",
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
--
|
||||
-- Register decorations
|
||||
--
|
||||
|
||||
-- Grassland
|
||||
|
||||
-- Flowers
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.015,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 436,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "flowers:rose",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.015,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 19822,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "flowers:tulip",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.015,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 1220999,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "flowers:dandelion_yellow",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.015,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 36662,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "flowers:geranium",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.015,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 1133,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "flowers:viola",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.015,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 73133,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "flowers:dandelion_white",
|
||||
})
|
||||
|
||||
-- Grasses
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.04,
|
||||
scale = 0.08,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "default:grass_1",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.02,
|
||||
scale = 0.08,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "default:grass_2",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.08,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "default:grass_3",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.02,
|
||||
scale = 0.08,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "default:grass_4",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.04,
|
||||
scale = 0.08,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = -32000,
|
||||
y_max = 32000,
|
||||
decoration = "default:grass_5",
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
--
|
||||
-- Detect mapgen and select suitable biome code
|
||||
--
|
||||
|
||||
local mg_params = minetest.get_mapgen_params()
|
||||
if mg_params.mgname == "v6" then
|
||||
minetest.register_on_generated(default.mgv6_ongen)
|
||||
else
|
||||
default.register_biomes()
|
||||
end
|
||||
|
||||
|
@ -98,7 +98,7 @@ minetest.register_on_joinplayer(function(player)
|
||||
|
||||
-- set GUI
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
player:set_inventory_formspec(default.gui_suvival_form)
|
||||
player:set_inventory_formspec(default.gui_survival_form)
|
||||
end
|
||||
player:hud_set_hotbar_image("gui_hotbar.png")
|
||||
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
|
||||
|
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 256 B |
@ -45,7 +45,7 @@ minetest.register_abm({
|
||||
|
||||
minetest.log("action", "A jungle sapling grows into a tree at "..
|
||||
minetest.pos_to_string(pos))
|
||||
default.grow_jungletree(pos)
|
||||
default.grow_jungle_tree(pos)
|
||||
end
|
||||
})
|
||||
|
||||
@ -60,7 +60,7 @@ minetest.register_abm({
|
||||
|
||||
minetest.log("action", "A pine sapling grows into a tree at "..
|
||||
minetest.pos_to_string(pos))
|
||||
default.grow_pinetree(pos)
|
||||
default.grow_pine_tree(pos)
|
||||
end
|
||||
})
|
||||
|
||||
@ -157,14 +157,14 @@ end
|
||||
|
||||
-- Jungletree
|
||||
|
||||
function default.grow_jungletree(pos, bad)
|
||||
function default.grow_jungle_tree(pos, bad)
|
||||
--[[
|
||||
NOTE: Jungletree-placing code is currently duplicated in the engine
|
||||
and in games that have saplings; both are deprecated but not
|
||||
replaced yet
|
||||
--]]
|
||||
if bad then
|
||||
error("Deprecated use of default.grow_jungletree")
|
||||
error("Deprecated use of default.grow_jungle_tree")
|
||||
end
|
||||
|
||||
local x, y, z = pos.x, pos.y, pos.z
|
||||
@ -220,7 +220,7 @@ local function add_snow(data, vi, c_air, c_ignore, c_snow)
|
||||
end
|
||||
end
|
||||
|
||||
function default.grow_pinetree(pos)
|
||||
function default.grow_pine_tree(pos)
|
||||
local x, y, z = pos.x, pos.y, pos.z
|
||||
local maxy = y + random(9, 13) -- Trunk top
|
||||
|
||||
|
@ -1,22 +1,6 @@
|
||||
doors = {}
|
||||
|
||||
-- Registers a door
|
||||
-- name: The name of the door
|
||||
-- def: a table with the folowing fields:
|
||||
-- description
|
||||
-- inventory_image
|
||||
-- groups
|
||||
-- tiles_bottom: the tiles of the bottom part of the door {front, side}
|
||||
-- tiles_top: the tiles of the bottom part of the door {front, side}
|
||||
-- If the following fields are not defined the default values are used
|
||||
-- node_box_bottom
|
||||
-- node_box_top
|
||||
-- selection_box_bottom
|
||||
-- selection_box_top
|
||||
-- only_placer_can_open: if true only the player who placed the door can
|
||||
-- open it
|
||||
|
||||
|
||||
function doors.register_door(name, def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
|
||||
@ -36,10 +20,10 @@ function doors.register_door(name, def)
|
||||
end
|
||||
|
||||
if not def.sound_close_door then
|
||||
def.sound_close_door = "door_close"
|
||||
def.sound_close_door = "doors_door_close"
|
||||
end
|
||||
if not def.sound_open_door then
|
||||
def.sound_open_door = "door_open"
|
||||
def.sound_open_door = "doors_door_open"
|
||||
end
|
||||
|
||||
|
||||
@ -292,10 +276,10 @@ end
|
||||
|
||||
doors.register_door("doors:door_wood", {
|
||||
description = "Wooden Door",
|
||||
inventory_image = "door_wood.png",
|
||||
inventory_image = "doors_wood.png",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
||||
tiles_bottom = {"door_wood_b.png", "door_brown.png"},
|
||||
tiles_top = {"door_wood_a.png", "door_brown.png"},
|
||||
tiles_bottom = {"doors_wood_b.png", "doors_brown.png"},
|
||||
tiles_top = {"doors_wood_a.png", "doors_brown.png"},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sunlight = false,
|
||||
})
|
||||
@ -311,10 +295,10 @@ minetest.register_craft({
|
||||
|
||||
doors.register_door("doors:door_steel", {
|
||||
description = "Steel Door",
|
||||
inventory_image = "door_steel.png",
|
||||
inventory_image = "doors_steel.png",
|
||||
groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1},
|
||||
tiles_bottom = {"door_steel_b.png", "door_grey.png"},
|
||||
tiles_top = {"door_steel_a.png", "door_grey.png"},
|
||||
tiles_bottom = {"doors_steel_b.png", "doors_grey.png"},
|
||||
tiles_top = {"doors_steel_a.png", "doors_grey.png"},
|
||||
only_placer_can_open = true,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sunlight = false,
|
||||
@ -331,10 +315,10 @@ minetest.register_craft({
|
||||
|
||||
doors.register_door("doors:door_glass", {
|
||||
description = "Glass Door",
|
||||
inventory_image = "door_glass.png",
|
||||
inventory_image = "doors_glass.png",
|
||||
groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1},
|
||||
tiles_bottom = {"door_glass_b.png", "door_glass_side.png"},
|
||||
tiles_top = {"door_glass_a.png", "door_glass_side.png"},
|
||||
tiles_bottom = {"doors_glass_b.png", "doors_glass_side.png"},
|
||||
tiles_top = {"doors_glass_a.png", "doors_glass_side.png"},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sunlight = true,
|
||||
})
|
||||
@ -350,10 +334,10 @@ minetest.register_craft({
|
||||
|
||||
doors.register_door("doors:door_obsidian_glass", {
|
||||
description = "Obsidian Glass Door",
|
||||
inventory_image = "door_obsidian_glass.png",
|
||||
inventory_image = "doors_obsidian_glass.png",
|
||||
groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1},
|
||||
tiles_bottom = {"door_obsidian_glass_b.png", "door_obsidian_glass_side.png"},
|
||||
tiles_top = {"door_obsidian_glass_b.png", "door_obsidian_glass_side.png"},
|
||||
tiles_bottom = {"doors_obsidian_glass_b.png", "doors_obsidian_glass_side.png"},
|
||||
tiles_top = {"doors_obsidian_glass_a.png", "doors_obsidian_glass_side.png"},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sunlight = true,
|
||||
})
|
||||
@ -370,77 +354,69 @@ minetest.register_craft({
|
||||
|
||||
----trapdoor----
|
||||
|
||||
local function update_door(pos, node)
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
function doors.register_trapdoor(name, def)
|
||||
local name_closed = name
|
||||
local name_opened = name.."_open"
|
||||
|
||||
local function punch(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local state = meta:get_int("state")
|
||||
local me = minetest.get_node(pos)
|
||||
local tmp_node
|
||||
local tmp_node2
|
||||
if state == 1 then
|
||||
state = 0
|
||||
minetest.sound_play("door_close", {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
tmp_node = {name="doors:trapdoor", param1=me.param1, param2=me.param2}
|
||||
else
|
||||
state = 1
|
||||
minetest.sound_play("door_open", {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
tmp_node = {name="doors:trapdoor_open", param1=me.param1, param2=me.param2}
|
||||
def.on_rightclick = function (pos, node)
|
||||
local newname = node.name == name_closed and name_opened or name_closed
|
||||
local sound = false
|
||||
if node.name == name_closed then sound = def.sound_open end
|
||||
if node.name == name_opened then sound = def.sound_close end
|
||||
if sound then
|
||||
minetest.sound_play(sound, {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
end
|
||||
minetest.set_node(pos, {name = newname, param1 = node.param1, param2 = node.param2})
|
||||
end
|
||||
update_door(pos, tmp_node)
|
||||
meta:set_int("state", state)
|
||||
|
||||
-- Common trapdoor configuration
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
|
||||
local def_opened = table.copy(def)
|
||||
local def_closed = table.copy(def)
|
||||
|
||||
def_closed.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
|
||||
}
|
||||
def_closed.selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
|
||||
}
|
||||
def_closed.tiles = { def.tile_front, def.tile_front, def.tile_side, def.tile_side,
|
||||
def.tile_side, def.tile_side }
|
||||
|
||||
def_opened.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
|
||||
}
|
||||
def_opened.selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
|
||||
}
|
||||
def_opened.tiles = { def.tile_side, def.tile_side, def.tile_side, def.tile_side,
|
||||
def.tile_front, def.tile_front }
|
||||
def_opened.drop = name_closed
|
||||
def_opened.groups.not_in_creative_inventory = 1
|
||||
|
||||
minetest.register_node(name_opened, def_opened)
|
||||
minetest.register_node(name_closed, def_closed)
|
||||
end
|
||||
|
||||
minetest.register_node("doors:trapdoor", {
|
||||
description = "Trapdoor",
|
||||
inventory_image = "door_trapdoor.png",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"door_trapdoor.png", "door_trapdoor.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
drop = "doors:trapdoor",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
|
||||
},
|
||||
on_creation = function(pos)
|
||||
state = 0
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
punch(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("doors:trapdoor_open", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor_side.png", "door_trapdoor.png", "door_trapdoor.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
pointable = true,
|
||||
stack_max = 0,
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
||||
climbable = true,
|
||||
|
||||
doors.register_trapdoor("doors:trapdoor", {
|
||||
description = "Trapdoor",
|
||||
inventory_image = "doors_trapdoor.png",
|
||||
wield_image = "doors_trapdoor.png",
|
||||
tile_front = "doors_trapdoor.png",
|
||||
tile_side = "doors_trapdoor_side.png",
|
||||
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
drop = "doors:trapdoor",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
punch(pos)
|
||||
end,
|
||||
sound_open = "doors_door_open",
|
||||
sound_close = "doors_door_close"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 539 B After Width: | Height: | Size: 539 B |
@ -23,5 +23,5 @@ Plant definition
|
||||
steps = 8, -- How many steps the plant has to grow, until it can be harvested
|
||||
^ Always provide a plant texture for ech step, format: modname_plantname_i.png (i = stepnumber)
|
||||
minlight = 13, -- Minimum light to grow
|
||||
maxlight = LIGHT_MAX -- Maximum light to grow
|
||||
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
||||
}
|
@ -36,24 +36,13 @@ Created by BlockMen (License: CC BY 3.0):
|
||||
farming_tool_stonehoe.png
|
||||
farming_tool_woodhoe.png
|
||||
|
||||
Created by VanessaE (License: WTFPL):
|
||||
farming_cotton_seed.png
|
||||
farming_wheat_seed.png
|
||||
farming_flour.png
|
||||
Created by MasterGollum (License: WTFPL):
|
||||
farming_straw.png
|
||||
|
||||
Created by Gambit (License: WTFPL):
|
||||
farming_wheat.png
|
||||
farming_wheat_1.png
|
||||
farming_wheat_2.png
|
||||
farming_wheat_3.png
|
||||
farming_wheat_4.png
|
||||
farming_wheat_5.png
|
||||
farming_wheat_5.png
|
||||
farming_wheat_7.png
|
||||
farming_wheat_8.png
|
||||
farming_cotton_1.png
|
||||
farming_cotton_2.png
|
||||
farming_cotton_3.png
|
||||
farming_cotton_4.png
|
||||
farming_cotton_5.png
|
||||
farming_cotton_6.png
|
||||
farming_cotton_7.png
|
||||
farming_cotton_8.png
|
||||
farming_wheat_*.png
|
||||
farming_cotton_*.png
|
||||
farming_flour.png
|
||||
farming_cotton_seed.png
|
||||
farming_wheat_seed.png
|
@ -13,7 +13,7 @@ farming.register_plant("farming:wheat", {
|
||||
inventory_image = "farming_wheat_seed.png",
|
||||
steps = 8,
|
||||
minlight = 13,
|
||||
maxlight = LIGHT_MAX,
|
||||
maxlight = default.LIGHT_MAX,
|
||||
fertility = {"grassland"}
|
||||
})
|
||||
minetest.register_craftitem("farming:flour", {
|
||||
@ -46,7 +46,7 @@ farming.register_plant("farming:cotton", {
|
||||
inventory_image = "farming_cotton_seed.png",
|
||||
steps = 8,
|
||||
minlight = 13,
|
||||
maxlight = LIGHT_MAX,
|
||||
maxlight = default.LIGHT_MAX,
|
||||
fertility = {"grassland", "desert"}
|
||||
})
|
||||
|
||||
@ -59,3 +59,20 @@ minetest.register_craft({
|
||||
{"farming:cotton", "farming:cotton"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Straw
|
||||
minetest.register_craft({
|
||||
output = "farming:straw 3",
|
||||
recipe = {
|
||||
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
||||
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
||||
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:wheat 3",
|
||||
recipe = {
|
||||
{"farming:straw"},
|
||||
}
|
||||
})
|
||||
|
@ -80,6 +80,14 @@ minetest.register_node("farming:desert_sand_soil_wet", {
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("farming:straw", {
|
||||
description = "Straw",
|
||||
tiles = {"farming_straw.png"},
|
||||
is_ground_content = false,
|
||||
groups = {snappy=3, flammable=4},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:field"},
|
||||
interval = 15,
|
||||
|
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 164 B |
BIN
mods/farming/textures/farming_straw.png
Normal file
After Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 141 B |
@ -16,3 +16,6 @@ License of media (textures and sounds)
|
||||
--------------------------------------
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
Created by Gambit (WTFPL):
|
||||
screwdriver.png
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 182 B |
@ -296,3 +296,16 @@ stairs.register_stair_and_slab("pinewood", "default:pinewood",
|
||||
"Pinewood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("obsidian", "default:obsidian",
|
||||
{cracky=1,level=2},
|
||||
{"default_obsidian.png"},
|
||||
"Obsidian Stair",
|
||||
"Obsidian Slab",
|
||||
default.node_sound_stone_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("obsidianbrick", "default:obsidianbrick",
|
||||
{cracky=1,level=2},
|
||||
{"default_obsidian_brick.png"},
|
||||
"Obsidian Brick Stair",
|
||||
"Obsidian Brick Slab",
|
||||
default.node_sound_stone_defaults())
|
||||
|
@ -255,7 +255,7 @@ minetest.register_node("tnt:tnt_burning", {
|
||||
minetest.register_node("tnt:boom", {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"tnt_boom.png"},
|
||||
light_source = LIGHT_MAX,
|
||||
light_source = default.LIGHT_MAX,
|
||||
walkable = false,
|
||||
drop = "",
|
||||
groups = {dig_immediate=3},
|
||||
|