Add independent connected stem textures

This commit is contained in:
Wuzzy 2017-07-17 14:26:25 +02:00
parent 685922c4a9
commit fa7cb8397a
5 changed files with 12 additions and 13 deletions

View file

@ -103,7 +103,7 @@ local stem_def = {
mcl_farming:add_plant("plant_melon_stem", "mcl_farming:melontige_unconnect", {"mcl_farming:melontige_1", "mcl_farming:melontige_2", "mcl_farming:melontige_3", "mcl_farming:melontige_4", "mcl_farming:melontige_5", "mcl_farming:melontige_6", "mcl_farming:melontige_7"}, 30, 5) mcl_farming:add_plant("plant_melon_stem", "mcl_farming:melontige_unconnect", {"mcl_farming:melontige_1", "mcl_farming:melontige_2", "mcl_farming:melontige_3", "mcl_farming:melontige_4", "mcl_farming:melontige_5", "mcl_farming:melontige_6", "mcl_farming:melontige_7"}, 30, 5)
-- Register actual melon, connected stems and stem-to-melon growth -- Register actual melon, connected stems and stem-to-melon growth
mcl_farming:add_gourd("mcl_farming:melontige_unconnect", "mcl_farming:melontige_linked", "mcl_farming:melontige_unconnect", stem_def, stem_drop, "mcl_farming:melon", melon_base_def, 25, 15) mcl_farming:add_gourd("mcl_farming:melontige_unconnect", "mcl_farming:melontige_linked", "mcl_farming:melontige_unconnect", stem_def, stem_drop, "mcl_farming:melon", melon_base_def, 25, 15, "mcl_farming_melon_stem_connected.png")
-- Items and crafting -- Items and crafting
minetest.register_craftitem("mcl_farming:melon_item", { minetest.register_craftitem("mcl_farming:melon_item", {

View file

@ -95,9 +95,7 @@ local pumpkin_base_def = {
mcl_farming:add_plant("plant_pumpkin_stem", "mcl_farming:pumpkintige_unconnect", {"mcl_farming:pumpkin_1", "mcl_farming:pumpkin_2", "mcl_farming:pumpkin_3", "mcl_farming:pumpkin_4", "mcl_farming:pumpkin_5", "mcl_farming:pumpkin_6", "mcl_farming:pumpkin_7"}, 30, 5) mcl_farming:add_plant("plant_pumpkin_stem", "mcl_farming:pumpkintige_unconnect", {"mcl_farming:pumpkin_1", "mcl_farming:pumpkin_2", "mcl_farming:pumpkin_3", "mcl_farming:pumpkin_4", "mcl_farming:pumpkin_5", "mcl_farming:pumpkin_6", "mcl_farming:pumpkin_7"}, 30, 5)
-- Register actual pumpkin, connected stems and stem-to-pumpkin growth -- Register actual pumpkin, connected stems and stem-to-pumpkin growth
mcl_farming:add_gourd("mcl_farming:pumpkintige_unconnect", "mcl_farming:pumpkintige_linked", "mcl_farming:pumpkintige_unconnect", stem_def, stem_drop, "mcl_farming:pumpkin_face", pumpkin_base_def, 30, 15) mcl_farming:add_gourd("mcl_farming:pumpkintige_unconnect", "mcl_farming:pumpkintige_linked", "mcl_farming:pumpkintige_unconnect", stem_def, stem_drop, "mcl_farming:pumpkin_face", pumpkin_base_def, 30, 15, "mcl_farming_pumpkin_stem_connected.png")
-- Jack o'Lantern -- Jack o'Lantern
minetest.register_node("mcl_farming:pumpkin_face_light", { minetest.register_node("mcl_farming:pumpkin_face_light", {

View file

@ -107,9 +107,10 @@ end
- gourd_def: (almost) full definition of the gourd node. This function will add after_dig_node to the definition for unconnecting any connected stems - gourd_def: (almost) full definition of the gourd node. This function will add after_dig_node to the definition for unconnecting any connected stems
- grow_interval: Will attempt to grow a gourd periodically at this interval in seconds - grow_interval: Will attempt to grow a gourd periodically at this interval in seconds
- grow_chance: Chance of 1/grow_chance to grow a gourd next to the full unconnected stem after grow_interval has passed. Must be a natural number - grow_chance: Chance of 1/grow_chance to grow a gourd next to the full unconnected stem after grow_interval has passed. Must be a natural number
- connected_stem_texture: Texture of the connected stem
]] ]]
function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, stem_itemstring, stem_def, stem_drop, gourd_itemstring, gourd_def, grow_interval, grow_chance) function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, stem_itemstring, stem_def, stem_drop, gourd_itemstring, gourd_def, grow_interval, grow_chance, connected_stem_texture)
local connected_stem_names = { local connected_stem_names = {
connected_stem_basename .. "_r", connected_stem_basename .. "_r",
@ -226,27 +227,27 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
"blank.png", -- bottom "blank.png", -- bottom
"blank.png", -- right "blank.png", -- right
"blank.png", -- left "blank.png", -- left
"farming_tige_connect.png", -- back connected_stem_texture, -- back
"farming_tige_connect.png^[transformFX90" --front connected_stem_texture.."^[transformFX90" --front
}, },
{ "blank.png", --top { "blank.png", --top
"blank.png", -- bottom "blank.png", -- bottom
"blank.png", -- right "blank.png", -- right
"blank.png", -- left "blank.png", -- left
"farming_tige_connect.png^[transformFX90", --back connected_stem_texture.."^[transformFX90", --back
"farming_tige_connect.png", -- front connected_stem_texture, -- front
}, },
{ "blank.png", --top { "blank.png", --top
"blank.png", -- bottom "blank.png", -- bottom
"farming_tige_connect.png^[transformFX90", -- right connected_stem_texture.."^[transformFX90", -- right
"farming_tige_connect.png", -- left connected_stem_texture, -- left
"blank.png", --back "blank.png", --back
"blank.png", -- front "blank.png", -- front
}, },
{ "blank.png", --top { "blank.png", --top
"blank.png", -- bottom "blank.png", -- bottom
"farming_tige_connect.png", -- right connected_stem_texture, -- right
"farming_tige_connect.png^[transformFX90", -- left connected_stem_texture.."^[transformFX90", -- left
"blank.png", --back "blank.png", --back
"blank.png", -- front "blank.png", -- front
} }

View file

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B