Merge pull request #259 from LeMagnesium/mffgame-merge
Update MinetestForFunGame
4
minetestforfun_game/.gitignore
vendored
@ -1,7 +1,9 @@
|
|||||||
## Generic ignorable patterns and files
|
## Generic ignorable patterns and files
|
||||||
*~
|
*~
|
||||||
.*.swp
|
.*.swp
|
||||||
*.bak*
|
*bak*
|
||||||
tags
|
tags
|
||||||
*.vim
|
*.vim
|
||||||
|
|
||||||
|
## Files related to minetest development cycle
|
||||||
|
*.patch
|
||||||
|
@ -24,13 +24,55 @@ The bucket API allows registering new types of buckets for non-default liquids.
|
|||||||
"Lava Bucket" -- Bucket description
|
"Lava Bucket" -- Bucket description
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Beds API
|
||||||
|
--------
|
||||||
|
beds.register_bed(
|
||||||
|
"beds:bed", -- Bed name
|
||||||
|
def: See [#Bed definition] -- Bed definition
|
||||||
|
)
|
||||||
|
|
||||||
|
beds.read_spawns() -- returns a table containing players respawn positions
|
||||||
|
beds.kick_players() -- forces all players to leave bed
|
||||||
|
beds.skip_night() -- sets world time to morning and saves respawn position of all players currently sleeping
|
||||||
|
|
||||||
|
#Bed definition
|
||||||
|
---------------
|
||||||
|
{
|
||||||
|
description = "Simple Bed",
|
||||||
|
inventory_image = "beds_bed.png",
|
||||||
|
wield_image = "beds_bed.png",
|
||||||
|
tiles = {
|
||||||
|
bottom = {[Tile definition],
|
||||||
|
^ the tiles of the bottom part of the bed
|
||||||
|
},
|
||||||
|
top = {[Tile definition],
|
||||||
|
^ the tiles of the bottom part of the bed
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nodebox = {
|
||||||
|
bottom = regular nodebox, see [Node boxes], -- bottm part of bed
|
||||||
|
top = regular nodebox, see [Node boxes], -- top part of bed
|
||||||
|
},
|
||||||
|
selectionbox = regular nodebox, see [Node boxes], -- for both nodeboxes
|
||||||
|
recipe = { -- Craft recipe
|
||||||
|
{"group:wool", "group:wool", "group:wool"},
|
||||||
|
{"group:wood", "group:wood", "group:wood"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Doors API
|
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)
|
doors.register_door(name, def)
|
||||||
^ name: "Door name"
|
^ name: "Door name"
|
||||||
^ def: See [#Door definition]
|
^ def: See [#Door definition]
|
||||||
|
-> Registers new door
|
||||||
|
|
||||||
|
doors.register_trapdoor(name, def)
|
||||||
|
^ name: "Trapdoor name"
|
||||||
|
^ def: See [#Trapdoor definition]
|
||||||
|
-> Registers new trapdoor
|
||||||
|
|
||||||
#Door definition
|
#Door definition
|
||||||
----------------
|
----------------
|
||||||
@ -46,10 +88,27 @@ The doors mod allows modders to register custom doors.
|
|||||||
node_box_top = regular nodebox, see [Node boxes], OPTIONAL,
|
node_box_top = regular nodebox, see [Node boxes], OPTIONAL,
|
||||||
selection_box_bottom = regular nodebox, see [Node boxes], OPTIONAL,
|
selection_box_bottom = regular nodebox, see [Node boxes], OPTIONAL,
|
||||||
selection_box_top = regular nodebox, see [Node boxes], OPTIONAL,
|
selection_box_top = regular nodebox, see [Node boxes], OPTIONAL,
|
||||||
|
sound_open_door = sound play for open door, OPTIONAL,
|
||||||
|
sound_close_door = sound play for close door, OPTIONAL,
|
||||||
only_placer_can_open = true/false,
|
only_placer_can_open = true/false,
|
||||||
^ If true, only placer can open the door (locked for others)
|
^ 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
|
Farming API
|
||||||
-----------
|
-----------
|
||||||
The farming API allows you to easily register plants and hoes.
|
The farming API allows you to easily register plants and hoes.
|
||||||
@ -66,7 +125,8 @@ farming.register_plant(name, Plant definition)
|
|||||||
description = "", -- Description for tooltip
|
description = "", -- Description for tooltip
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
||||||
max_uses = 30, -- Uses until destroyed
|
max_uses = 30, -- Uses until destroyed
|
||||||
recipe = { -- Craft recipe
|
material = "", -- Material for recipes
|
||||||
|
recipe = { -- Craft recipe, if material isn't used
|
||||||
{"air", "air", "air"},
|
{"air", "air", "air"},
|
||||||
{"", "group:stick"},
|
{"", "group:stick"},
|
||||||
{"", "group:stick"},
|
{"", "group:stick"},
|
||||||
@ -79,11 +139,26 @@ farming.register_plant(name, Plant definition)
|
|||||||
description = "", -- Description of seed item
|
description = "", -- Description of seed item
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
|
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
|
||||||
steps = 8, -- How many steps the plant has to grow, until it can be harvested
|
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)
|
^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
|
||||||
minlight = 13, -- Minimum light to grow
|
minlight = 13, -- Minimum light to grow
|
||||||
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Screwdriver API
|
||||||
|
---------------
|
||||||
|
The screwdriver API allows you to control a node's behaviour when a screwdriver is used on it.
|
||||||
|
To use it, add the on_screwdriver function to the node definition.
|
||||||
|
on_rotate(pos, node, user, mode, new_param2)
|
||||||
|
^ pos: position of the node that the screwdriver is being used on
|
||||||
|
^ node: that node
|
||||||
|
^ user: the player who used the screwdriver
|
||||||
|
^ mode: screwdriver.ROTATE_FACE or screwdriver.ROTATE_AXIS
|
||||||
|
^ new_param2: the new value of param2 that would have been set if on_rotate wasn't there
|
||||||
|
^ return value: false to disallow rotation, nil to keep default behaviour, true to allow
|
||||||
|
it but to indicate that changed have already been made (so the screwdriver will wear out)
|
||||||
|
^ use on_rotate = screwdriver.disallow to always disallow rotation
|
||||||
|
^ use on_rotate = screwdriver.rotate_simple to allow only face rotation
|
||||||
|
|
||||||
Stairs API
|
Stairs API
|
||||||
----------
|
----------
|
||||||
The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those
|
The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those
|
||||||
@ -118,7 +193,7 @@ Xpanes API
|
|||||||
Creates panes that automatically connect to each other
|
Creates panes that automatically connect to each other
|
||||||
|
|
||||||
xpanes.register_pane(subname, def)
|
xpanes.register_pane(subname, def)
|
||||||
-> subname: used for nodename. Result: "xpanes:subname_{1..16}"
|
-> subname: used for nodename. Result: "xpanes:subname" and "xpanes:subname_{2..15}"
|
||||||
-> def: See [#Pane definition]
|
-> def: See [#Pane definition]
|
||||||
|
|
||||||
#Pane definition
|
#Pane definition
|
||||||
@ -132,12 +207,26 @@ xpanes.register_pane(subname, def)
|
|||||||
^ See [#Default sounds]
|
^ See [#Default sounds]
|
||||||
recipe = {{"","","","","","","","",""}},
|
recipe = {{"","","","","","","","",""}},
|
||||||
^ Recipe field only
|
^ Recipe field only
|
||||||
on_construct = function(pos)
|
|
||||||
update_pane(pos, "pane")
|
|
||||||
end,
|
|
||||||
^ Required to handle rotation correctly
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Raillike definitions
|
||||||
|
--------------------
|
||||||
|
The following nodes use the group `connect_to_raillike` and will only connect to
|
||||||
|
raillike nodes within this group and the same group value.
|
||||||
|
Use `minetest.raillike_group(<Name>)` to get the group value.
|
||||||
|
|
||||||
|
| Node type | Raillike group name
|
||||||
|
+-----------------------+----------------------------------
|
||||||
|
| default:rail | "rail"
|
||||||
|
| tnt:gunpowder | "gunpowder"
|
||||||
|
| tnt:gunpowder_burning | "gunpowder"
|
||||||
|
|
||||||
|
Example:
|
||||||
|
If you want to add a new rail type and want it to connect with default:rail,
|
||||||
|
add `connect_to_raillike=minetest.raillike_group("rail")` into the `groups` table
|
||||||
|
of your node.
|
||||||
|
|
||||||
|
|
||||||
Default sounds
|
Default sounds
|
||||||
--------------
|
--------------
|
||||||
Sounds inside the default table can be used within the sounds field of node definitions.
|
Sounds inside the default table can be used within the sounds field of node definitions.
|
||||||
@ -206,6 +295,7 @@ Model Definition
|
|||||||
Leafdecay
|
Leafdecay
|
||||||
---------
|
---------
|
||||||
To enable leaf decay for a node, add it to the "leafdecay" group.
|
To enable leaf decay for a node, add it to the "leafdecay" group.
|
||||||
|
|
||||||
The rating of the group determines how far from a node in the group "tree"
|
The rating of the group determines how far from a node in the group "tree"
|
||||||
the node can be without decaying.
|
the node can be without decaying.
|
||||||
|
|
||||||
@ -278,6 +368,7 @@ minetest.register_craft({
|
|||||||
------------
|
------------
|
||||||
dye.basecolors
|
dye.basecolors
|
||||||
^ Array containing the names of available base colors
|
^ Array containing the names of available base colors
|
||||||
|
|
||||||
dye.excolors
|
dye.excolors
|
||||||
^ Array containing the names of the available extended colors
|
^ Array containing the names of the available extended colors
|
||||||
|
|
||||||
|
@ -22,3 +22,7 @@
|
|||||||
|
|
||||||
# The radius of a TNT explosion
|
# The radius of a TNT explosion
|
||||||
#tnt_radius = 3
|
#tnt_radius = 3
|
||||||
|
|
||||||
|
# Enable the stairs mod ABM that replaces the old 'upside down'
|
||||||
|
# stair and slab nodes in old maps with the new param2 versions.
|
||||||
|
#enable_stairs_replace_abm = false
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- Helper functions
|
-- Helper functions
|
||||||
--
|
--
|
||||||
@ -290,6 +289,7 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "boats:boat",
|
output = "boats:boat",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -297,4 +297,3 @@ minetest.register_craft({
|
|||||||
{"group:wood", "group:wood", "group:wood"},
|
{"group:wood", "group:wood", "group:wood"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -58,7 +58,6 @@ VanessaE (WTFPL):
|
|||||||
default_nc_side.png
|
default_nc_side.png
|
||||||
default_desert_sand.png
|
default_desert_sand.png
|
||||||
default_desert_stone.png
|
default_desert_stone.png
|
||||||
default_desert_stone_brick.png
|
|
||||||
default_sand.png
|
default_sand.png
|
||||||
default_jungletree_top.png
|
default_jungletree_top.png
|
||||||
|
|
||||||
@ -121,12 +120,13 @@ paramat (CC BY-SA 3.0):
|
|||||||
default_junglewood.png, derived from a texture by BlockMen (CC BY-SA 3.0)
|
default_junglewood.png, derived from a texture by BlockMen (CC BY-SA 3.0)
|
||||||
default_grass.png, derived from a texture by Philipbenr (CC BY-SA 3.0)
|
default_grass.png, derived from a texture by Philipbenr (CC BY-SA 3.0)
|
||||||
default_grass_side.png, derived from a texture by Philipbenr (CC BY-SA 3.0)
|
default_grass_side.png, derived from a texture by Philipbenr (CC BY-SA 3.0)
|
||||||
|
default_stone_brick.png, derived from a texture by Cisoun (WTFPL)
|
||||||
|
default_desert_stone_brick.png, derived from a texture by VanessaE (WTFPL)
|
||||||
|
|
||||||
brunob.santos (CC BY-SA 4.0):
|
brunob.santos (CC BY-SA 4.0):
|
||||||
default_desert_cobble.png
|
default_desert_cobble.png
|
||||||
|
|
||||||
BlockMen (CC BY-SA 3.0):
|
BlockMen (CC BY-SA 3.0):
|
||||||
default_stone_brick.png
|
|
||||||
default_wood.png
|
default_wood.png
|
||||||
default_clay_brick.png
|
default_clay_brick.png
|
||||||
default_iron_ingot.png
|
default_iron_ingot.png
|
||||||
|
@ -905,7 +905,7 @@ function default.register_biomes()
|
|||||||
--node_water_top = "",
|
--node_water_top = "",
|
||||||
--depth_water_top = ,
|
--depth_water_top = ,
|
||||||
--node_water = "",
|
--node_water = "",
|
||||||
y_min = 1,
|
y_min = 5,
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
humidity_point = 10,
|
humidity_point = 10,
|
||||||
@ -923,7 +923,7 @@ function default.register_biomes()
|
|||||||
--depth_water_top = ,
|
--depth_water_top = ,
|
||||||
--node_water = "",
|
--node_water = "",
|
||||||
y_min = -112,
|
y_min = -112,
|
||||||
y_max = 0,
|
y_max = 4,
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
humidity_point = 10,
|
humidity_point = 10,
|
||||||
})
|
})
|
||||||
@ -1292,7 +1292,7 @@ function default.register_decorations()
|
|||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
biomes = {"desert"},
|
biomes = {"desert"},
|
||||||
y_min = 2,
|
y_min = 5,
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
schematic = minetest.get_modpath("default").."/schematics/large_cactus.mts",
|
schematic = minetest.get_modpath("default").."/schematics/large_cactus.mts",
|
||||||
flags = "place_center_x",
|
flags = "place_center_x",
|
||||||
@ -1314,7 +1314,7 @@ function default.register_decorations()
|
|||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
biomes = {"desert"},
|
biomes = {"desert"},
|
||||||
y_min = 2,
|
y_min = 5,
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
decoration = "default:cactus",
|
decoration = "default:cactus",
|
||||||
height = 2,
|
height = 2,
|
||||||
|
@ -162,6 +162,7 @@ default:chest_locked
|
|||||||
default:bookshelf
|
default:bookshelf
|
||||||
|
|
||||||
default:sign_wall
|
default:sign_wall
|
||||||
|
|
||||||
default:ladder
|
default:ladder
|
||||||
default:ladder_obsidian
|
default:ladder_obsidian
|
||||||
default:fence_wood
|
default:fence_wood
|
||||||
@ -194,7 +195,7 @@ default:nyancat_rainbow
|
|||||||
minetest.register_node("default:stone", {
|
minetest.register_node("default:stone", {
|
||||||
description = "Stone",
|
description = "Stone",
|
||||||
tiles = {"default_stone.png"},
|
tiles = {"default_stone.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, stone = 1},
|
groups = {cracky = 3, stone = 1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -207,7 +208,7 @@ minetest.register_node("default:stone", {
|
|||||||
minetest.register_node("default:cobble", {
|
minetest.register_node("default:cobble", {
|
||||||
description = "Cobblestone",
|
description = "Cobblestone",
|
||||||
tiles = {"default_cobble.png"},
|
tiles = {"default_cobble.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky=3, stone=2},
|
groups = {cracky=3, stone=2},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -224,6 +225,7 @@ minetest.register_node("default:cobble_cooled", {
|
|||||||
minetest.register_node("default:stonebrick", {
|
minetest.register_node("default:stonebrick", {
|
||||||
description = "Stone Brick",
|
description = "Stone Brick",
|
||||||
tiles = {"default_stone_brick.png"},
|
tiles = {"default_stone_brick.png"},
|
||||||
|
is_ground_content = false,
|
||||||
groups = {cracky = 2, stone = 1},
|
groups = {cracky = 2, stone = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -231,7 +233,7 @@ minetest.register_node("default:stonebrick", {
|
|||||||
minetest.register_node("default:mossycobble", {
|
minetest.register_node("default:mossycobble", {
|
||||||
description = "Mossy Cobblestone",
|
description = "Mossy Cobblestone",
|
||||||
tiles = {"default_mossycobble.png"},
|
tiles = {"default_mossycobble.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky=3, stone=1},
|
groups = {cracky=3, stone=1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -244,11 +246,10 @@ minetest.register_node("default:mossycobble", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:desert_stone", {
|
minetest.register_node("default:desert_stone", {
|
||||||
description = "Desert Stone",
|
description = "Desert Stone",
|
||||||
tiles = {"default_desert_stone.png"},
|
tiles = {"default_desert_stone.png"},
|
||||||
is_ground_content = true,
|
legacy_mineral = true,
|
||||||
groups = {crumbly = 1, cracky = 3, stone = 1},
|
groups = {crumbly = 1, cracky = 3, stone = 1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -262,7 +263,7 @@ minetest.register_node("default:desert_stone", {
|
|||||||
minetest.register_node("default:desert_cobble", {
|
minetest.register_node("default:desert_cobble", {
|
||||||
description = "Desert Cobblestone",
|
description = "Desert Cobblestone",
|
||||||
tiles = {"default_desert_cobble.png"},
|
tiles = {"default_desert_cobble.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, stone = 2},
|
groups = {cracky = 3, stone = 2},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -276,11 +277,9 @@ minetest.register_node("default:desert_stonebrick", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:sandstone", {
|
minetest.register_node("default:sandstone", {
|
||||||
description = "Sandstone",
|
description = "Sandstone",
|
||||||
tiles = {"default_sandstone.png"},
|
tiles = {"default_sandstone.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=1,cracky=3},
|
groups = {crumbly=1,cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -288,13 +287,12 @@ minetest.register_node("default:sandstone", {
|
|||||||
minetest.register_node("default:sandstonebrick", {
|
minetest.register_node("default:sandstonebrick", {
|
||||||
description = "Sandstone Brick",
|
description = "Sandstone Brick",
|
||||||
tiles = {"default_sandstone_brick.png"},
|
tiles = {"default_sandstone_brick.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky=2},
|
groups = {cracky=2},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:obsidian", {
|
minetest.register_node("default:obsidian", {
|
||||||
description = "Obsidian",
|
description = "Obsidian",
|
||||||
tiles = {"default_obsidian.png"},
|
tiles = {"default_obsidian.png"},
|
||||||
@ -327,7 +325,6 @@ minetest.register_node("default:obsidianbrick", {
|
|||||||
minetest.register_node("default:dirt", {
|
minetest.register_node("default:dirt", {
|
||||||
description = "Dirt",
|
description = "Dirt",
|
||||||
tiles = {"default_dirt.png"},
|
tiles = {"default_dirt.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3, soil=1},
|
groups = {crumbly=3, soil=1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -340,8 +337,9 @@ minetest.register_node("default:dirt", {
|
|||||||
|
|
||||||
minetest.register_node("default:dirt_with_grass", {
|
minetest.register_node("default:dirt_with_grass", {
|
||||||
description = "Dirt with Grass",
|
description = "Dirt with Grass",
|
||||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
tiles = {"default_grass.png", "default_dirt.png",
|
||||||
is_ground_content = true,
|
{name = "default_dirt.png^default_grass_side.png",
|
||||||
|
tileable_vertical = false}},
|
||||||
groups = {crumbly=3,soil=1},
|
groups = {crumbly=3,soil=1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -356,7 +354,8 @@ minetest.register_node("default:dirt_with_grass", {
|
|||||||
minetest.register_node("default:dirt_with_grass_footsteps", {
|
minetest.register_node("default:dirt_with_grass_footsteps", {
|
||||||
description = "Dirt with Grass and Footsteps",
|
description = "Dirt with Grass and Footsteps",
|
||||||
tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
|
tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
|
||||||
"default_dirt.png^default_grass_side.png"},
|
{name = "default_dirt.png^default_grass_side.png",
|
||||||
|
tileable_vertical = false}},
|
||||||
groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
|
groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
|
||||||
drop = 'default:dirt',
|
drop = 'default:dirt',
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
@ -368,8 +367,8 @@ minetest.register_node("default:dirt_with_dry_grass", {
|
|||||||
description = "Dirt with Dry Grass",
|
description = "Dirt with Dry Grass",
|
||||||
tiles = {"default_dry_grass.png",
|
tiles = {"default_dry_grass.png",
|
||||||
"default_dirt.png",
|
"default_dirt.png",
|
||||||
"default_dirt.png^default_dry_grass_side.png"
|
{name = "default_dirt.png^default_dry_grass_side.png",
|
||||||
},
|
tileable_vertical = false}},
|
||||||
groups = {crumbly = 3, soil = 1},
|
groups = {crumbly = 3, soil = 1},
|
||||||
drop = 'default:dirt',
|
drop = 'default:dirt',
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
@ -379,8 +378,9 @@ minetest.register_node("default:dirt_with_dry_grass", {
|
|||||||
|
|
||||||
minetest.register_node("default:dirt_with_snow", {
|
minetest.register_node("default:dirt_with_snow", {
|
||||||
description = "Dirt with Snow",
|
description = "Dirt with Snow",
|
||||||
tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
|
tiles = {"default_snow.png", "default_dirt.png",
|
||||||
is_ground_content = true,
|
{name = "default_dirt.png^default_snow_side.png",
|
||||||
|
tileable_vertical = false}},
|
||||||
groups = {crumbly = 3, soil = 1},
|
groups = {crumbly = 3, soil = 1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -394,24 +394,22 @@ minetest.register_node("default:dirt_with_snow", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:sand", {
|
minetest.register_node("default:sand", {
|
||||||
description = "Sand",
|
description = "Sand",
|
||||||
tiles = {"default_sand.png"},
|
tiles = {"default_sand.png"},
|
||||||
|
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"default:sand"}},
|
{items = {"default:sand"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {crumbly=3, falling_node=1, sand=1},
|
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:desert_sand", {
|
minetest.register_node("default:desert_sand", {
|
||||||
description = "Desert Sand",
|
description = "Desert Sand",
|
||||||
tiles = {"default_desert_sand.png"},
|
tiles = {"default_desert_sand.png"},
|
||||||
is_ground_content = true,
|
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"default:desert_sand"}},
|
{items = {"default:desert_sand"}},
|
||||||
@ -422,11 +420,9 @@ minetest.register_node("default:desert_sand", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:gravel", {
|
minetest.register_node("default:gravel", {
|
||||||
description = "Gravel",
|
description = "Gravel",
|
||||||
tiles = {"default_gravel.png"},
|
tiles = {"default_gravel.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=2, falling_node=1},
|
groups = {crumbly=2, falling_node=1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -440,7 +436,6 @@ minetest.register_node("default:gravel", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:clay", {
|
minetest.register_node("default:clay", {
|
||||||
description = "Clay",
|
description = "Clay",
|
||||||
tiles = {"default_clay.png"},
|
tiles = {"default_clay.png"},
|
||||||
@ -469,7 +464,6 @@ minetest.register_node("default:clay_burned", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:snow", {
|
minetest.register_node("default:snow", {
|
||||||
description = "Snow",
|
description = "Snow",
|
||||||
tiles = {"default_snow.png"},
|
tiles = {"default_snow.png"},
|
||||||
@ -489,7 +483,7 @@ minetest.register_node("default:snow", {
|
|||||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {crumbly=3,falling_node=1, melts = 1, float = 1},
|
groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1},
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
footstep = {name = "default_snow_footstep", gain = 0.25},
|
footstep = {name = "default_snow_footstep", gain = 0.25},
|
||||||
dug = {name = "default_snow_footstep", gain = 0.75},
|
dug = {name = "default_snow_footstep", gain = 0.75},
|
||||||
@ -503,13 +497,10 @@ minetest.register_node("default:snow", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:snowblock", {
|
minetest.register_node("default:snowblock", {
|
||||||
description = "Snow Block",
|
description = "Snow Block",
|
||||||
tiles = {"default_snow.png"},
|
tiles = {"default_snow.png"},
|
||||||
is_ground_content = true,
|
groups = {crumbly = 3, puts_out_fire = 1},
|
||||||
freezemelt = "default:water_source",
|
|
||||||
groups = {crumbly=3, melts = 1},
|
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
footstep = {name = "default_snow_footstep", gain = 0.25},
|
footstep = {name = "default_snow_footstep", gain = 0.25},
|
||||||
dug = {name = "default_snow_footstep", gain = 0.75},
|
dug = {name = "default_snow_footstep", gain = 0.75},
|
||||||
@ -517,17 +508,15 @@ minetest.register_node("default:snowblock", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:ice", {
|
minetest.register_node("default:ice", {
|
||||||
description = "Ice",
|
description = "Ice",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
tiles = {"default_ice.png"},
|
tiles = {"default_ice.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
groups = {cracky = 3, puts_out_fire = 1},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
freezemelt = "default:water_source",
|
|
||||||
post_effect_color = {a = 120, r = 120, g = 160, b = 180},
|
post_effect_color = {a = 120, r = 120, g = 160, b = 180},
|
||||||
groups = {cracky = 3, melts = 1},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -574,7 +563,8 @@ minetest.register_node("default:sapling", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||||
},
|
},
|
||||||
groups = {snappy=3,flammable=2,attached_node=1,sapling=1},
|
groups = {snappy = 3, flammable=2,
|
||||||
|
attached_node = 1, sapling = 1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -623,7 +613,8 @@ minetest.register_node("default:apple", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||||
},
|
},
|
||||||
groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
|
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||||
|
leafdecay = 3, leafdecay_drop = 1},
|
||||||
on_use = minetest.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
|
||||||
@ -635,18 +626,18 @@ minetest.register_node("default:apple", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:jungletree", {
|
minetest.register_node("default:jungletree", {
|
||||||
description = "Jungle Tree",
|
description = "Jungle Tree",
|
||||||
tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
|
tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
|
||||||
|
"default_jungletree.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"default:jungletree"}},
|
{items = {"default:jungletree"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
on_place = minetest.rotate_node
|
on_place = minetest.rotate_node
|
||||||
@ -703,12 +694,12 @@ minetest.register_node("default:junglesapling", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||||
},
|
},
|
||||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||||
|
attached_node = 1, sapling = 1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:pine_tree", {
|
minetest.register_node("default:pine_tree", {
|
||||||
description = "Pine Tree",
|
description = "Pine Tree",
|
||||||
tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
|
tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
|
||||||
@ -770,6 +761,7 @@ minetest.register_node("default:pine_sapling", {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:acacia_tree", {
|
minetest.register_node("default:acacia_tree", {
|
||||||
description = "Acacia Tree",
|
description = "Acacia Tree",
|
||||||
tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
|
tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
|
||||||
@ -795,6 +787,7 @@ minetest.register_node("default:acacia_leaves", {
|
|||||||
drawtype = "allfaces_optional",
|
drawtype = "allfaces_optional",
|
||||||
visual_scale = 1.3,
|
visual_scale = 1.3,
|
||||||
tiles = {"default_acacia_leaves.png"},
|
tiles = {"default_acacia_leaves.png"},
|
||||||
|
waving = 1,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||||
@ -924,7 +917,6 @@ minetest.register_node("default:cherry_sapling", {
|
|||||||
minetest.register_node("default:stone_with_coal", {
|
minetest.register_node("default:stone_with_coal", {
|
||||||
description = "Coal Ore",
|
description = "Coal Ore",
|
||||||
tiles = {"default_stone.png^default_mineral_coal.png"},
|
tiles = {"default_stone.png^default_mineral_coal.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -954,17 +946,15 @@ minetest.register_node("default:desert_stone_with_coal", {
|
|||||||
minetest.register_node("default:coalblock", {
|
minetest.register_node("default:coalblock", {
|
||||||
description = "Coal Block",
|
description = "Coal Block",
|
||||||
tiles = {"default_coal_block.png"},
|
tiles = {"default_coal_block.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:stone_with_iron", {
|
minetest.register_node("default:stone_with_iron", {
|
||||||
description = "Iron Ore",
|
description = "Iron Ore",
|
||||||
tiles = {"default_stone.png^default_mineral_iron.png"},
|
tiles = {"default_stone.png^default_mineral_iron.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -979,13 +969,12 @@ minetest.register_node("default:stone_with_iron", {
|
|||||||
minetest.register_node("default:steelblock", {
|
minetest.register_node("default:steelblock", {
|
||||||
description = "Steel Block",
|
description = "Steel Block",
|
||||||
tiles = {"default_steel_block.png"},
|
tiles = {"default_steel_block.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 1,level = 2, ingot_block = 1},
|
groups = {cracky = 1,level = 2, ingot_block = 1},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:stone_with_copper", {
|
minetest.register_node("default:stone_with_copper", {
|
||||||
description = "Copper Ore",
|
description = "Copper Ore",
|
||||||
tiles = {"default_stone.png^default_mineral_copper.png"},
|
tiles = {"default_stone.png^default_mineral_copper.png"},
|
||||||
@ -1019,7 +1008,7 @@ minetest.register_node("default:desert_stone_with_copper", {
|
|||||||
minetest.register_node("default:copperblock", {
|
minetest.register_node("default:copperblock", {
|
||||||
description = "Copper Block",
|
description = "Copper Block",
|
||||||
tiles = {"default_copper_block.png"},
|
tiles = {"default_copper_block.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 1, level = 2, ingot_block = 1},
|
groups = {cracky = 1, level = 2, ingot_block = 1},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
@ -1027,13 +1016,12 @@ minetest.register_node("default:copperblock", {
|
|||||||
minetest.register_node("default:bronzeblock", {
|
minetest.register_node("default:bronzeblock", {
|
||||||
description = "Bronze Block",
|
description = "Bronze Block",
|
||||||
tiles = {"default_bronze_block.png"},
|
tiles = {"default_bronze_block.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 1, level = 2, ingot_block = 1},
|
groups = {cracky = 1, level = 2, ingot_block = 1},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:stone_with_mese", {
|
minetest.register_node("default:stone_with_mese", {
|
||||||
description = "Mese Ore",
|
description = "Mese Ore",
|
||||||
tiles = {"default_stone.png^default_mineral_mese.png"},
|
tiles = {"default_stone.png^default_mineral_mese.png"},
|
||||||
@ -1092,12 +1080,9 @@ minetest.register_node("default:meze", {
|
|||||||
minetest.register_alias("default:meze_block", "default:meze")
|
minetest.register_alias("default:meze_block", "default:meze")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:stone_with_gold", {
|
minetest.register_node("default:stone_with_gold", {
|
||||||
description = "Gold Ore",
|
description = "Gold Ore",
|
||||||
tiles = {"default_stone.png^default_mineral_gold.png"},
|
tiles = {"default_stone.png^default_mineral_gold.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -1113,7 +1098,7 @@ minetest.register_node("default:stone_with_gold", {
|
|||||||
minetest.register_node("default:goldblock", {
|
minetest.register_node("default:goldblock", {
|
||||||
description = "Gold Block",
|
description = "Gold Block",
|
||||||
tiles = {"default_gold_block.png"},
|
tiles = {"default_gold_block.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 1, ingot_block = 1},
|
groups = {cracky = 1, ingot_block = 1},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
@ -1123,7 +1108,6 @@ minetest.register_node("default:goldblock", {
|
|||||||
minetest.register_node("default:stone_with_diamond", {
|
minetest.register_node("default:stone_with_diamond", {
|
||||||
description = "Diamond Ore",
|
description = "Diamond Ore",
|
||||||
tiles = {"default_stone.png^default_mineral_diamond.png"},
|
tiles = {"default_stone.png^default_mineral_diamond.png"},
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -1138,7 +1122,7 @@ minetest.register_node("default:stone_with_diamond", {
|
|||||||
minetest.register_node("default:diamondblock", {
|
minetest.register_node("default:diamondblock", {
|
||||||
description = "Diamond Block",
|
description = "Diamond Block",
|
||||||
tiles = {"default_diamond_block.png"},
|
tiles = {"default_diamond_block.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = false,
|
||||||
groups = {cracky = 1, level = 3},
|
groups = {cracky = 1, level = 3},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
@ -1164,9 +1148,9 @@ minetest.register_node("default:stone_with_coin", {
|
|||||||
|
|
||||||
minetest.register_node("default:cactus", {
|
minetest.register_node("default:cactus", {
|
||||||
description = "Cactus",
|
description = "Cactus",
|
||||||
tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
|
tiles = {"default_cactus_top.png", "default_cactus_top.png",
|
||||||
|
"default_cactus_side.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = true,
|
|
||||||
groups = {snappy = 1, choppy = 3, flammable = 2},
|
groups = {snappy = 1, choppy = 3, flammable = 2},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -1235,7 +1219,6 @@ minetest.register_node("default:junglegrass", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = true,
|
|
||||||
groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1},
|
groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -1244,6 +1227,7 @@ minetest.register_node("default:junglegrass", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:grass_1", {
|
minetest.register_node("default:grass_1", {
|
||||||
description = "Grass",
|
description = "Grass",
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -1268,7 +1252,8 @@ minetest.register_node("default:grass_1", {
|
|||||||
-- place a random grass node
|
-- place a random grass node
|
||||||
local stack = ItemStack("default:grass_" .. math.random(1,5))
|
local stack = ItemStack("default:grass_" .. math.random(1,5))
|
||||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||||
return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
|
return ItemStack("default:grass_1 " ..
|
||||||
|
itemstack:get_count() - (1 - ret:get_count()))
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1286,7 +1271,8 @@ for i=2,5 do
|
|||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
drop = "default:grass_1",
|
drop = "default:grass_1",
|
||||||
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
|
groups = {snappy = 3, flammable = 3, flora = 1,
|
||||||
|
attached_node = 1, not_in_creative_inventory = 1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -1295,6 +1281,7 @@ for i=2,5 do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:dry_grass_1", {
|
minetest.register_node("default:dry_grass_1", {
|
||||||
description = "Dry Grass",
|
description = "Dry Grass",
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -1317,7 +1304,8 @@ minetest.register_node("default:dry_grass_1", {
|
|||||||
-- place a random dry grass node
|
-- place a random dry grass node
|
||||||
local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
|
local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
|
||||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||||
return ItemStack("default:dry_grass_1 "..itemstack:get_count()-(1-ret:get_count()))
|
return ItemStack("default:dry_grass_1 " ..
|
||||||
|
itemstack:get_count() - (1 - ret:get_count()))
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1333,7 +1321,8 @@ for i=2,5 do
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
|
groups = {snappy = 3, flammable = 3, flora = 1,
|
||||||
|
attached_node = 1, not_in_creative_inventory=1},
|
||||||
drop = "default:dry_grass_1",
|
drop = "default:dry_grass_1",
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -1388,9 +1377,8 @@ minetest.register_node("default:water_source", {
|
|||||||
liquid_alternative_flowing = "default:water_flowing",
|
liquid_alternative_flowing = "default:water_flowing",
|
||||||
liquid_alternative_source = "default:water_source",
|
liquid_alternative_source = "default:water_source",
|
||||||
liquid_viscosity = 1,
|
liquid_viscosity = 1,
|
||||||
freezemelt = "default:ice",
|
|
||||||
post_effect_color = {a = 120, r = 20, g = 60, b = 80},
|
post_effect_color = {a = 120, r = 20, g = 60, b = 80},
|
||||||
groups = {water=3, liquid=3, puts_out_fire=1, freezes = 1},
|
groups = {water = 3, liquid = 3, puts_out_fire = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:water_flowing", {
|
minetest.register_node("default:water_flowing", {
|
||||||
@ -1434,9 +1422,9 @@ minetest.register_node("default:water_flowing", {
|
|||||||
liquid_alternative_flowing = "default:water_flowing",
|
liquid_alternative_flowing = "default:water_flowing",
|
||||||
liquid_alternative_source = "default:water_source",
|
liquid_alternative_source = "default:water_source",
|
||||||
liquid_viscosity = 1,
|
liquid_viscosity = 1,
|
||||||
freezemelt = "default:snow",
|
|
||||||
post_effect_color = {a = 120, r = 20, g = 60, b = 80},
|
post_effect_color = {a = 120, r = 20, g = 60, b = 80},
|
||||||
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes = 1, melt_around = 1},
|
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||||
|
not_in_creative_inventory=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:river_water_source", {
|
minetest.register_node("default:river_water_source", {
|
||||||
@ -1529,7 +1517,8 @@ minetest.register_node("default:river_water_flowing", {
|
|||||||
liquid_renewable = false,
|
liquid_renewable = false,
|
||||||
liquid_range = 2,
|
liquid_range = 2,
|
||||||
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
|
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
|
||||||
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
|
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||||
|
not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:lava_source", {
|
minetest.register_node("default:lava_source", {
|
||||||
@ -1623,7 +1612,8 @@ minetest.register_node("default:lava_flowing", {
|
|||||||
liquid_renewable = false,
|
liquid_renewable = false,
|
||||||
damage_per_second = 4 * 2,
|
damage_per_second = 4 * 2,
|
||||||
post_effect_color = {a = 220, r = 250, g = 70, b = 20},
|
post_effect_color = {a = 220, r = 250, g = 70, b = 20},
|
||||||
groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
|
groups = {lava = 3, liquid = 2, hot = 3, igniter = 1,
|
||||||
|
not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:acid_source", {
|
minetest.register_node("default:acid_source", {
|
||||||
@ -1806,15 +1796,22 @@ minetest.register_node("default:torch", {
|
|||||||
wall_bottom = {-0.25, -0.5 , -0.25, 0.25, 0.0625, 0.25},
|
wall_bottom = {-0.25, -0.5 , -0.25, 0.25, 0.0625, 0.25},
|
||||||
wall_side = {-0.25, -0.5 , -0.25, -0.5, 0.0625, 0.25},
|
wall_side = {-0.25, -0.5 , -0.25, -0.5, 0.0625, 0.25},
|
||||||
},
|
},
|
||||||
groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1, hot = 2},
|
groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1,
|
||||||
|
hot = 2},
|
||||||
|
legacy_wallmounter = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
local chest_formspec =
|
local chest_formspec =
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
default.gui_slots ..
|
default.gui_slots ..
|
||||||
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
"list[current_name;main;0,0.3;8,4;]" ..
|
"list[current_name;main;0,0.3;8,4;]" ..
|
||||||
"list[current_player;main;0,4.85;8,4;]" ..
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
|
"listring[current_name;main]" ..
|
||||||
|
"listring[current_player;main]" ..
|
||||||
default.get_hotbar_bg(0, 4.85) ..
|
default.get_hotbar_bg(0, 4.85) ..
|
||||||
default.get_hotbar_bg(0, 5.85)
|
default.get_hotbar_bg(0, 5.85)
|
||||||
|
|
||||||
@ -1823,8 +1820,13 @@ local function get_locked_chest_formspec(pos)
|
|||||||
local formspec =
|
local formspec =
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
"list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"..
|
"list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"..
|
||||||
"list[current_player;main;0,4.85;8,4;]"..
|
"list[current_player;main;0,4.85;8,4;]"..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
|
"listring[nodemeta:" .. spos .. ";main]" ..
|
||||||
|
"listring[current_player;main]" ..
|
||||||
default.get_hotbar_bg(0, 4.85) ..
|
default.get_hotbar_bg(0, 4.85) ..
|
||||||
default.get_hotbar_bg(0, 5.85)
|
default.get_hotbar_bg(0, 5.85)
|
||||||
return formspec
|
return formspec
|
||||||
@ -1843,7 +1845,7 @@ minetest.register_node("default:chest", {
|
|||||||
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
|
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
||||||
is_ground_content = false,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -1858,17 +1860,18 @@ minetest.register_node("default:chest", {
|
|||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return inv:is_empty("main")
|
return inv:is_empty("main")
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||||
|
to_list, to_index, count, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" moves stuff in chest at "..minetest.pos_to_string(pos) .. ".")
|
" moves stuff in chest at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" moves stuff to chest at "..minetest.pos_to_string(pos) .. ".")
|
" moves stuff to chest at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" takes stuff from chest at "..minetest.pos_to_string(pos) .. ".")
|
" takes stuff from chest at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1879,7 +1882,7 @@ minetest.register_node("default:chest_locked", {
|
|||||||
"default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
|
"default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
||||||
is_ground_content = false,
|
legacy_facedir_simple = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
@ -1900,7 +1903,8 @@ minetest.register_node("default:chest_locked", {
|
|||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
|
return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index,
|
||||||
|
to_list, to_index, count, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if not has_locked_chest_privilege(meta, player) then
|
if not has_locked_chest_privilege(meta, player) then
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
@ -1939,11 +1943,11 @@ minetest.register_node("default:chest_locked", {
|
|||||||
end,
|
end,
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" moves stuff to locked chest at "..minetest.pos_to_string(pos) .. ".")
|
" moves stuff to locked chest at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" takes stuff from locked chest at "..minetest.pos_to_string(pos) .. ".")
|
" takes stuff from locked chest at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
@ -1964,8 +1968,13 @@ minetest.register_node("default:chest_locked", {
|
|||||||
default.bookshelf_formspec =
|
default.bookshelf_formspec =
|
||||||
"size[8,7;]" ..
|
"size[8,7;]" ..
|
||||||
default.gui_slots ..
|
default.gui_slots ..
|
||||||
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
"list[context;books;0,0.3;8,2;]" ..
|
"list[context;books;0,0.3;8,2;]" ..
|
||||||
"list[current_player;main;0,2.85;8,4;]" ..
|
"list[current_player;main;0,2.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,4.08;8,3;8]" ..
|
||||||
|
"listring[context;books]" ..
|
||||||
|
"listring[current_player;main]" ..
|
||||||
default.get_hotbar_bg(0, 2.85) ..
|
default.get_hotbar_bg(0, 2.85) ..
|
||||||
default.get_hotbar_bg(0, 3.85)
|
default.get_hotbar_bg(0, 3.85)
|
||||||
|
|
||||||
@ -1973,7 +1982,6 @@ minetest.register_node("default:bookshelf", {
|
|||||||
description = "Bookshelf",
|
description = "Bookshelf",
|
||||||
tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
|
tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
@ -2003,7 +2011,8 @@ minetest.register_node("default:bookshelf", {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index,
|
||||||
|
to_list, to_index, count, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local stack = inv:get_stack(from_list, from_index)
|
local stack = inv:get_stack(from_list, from_index)
|
||||||
@ -2018,20 +2027,22 @@ minetest.register_node("default:bookshelf", {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||||
|
to_list, to_index, count, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" moves stuff in bookshelf at "..minetest.pos_to_string(pos) .. ".")
|
" moves stuff in bookshelf at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" moves stuff to bookshelf at "..minetest.pos_to_string(pos) .. ".")
|
" moves stuff to bookshelf at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name() ..
|
minetest.log("action", player:get_player_name() ..
|
||||||
" takes stuff from bookshelf at "..minetest.pos_to_string(pos) .. ".")
|
" takes stuff from bookshelf at " .. minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:sign_wall", {
|
minetest.register_node("default:sign_wall", {
|
||||||
description = "Sign",
|
description = "Sign",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -2049,7 +2060,7 @@ minetest.register_node("default:sign_wall", {
|
|||||||
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
|
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
|
||||||
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
|
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
|
||||||
},
|
},
|
||||||
selection_box = {type = "wallmounted"},
|
legacy_wallmounted = true,
|
||||||
groups = {choppy = 2, dig_immediate = 2, attached_node = 1},
|
groups = {choppy = 2, dig_immediate = 2, attached_node = 1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
@ -2067,13 +2078,14 @@ minetest.register_node("default:sign_wall", {
|
|||||||
end
|
end
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if not fields.text then return end
|
if not fields.text then return end
|
||||||
minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
|
minetest.log("action", (sender:get_player_name() or "") .. " wrote \"" ..
|
||||||
"\" to sign at "..minetest.pos_to_string(pos) .. ".")
|
fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
|
||||||
meta:set_string("text", fields.text)
|
meta:set_string("text", fields.text)
|
||||||
meta:set_string("infotext", "\"" .. fields.text .. "\"")
|
meta:set_string("infotext", '"' .. fields.text .. '"')
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:ladder", {
|
minetest.register_node("default:ladder", {
|
||||||
description = "Ladder",
|
description = "Ladder",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -2090,11 +2102,14 @@ minetest.register_node("default:ladder", {
|
|||||||
wall_bottom = {-0.375, -0.5, -0.5, 0.375, -0.4375, 0.5},
|
wall_bottom = {-0.375, -0.5, -0.5, 0.375, -0.4375, 0.5},
|
||||||
wall_side = {-0.5, -0.5, -0.375, -0.4375, 0.5, 0.375},
|
wall_side = {-0.5, -0.5, -0.375, -0.4375, 0.5, 0.375},
|
||||||
},
|
},
|
||||||
selection_box = {type = "wallmounted"},
|
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
||||||
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local fence_texture =
|
||||||
|
"default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
|
||||||
|
|
||||||
minetest.register_node("default:ladder_obsidian", {
|
minetest.register_node("default:ladder_obsidian", {
|
||||||
description = "Ladder Obsidian",
|
description = "Ladder Obsidian",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -2130,7 +2145,8 @@ minetest.register_node("default:fence_wood", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||||
},
|
},
|
||||||
groups = {not_in_creative_inventory=1,choppy=2,oddly_breakable_by_hand=2,flammable=2},
|
groups = {not_in_creative_inventory = 1, choppy = 2, oddly_breakable_by_hand = 2,
|
||||||
|
flammable = 2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -2232,7 +2248,8 @@ minetest.register_node("default:obsidian_glass", {
|
|||||||
minetest.register_node("default:rail", {
|
minetest.register_node("default:rail", {
|
||||||
description = "Rail",
|
description = "Rail",
|
||||||
drawtype = "raillike",
|
drawtype = "raillike",
|
||||||
tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
|
tiles = {"default_rail.png", "default_rail_curved.png",
|
||||||
|
"default_rail_t_junction.png", "default_rail_crossing.png"},
|
||||||
inventory_image = "default_rail.png",
|
inventory_image = "default_rail.png",
|
||||||
wield_image = "default_rail.png",
|
wield_image = "default_rail.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -2244,9 +2261,11 @@ minetest.register_node("default:rail", {
|
|||||||
-- but how to specify the dimensions for curved and sideways rails?
|
-- but how to specify the dimensions for curved and sideways rails?
|
||||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||||
},
|
},
|
||||||
groups = {bendy=2,dig_immediate=2,attached_node=1,connect_to_raillike=1}, -- //MFF Temporary fix (Mg|06/21/2015) connect_to_raillike=minetest.raillike_group("rail")},
|
groups = {bendy = 2, dig_immediate = 2, attached_node = 1,
|
||||||
|
connect_to_raillike = minetest.raillike_group("rail")},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:brick", {
|
minetest.register_node("default:brick", {
|
||||||
description = "Brick Block",
|
description = "Brick Block",
|
||||||
tiles = {"default_brick.png"},
|
tiles = {"default_brick.png"},
|
||||||
|
BIN
minetestforfun_game/mods/default/schematics/papyrus.mts
Executable file → Normal file
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 5.8 KiB |
@ -36,27 +36,27 @@ minetest.register_abm({
|
|||||||
if node.name == "default:sapling" then
|
if node.name == "default:sapling" then
|
||||||
minetest.log("action", "A sapling grows into a tree at "..
|
minetest.log("action", "A sapling grows into a tree at "..
|
||||||
minetest.pos_to_string(pos))
|
minetest.pos_to_string(pos))
|
||||||
-- if mapgen == "v6" then
|
if mapgen == "v6" then
|
||||||
default.grow_tree(pos, random(1, 4) == 1)
|
default.grow_tree(pos, random(1, 4) == 1)
|
||||||
-- else
|
else
|
||||||
-- default.grow_new_apple_tree(pos)
|
default.grow_new_apple_tree(pos)
|
||||||
-- end
|
end
|
||||||
elseif node.name == "default:junglesapling" then
|
elseif node.name == "default:junglesapling" then
|
||||||
minetest.log("action", "A jungle sapling grows into a tree at "..
|
minetest.log("action", "A jungle sapling grows into a tree at "..
|
||||||
minetest.pos_to_string(pos))
|
minetest.pos_to_string(pos))
|
||||||
-- if mapgen == "v6" then
|
if mapgen == "v6" then
|
||||||
default.grow_jungle_tree(pos)
|
default.grow_jungle_tree(pos)
|
||||||
-- else
|
else
|
||||||
-- default.grow_new_jungle_tree(pos)
|
default.grow_new_jungle_tree(pos)
|
||||||
-- end
|
end
|
||||||
elseif node.name == "default:pine_sapling" then
|
elseif node.name == "default:pine_sapling" then
|
||||||
minetest.log("action", "A pine sapling grows into a tree at "..
|
minetest.log("action", "A pine sapling grows into a tree at "..
|
||||||
minetest.pos_to_string(pos))
|
minetest.pos_to_string(pos))
|
||||||
-- if mapgen == "v6" then
|
if mapgen == "v6" then
|
||||||
default.grow_pine_tree(pos)
|
default.grow_pine_tree(pos)
|
||||||
-- else
|
else
|
||||||
-- default.grow_new_pine_tree(pos)
|
default.grow_new_pine_tree(pos)
|
||||||
-- end
|
end
|
||||||
elseif node.name == "default:acacia_sapling" then
|
elseif node.name == "default:acacia_sapling" then
|
||||||
minetest.log("action", "An acacia sapling grows into a tree at "..
|
minetest.log("action", "An acacia sapling grows into a tree at "..
|
||||||
minetest.pos_to_string(pos))
|
minetest.pos_to_string(pos))
|
||||||
@ -359,7 +359,7 @@ end
|
|||||||
-- New apple tree
|
-- New apple tree
|
||||||
|
|
||||||
function default.grow_new_apple_tree(pos)
|
function default.grow_new_apple_tree(pos)
|
||||||
local path = minetest.get_modpath("default") .. "/schematics/apple_tree.mts"
|
local path = minetest.get_modpath("default") .. "/schematics/apple_tree_from_sapling.mts"
|
||||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||||
path, 0, nil, false)
|
path, 0, nil, false)
|
||||||
end
|
end
|
||||||
@ -368,8 +368,8 @@ end
|
|||||||
-- New jungle tree
|
-- New jungle tree
|
||||||
|
|
||||||
function default.grow_new_jungle_tree(pos)
|
function default.grow_new_jungle_tree(pos)
|
||||||
local path = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts"
|
local path = minetest.get_modpath("default") .. "/schematics/jungle_tree_from_sapling.mts"
|
||||||
minetest.place_schematic({x = pos.x - 2, y = pos.y, z = pos.z - 2},
|
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||||
path, 0, nil, false)
|
path, 0, nil, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ end
|
|||||||
-- New pine tree
|
-- New pine tree
|
||||||
|
|
||||||
function default.grow_new_pine_tree(pos)
|
function default.grow_new_pine_tree(pos)
|
||||||
local path = minetest.get_modpath("default") .. "/schematics/pine_tree.mts"
|
local path = minetest.get_modpath("default") .. "/schematics/pine_tree_from_sapling.mts"
|
||||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
|
||||||
path, 0, nil, false)
|
path, 0, nil, false)
|
||||||
end
|
end
|
||||||
@ -386,7 +386,7 @@ end
|
|||||||
-- New acacia tree
|
-- New acacia tree
|
||||||
|
|
||||||
function default.grow_new_acacia_tree(pos)
|
function default.grow_new_acacia_tree(pos)
|
||||||
local path = minetest.get_modpath("default") .. "/schematics/acacia_tree.mts"
|
local path = minetest.get_modpath("default") .. "/schematics/acacia_tree_from_sapling.mts"
|
||||||
minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4},
|
minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4},
|
||||||
path, random, nil, false)
|
path, random, nil, false)
|
||||||
end
|
end
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
-- minetest/fire/init.lua
|
-- minetest/fire/init.lua
|
||||||
|
|
||||||
|
-- Global namespace for functions
|
||||||
|
|
||||||
fire = {}
|
fire = {}
|
||||||
|
|
||||||
|
|
||||||
|
-- Register flame node
|
||||||
|
|
||||||
minetest.register_node("fire:basic_flame", {
|
minetest.register_node("fire:basic_flame", {
|
||||||
description = "Fire",
|
description = "Fire",
|
||||||
drawtype = "firelike",
|
drawtype = "firelike",
|
||||||
tiles = {{
|
tiles = {{
|
||||||
name = "fire_basic_flame_animated.png",
|
name = "fire_basic_flame_animated.png",
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1},
|
animation = {type = "vertical_frames",
|
||||||
|
aspect_w = 16, aspect_h = 16, length = 1},
|
||||||
}},
|
}},
|
||||||
inventory_image = "fire_basic_flame.png",
|
inventory_image = "fire_basic_flame.png",
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
@ -29,11 +35,18 @@ minetest.register_node("fire:basic_flame", {
|
|||||||
on_blast = function() end,
|
on_blast = function() end,
|
||||||
})
|
})
|
||||||
|
|
||||||
fire.D = 6
|
|
||||||
|
-- Fire sounds table
|
||||||
-- key: position hash of low corner of area
|
-- key: position hash of low corner of area
|
||||||
-- value: {handle=sound handle, name=sound name}
|
-- value: {handle=sound handle, name=sound name}
|
||||||
fire.sounds = {}
|
fire.sounds = {}
|
||||||
|
|
||||||
|
|
||||||
|
-- Get sound area of position
|
||||||
|
|
||||||
|
-- size of sound areas
|
||||||
|
fire.D = 6
|
||||||
|
|
||||||
function fire.get_area_p0p1(pos)
|
function fire.get_area_p0p1(pos)
|
||||||
local p0 = {
|
local p0 = {
|
||||||
x = math.floor(pos.x / fire.D) * fire.D,
|
x = math.floor(pos.x / fire.D) * fire.D,
|
||||||
@ -48,6 +61,9 @@ function fire.get_area_p0p1(pos)
|
|||||||
return p0, p1
|
return p0, p1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Update fire sounds in sound area of position
|
||||||
|
|
||||||
function fire.update_sounds_around(pos)
|
function fire.update_sounds_around(pos)
|
||||||
local p0, p1 = fire.get_area_p0p1(pos)
|
local p0, p1 = fire.get_area_p0p1(pos)
|
||||||
local cp = {x = (p0.x + p1.x) / 2, y = (p0.y + p1.y) / 2, z = (p0.z + p1.z) / 2}
|
local cp = {x = (p0.x + p1.x) / 2, y = (p0.y + p1.y) / 2, z = (p0.z + p1.z) / 2}
|
||||||
@ -66,7 +82,8 @@ function fire.update_sounds_around(pos)
|
|||||||
if not sound then
|
if not sound then
|
||||||
if should_have_sound then
|
if should_have_sound then
|
||||||
fire.sounds[p0_hash] = {
|
fire.sounds[p0_hash] = {
|
||||||
handle = minetest.sound_play(wanted_sound, {pos=cp, max_hear_distance = 16, loop=true}),
|
handle = minetest.sound_play(wanted_sound,
|
||||||
|
{pos = cp, max_hear_distance = 16, loop = true}),
|
||||||
name = wanted_sound.name,
|
name = wanted_sound.name,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -77,40 +94,53 @@ function fire.update_sounds_around(pos)
|
|||||||
elseif sound.name ~= wanted_sound.name then
|
elseif sound.name ~= wanted_sound.name then
|
||||||
minetest.sound_stop(sound.handle)
|
minetest.sound_stop(sound.handle)
|
||||||
fire.sounds[p0_hash] = {
|
fire.sounds[p0_hash] = {
|
||||||
handle = minetest.sound_play(wanted_sound, {pos=cp, max_hear_distance = 16, loop=true}),
|
handle = minetest.sound_play(wanted_sound,
|
||||||
|
{pos = cp, max_hear_distance = 16, loop = true}),
|
||||||
name = wanted_sound.name,
|
name = wanted_sound.name,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Update fire sounds on flame node construct or destruct
|
||||||
|
|
||||||
function fire.on_flame_add_at(pos)
|
function fire.on_flame_add_at(pos)
|
||||||
fire.update_sounds_around(pos)
|
fire.update_sounds_around(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function fire.on_flame_remove_at(pos)
|
function fire.on_flame_remove_at(pos)
|
||||||
fire.update_sounds_around(pos)
|
fire.update_sounds_around(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Return positions for flames around a burning node
|
||||||
|
|
||||||
function fire.find_pos_for_flame_around(pos)
|
function fire.find_pos_for_flame_around(pos)
|
||||||
return minetest.find_node_near(pos, 1, {"air"})
|
return minetest.find_node_near(pos, 1, {"air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Detect nearby extinguishing nodes
|
||||||
|
|
||||||
function fire.flame_should_extinguish(pos)
|
function fire.flame_should_extinguish(pos)
|
||||||
if minetest.setting_getbool("disable_fire") then return true end
|
if minetest.setting_getbool("disable_fire") then return true end
|
||||||
--return minetest.find_node_near(pos, 1, {"group:puts_out_fire"})
|
--return minetest.find_node_near(pos, 1, {"group:puts_out_fire"})
|
||||||
local p0 = {x=pos.x-2, y=pos.y, z=pos.z-2}
|
local p0 = {x = pos.x - 1, y = pos.y, z = pos.z - 1}
|
||||||
local p1 = {x=pos.x+2, y=pos.y, z=pos.z+2}
|
local p1 = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1}
|
||||||
local ps = minetest.find_nodes_in_area(p0, p1, {"group:puts_out_fire"})
|
local ps = minetest.find_nodes_in_area(p0, p1, {"group:puts_out_fire"})
|
||||||
return (#ps ~= 0)
|
return (#ps ~= 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[-- Ignite neighboring nodes
|
|
||||||
minetest.register_abm({
|
-- Ignite neighboring nodes
|
||||||
|
|
||||||
|
--[[minetest.register_abm({
|
||||||
nodenames = {"group:flammable"},
|
nodenames = {"group:flammable"},
|
||||||
neighbors = {"group:igniter"},
|
neighbors = {"group:igniter"},
|
||||||
interval = 5,
|
interval = 7,
|
||||||
chance = 2,
|
chance = 32,
|
||||||
action = function(p0, node, _, _)
|
action = function(p0, node, _, _)
|
||||||
-- If there is water or stuff like that around flame, don't ignite
|
-- If there is water or stuff like that around flame, don't ignite
|
||||||
if fire.flame_should_extinguish(p0) then
|
if fire.flame_should_extinguish(p0) then
|
||||||
@ -123,7 +153,12 @@ minetest.register_abm({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Rarely ignite things from far
|
-- Rarely ignite things from far
|
||||||
|
|
||||||
|
--[[ Currently disabled to reduce the chance of uncontrollable spreading
|
||||||
|
fires that disrupt servers. Also for less lua processing load.
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"group:igniter"},
|
nodenames = {"group:igniter"},
|
||||||
neighbors = {"air"},
|
neighbors = {"air"},
|
||||||
@ -150,10 +185,11 @@ minetest.register_abm({
|
|||||||
})]]
|
})]]
|
||||||
|
|
||||||
-- Remove flammable nodes and flame
|
-- Remove flammable nodes and flame
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"fire:basic_flame"},
|
nodenames = {"fire:basic_flame"},
|
||||||
interval = 3,
|
interval = 5,
|
||||||
chance = 2,
|
chance = 16,
|
||||||
action = function(p0, node, _, _)
|
action = function(p0, node, _, _)
|
||||||
-- If there is water or stuff like that around flame, remove flame
|
-- If there is water or stuff like that around flame, remove flame
|
||||||
if fire.flame_should_extinguish(p0) then
|
if fire.flame_should_extinguish(p0) then
|
||||||
|