Mod rename: refruit → hades_refruit

master
Wuzzy 2021-07-03 16:01:28 +02:00
parent b09eb3775f
commit f6a74e50e4
19 changed files with 41 additions and 41 deletions

View File

@ -16,22 +16,22 @@ do
table.insert(plants_rotate, t)
end
local t = { 0, true, "refruit:bud_apple", "refruit:flower_apple", "hades_trees:apple" }
local t = { 0, true, "hades_refruit:bud_apple", "hades_refruit:flower_apple", "hades_trees:apple" }
table.insert(plants_rotate, t)
local t = { 0, true, "refruit:bud_olive", "refruit:flower_olive", "hades_trees:olive" }
local t = { 0, true, "hades_refruit:bud_olive", "hades_refruit:flower_olive", "hades_trees:olive" }
table.insert(plants_rotate, t)
local t = { 0, true, "refruit:bud_orange", "refruit:flower_orange", "hades_trees:orange" }
local t = { 0, true, "hades_refruit:bud_orange", "hades_refruit:flower_orange", "hades_trees:orange" }
table.insert(plants_rotate, t)
local t = { 0, true, "refruit:bud_banana", "refruit:flower_banana", "hades_trees:banana" }
local t = { 0, true, "hades_refruit:bud_banana", "hades_refruit:flower_banana", "hades_trees:banana" }
table.insert(plants_rotate, t)
local t = { 0, true, "refruit:bud_cocoa", "refruit:flower_cocoa", "hades_trees:cocoa_pod" }
local t = { 0, true, "hades_refruit:bud_cocoa", "hades_refruit:flower_cocoa", "hades_trees:cocoa_pod" }
table.insert(plants_rotate, t)
local t = { 0, true, "refruit:bud_coconut", "refruit:flower_coconut", "hades_trees:coconut" }
local t = { 0, true, "hades_refruit:bud_coconut", "hades_refruit:flower_coconut", "hades_trees:coconut" }
table.insert(plants_rotate, t)
t = { 0, false }

View File

@ -9,12 +9,12 @@ local cycles = {
{ "vines:willow", "vines:willow_rotten" },
{ "vines:side", "vines:side_rotten" },
{ "vines:vine", "vines:vine_rotten" },
{ "refruit:bud_apple", "refruit:flower_apple", "hades_trees:apple" },
{ "refruit:bud_olive", "refruit:flower_olive", "hades_trees:olive" },
{ "refruit:bud_cocoa", "refruit:flower_cocoa", "hades_trees:cocoa_pod" },
{ "refruit:bud_coconut", "refruit:flower_coconut", "hades_trees:coconut" },
{ "refruit:bud_banana", "refruit:flower_banana", "hades_trees:banana" },
{ "refruit:bud_orange", "refruit:flower_orange", "hades_trees:orange" },
{ "hades_refruit:bud_apple", "hades_refruit:flower_apple", "hades_trees:apple" },
{ "hades_refruit:bud_olive", "hades_refruit:flower_olive", "hades_trees:olive" },
{ "hades_refruit:bud_cocoa", "hades_refruit:flower_cocoa", "hades_trees:cocoa_pod" },
{ "hades_refruit:bud_coconut", "hades_refruit:flower_coconut", "hades_trees:coconut" },
{ "hades_refruit:bud_banana", "hades_refruit:flower_banana", "hades_trees:banana" },
{ "hades_refruit:bud_orange", "hades_refruit:flower_orange", "hades_trees:orange" },
}
local seeds_3 = { "cotton", "wheat", "spice", "potato", "strawberry", "tomato" }

View File

@ -1,11 +1,10 @@
local S = minetest.get_translator("refruit")
local S = minetest.get_translator("hades_refruit")
-- refruit for minetest
-- makes fruits regrowing on the trees.
-- images and code are WTFPL license (2015 by Glünggi)
refruit = {}
-- hades_refruit for Minetest.
-- Makes fruit regrow on the trees.
hades_refruit = {}
function refruit.add_refruit(id, def)
function hades_refruit.add_hades_refruit(id, def)
local ndef = minetest.registered_nodes[def.fruit_itemstring]
local groups = ndef.groups
if not groups then
@ -25,24 +24,24 @@ function refruit.add_refruit(id, def)
if oldnode.param2 ~= 0 then
return
end
minetest.set_node(pos, {name = "refruit:bud_"..id})
minetest.set_node(pos, {name = "hades_refruit:bud_"..id})
else
return
end
end,
node_dig_prediction = "refruit:bud_"..id,
node_dig_prediction = "hades_refruit:bud_"..id,
})
local bud_itemstring = "refruit:bud_"..id
local flower_itemstring = "refruit:flower_"..id
local bud_itemstring = "hades_refruit:bud_"..id
local flower_itemstring = "hades_refruit:flower_"..id
minetest.register_node(bud_itemstring, {
description = def.bud_description,
_tt_help = def.bud_tt,
drawtype = ndef.drawtype,
tiles = {"refruit_bud_"..id..".png"},
inventory_image = "refruit_bud_"..id..".png",
wield_image = "refruit_bud_"..id..".png",
tiles = {"hades_refruit_bud_"..id..".png"},
inventory_image = "hades_refruit_bud_"..id..".png",
wield_image = "hades_refruit_bud_"..id..".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -59,9 +58,9 @@ function refruit.add_refruit(id, def)
description = def.flower_description,
_tt_help = def.flower_tt,
drawtype = ndef.drawtype,
tiles = {"refruit_flower_"..id..".png"},
inventory_image = "refruit_flower_"..id..".png",
wield_image = "refruit_flower_"..id..".png",
tiles = {"hades_refruit_flower_"..id..".png"},
inventory_image = "hades_refruit_flower_"..id..".png",
wield_image = "hades_refruit_flower_"..id..".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -77,18 +76,18 @@ function refruit.add_refruit(id, def)
minetest.register_abm({
label = "Grow "..bud_itemstring.." to "..flower_itemstring,
nodenames = {"refruit:bud_"..id},
nodenames = {"hades_refruit:bud_"..id},
neighbors = def.neighbors,
interval = def.bud_interval,
chance = def.bud_chance,
action = function(pos, node)
minetest.set_node(pos, {name="refruit:flower_"..id})
minetest.set_node(pos, {name="hades_refruit:flower_"..id})
end,
})
minetest.register_abm({
label = "Grow "..flower_itemstring.." to "..def.fruit_itemstring,
nodenames = {"refruit:flower_"..id},
nodenames = {"hades_refruit:flower_"..id},
neighbors = def.neighbors,
interval = def.flower_interval,
chance = def.flower_chance,
@ -118,7 +117,7 @@ end
local surv = S("Needs a tree trunk to survive")
refruit.add_refruit("apple", {
hades_refruit.add_hades_refruit("apple", {
fruit_itemstring = "hades_trees:apple",
bud_description = S("Apple Bud"),
bud_tt = S("Grows to an Apple Flower").."\n"..surv.."\n"..S("Needs Common Leaves to grow"),
@ -135,7 +134,7 @@ refruit.add_refruit("apple", {
flower_selbox = {-0.1875, -0.3125, -0.1875, 0.1875, 0.3125, 0.1875},
})
refruit.add_refruit("olive", {
hades_refruit.add_hades_refruit("olive", {
fruit_itemstring = "hades_trees:olive",
bud_description = S("Olive Bud"),
bud_tt = S("Grows to an Olive Flower").."\n"..surv.."\n"..S("Needs Olive Leaves to grow"),
@ -152,7 +151,7 @@ refruit.add_refruit("olive", {
flower_selbox = {-4/16, -1/16, -4/16, 4/16, 0.5, 4/16},
})
refruit.add_refruit("orange", {
hades_refruit.add_hades_refruit("orange", {
fruit_itemstring = "hades_trees:orange",
bud_description = S("Orange Bud"),
bud_tt = S("Grows to an Orange Flower").."\n"..surv.."\n"..S("Needs Orange Leaves to grow"),
@ -167,7 +166,7 @@ refruit.add_refruit("orange", {
flower_selbox = {-0.1875, -0.4375, -0.1875, 0.1875, 0.25, 0.1875},
})
refruit.add_refruit("banana", {
hades_refruit.add_hades_refruit("banana", {
fruit_itemstring = "hades_trees:banana",
bud_description = S("Banana Bud"),
bud_tt = S("Grows to a Banana Flower").."\n"..surv.."\n"..S("Needs Banana Leaves to grow"),
@ -182,7 +181,7 @@ refruit.add_refruit("banana", {
flower_selbox = {-0.1875, -0.4375, -0.1875, 0.1875, 0.25, 0.1875},
})
refruit.add_refruit("cocoa", {
hades_refruit.add_hades_refruit("cocoa", {
fruit_itemstring = "hades_trees:cocoa_pod",
bud_description = S("Cocoa Bud"),
bud_tt = S("Grows to a Cocoa Flower").."\n"..surv.."\n"..S("Needs Common Tropical Leaves to grow"),
@ -197,7 +196,7 @@ refruit.add_refruit("cocoa", {
flower_selbox = {-0.1875, -0.1875, -0.1875, 0.1875, 0.5, 0.1875},
})
refruit.add_refruit("coconut", {
hades_refruit.add_hades_refruit("coconut", {
fruit_itemstring = "hades_trees:coconut",
bud_description = S("Coconut Bud"),
bud_tt = S("Grows to a Coconut Flower").."\n"..surv.."\n"..S("Needs Common Tropical Leaves to grow"),

View File

@ -0,0 +1,3 @@
name = hades_refruit
description = Makes fruit regrow on the trees
depends = hades_sounds, hades_core, hades_trees

View File

@ -0,0 +1,2 @@
Images and code are licensed under the WTFPL.
Original mod writtein in 2015 by Glünggi.

View File

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 150 B

View File

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

View File

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 163 B

View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

View File

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 163 B

View File

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 181 B

View File

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

View File

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

View File

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 210 B

View File

@ -1,2 +0,0 @@
wtfpl licenses
2015 by Glünggi

View File

@ -1,2 +0,0 @@
name = refruit
depends = hades_sounds, hades_core, hades_trees