mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-15 23:10:31 +01:00
Updated minetestforfun_game, part 3
- Merged : Removed weird constants in default Add tree growing functions to game_api.txt
This commit is contained in:
parent
c4c6e9fe44
commit
3ae94073c4
|
@ -81,7 +81,7 @@ farming.register_plant(name, Plant definition)
|
||||||
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 ech step, format: modname_plantname_i.png (i = stepnumber)
|
||||||
minlight = 13, -- Minimum light to grow
|
minlight = 13, -- Minimum light to grow
|
||||||
maxlight = LIGHT_MAX -- Maximum light to grow
|
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
||||||
}
|
}
|
||||||
|
|
||||||
Stairs API
|
Stairs API
|
||||||
|
@ -150,6 +150,11 @@ default.node_sound_wood_defaults()
|
||||||
default.node_sound_leaves_defaults()
|
default.node_sound_leaves_defaults()
|
||||||
default.node_sound_glass_defaults()
|
default.node_sound_glass_defaults()
|
||||||
|
|
||||||
|
Default constants
|
||||||
|
-----------------
|
||||||
|
default.LIGHT_MAX
|
||||||
|
^ The maximum light level (see [Node definition] light_source)
|
||||||
|
|
||||||
Player API
|
Player API
|
||||||
----------
|
----------
|
||||||
The player API can register player models and update the player's appearence
|
The player API can register player models and update the player's appearence
|
||||||
|
@ -275,3 +280,14 @@ 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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
|
@ -774,7 +774,7 @@ minetest.register_node("default:water_flowing", {
|
||||||
animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.6}
|
animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.6}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
alpha = WATER_ALPHA,
|
alpha = 160,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "flowingliquid",
|
paramtype2 = "flowingliquid",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -786,7 +786,7 @@ minetest.register_node("default:water_flowing", {
|
||||||
liquidtype = "flowing",
|
liquidtype = "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 = WATER_VISC,
|
liquid_viscosity = 1,
|
||||||
freezemelt = "default:snow",
|
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, freezes = 1, melt_around = 1},
|
||||||
|
@ -807,7 +807,7 @@ minetest.register_node("default:water_source", {
|
||||||
backface_culling = false,
|
backface_culling = false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
alpha = WATER_ALPHA,
|
alpha = 160,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
|
@ -818,7 +818,7 @@ minetest.register_node("default:water_source", {
|
||||||
liquidtype = "source",
|
liquidtype = "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 = WATER_VISC,
|
liquid_viscosity = 1,
|
||||||
freezemelt = "default:ice",
|
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, freezes = 1},
|
||||||
|
@ -906,7 +906,7 @@ minetest.register_node("default:lava_flowing", {
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "flowingliquid",
|
paramtype2 = "flowingliquid",
|
||||||
light_source = LIGHT_MAX,
|
light_source = default.LIGHT_MAX - 1,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
|
@ -916,7 +916,7 @@ minetest.register_node("default:lava_flowing", {
|
||||||
liquidtype = "flowing",
|
liquidtype = "flowing",
|
||||||
liquid_alternative_flowing = "default:lava_flowing",
|
liquid_alternative_flowing = "default:lava_flowing",
|
||||||
liquid_alternative_source = "default:lava_source",
|
liquid_alternative_source = "default:lava_source",
|
||||||
liquid_viscosity = LAVA_VISC,
|
liquid_viscosity = 7,
|
||||||
liquid_renewable = false,
|
liquid_renewable = false,
|
||||||
damage_per_second = 8,
|
damage_per_second = 8,
|
||||||
post_effect_color = {a = 220, r = 250, g = 70, b = 20},
|
post_effect_color = {a = 220, r = 250, g = 70, b = 20},
|
||||||
|
@ -939,7 +939,7 @@ minetest.register_node("default:lava_source", {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
light_source = LIGHT_MAX,
|
light_source = default.LIGHT_MAX - 1,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
|
@ -949,7 +949,7 @@ minetest.register_node("default:lava_source", {
|
||||||
liquidtype = "source",
|
liquidtype = "source",
|
||||||
liquid_alternative_flowing = "default:lava_flowing",
|
liquid_alternative_flowing = "default:lava_flowing",
|
||||||
liquid_alternative_source = "default:lava_source",
|
liquid_alternative_source = "default:lava_source",
|
||||||
liquid_viscosity = LAVA_VISC,
|
liquid_viscosity = 7,
|
||||||
liquid_renewable = false,
|
liquid_renewable = false,
|
||||||
damage_per_second = 8,
|
damage_per_second = 8,
|
||||||
post_effect_color = {a = 220, r = 250, g = 70, b = 20},
|
post_effect_color = {a = 220, r = 250, g = 70, b = 20},
|
||||||
|
|
|
@ -45,7 +45,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
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))
|
||||||
default.grow_jungletree(pos)
|
default.grow_jungle_tree(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
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))
|
||||||
default.grow_pinetree(pos)
|
default.grow_pine_tree(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -157,14 +157,14 @@ end
|
||||||
|
|
||||||
-- Jungletree
|
-- Jungletree
|
||||||
|
|
||||||
function default.grow_jungletree(pos, bad)
|
function default.grow_jungle_tree(pos, bad)
|
||||||
--[[
|
--[[
|
||||||
NOTE: Jungletree-placing code is currently duplicated in the engine
|
NOTE: Jungletree-placing code is currently duplicated in the engine
|
||||||
and in games that have saplings; both are deprecated but not
|
and in games that have saplings; both are deprecated but not
|
||||||
replaced yet
|
replaced yet
|
||||||
--]]
|
--]]
|
||||||
if bad then
|
if bad then
|
||||||
error("Deprecated use of default.grow_jungletree")
|
error("Deprecated use of default.grow_jungle_tree")
|
||||||
end
|
end
|
||||||
|
|
||||||
local x, y, z = pos.x, pos.y, pos.z
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
function default.grow_pinetree(pos)
|
function default.grow_pinet_ree(pos)
|
||||||
local x, y, z = pos.x, pos.y, pos.z
|
local x, y, z = pos.x, pos.y, pos.z
|
||||||
local maxy = y + random(9, 13) -- Trunk top
|
local maxy = y + random(9, 13) -- Trunk top
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user