Nathan.S wrote:This is going to sound horrible, ...
I know there is some way to profile mods, and see what kind of processing power they use, and time spent, but with not every being too worried about that, I've never looked into it.
Don wrote:I think tenplus1 is who you should talk to about this. He is great with knowing the good/bad of this. His mobs are the most popular. I wish I could help but I have a personal issue that I have to deal with
TheReaperKing wrote:What plants aren't growing? Also that's odd that it has crashed on you. I use it every day with my students and if it has crashed it has only been once or twice but not in a long time.
Nathan.S wrote:TheReaperKing the only plants that will "sprout" in the spring are the default flowers, but I think there is a group used to kill the plants in the fall.
Nathan.S wrote:I need to add support for other plant mods and add them to a table and then randomly select from that table to spawn them.
TheReaperKing wrote:I was mostly just wondering what plants Snoopy was referring to that weren't growing.
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)
-- September
-- ...
-- Aspen Leaves
-- ...
if day >=8
and day <=14 then
if n == 'mymonths:sticks_aspen'
or n == 'mymonths:leaves_aspen_blooms'
or n == 'default:aspen_leaves' then
minetest.set_node(pos, {name = 'mymonths:leaves_yellow'})
end
end
-- October
-- ...
-- Aspen Leaves
-- ...
if day >=8
and day <=14 then
if n == 'mymonths:sticks_aspen'
or n == 'mymonths:leaves_yellow_aspen'
or n == 'mymonths:leaves_orange_aspen'
or n == 'mymonths:leaves_aspen_blooms'
or n == 'default:aspen_leaves' then
minetest.set_node(pos, {name = 'mymonths:leaves_red'})
Nathan.S wrote:I think his issue is that the papyrus doesn't naturally spawn after the first winter, as it doesn't have a spawning code in mymonths, but I'm pretty sure it does get removed in the fall.
-- apples die in November
minetest.register_abm({
nodenames = {'default:apple'},
interval = 15,
chance = 10,
action = function (pos)
if mymonths.month_counter == 11 then
minetest.set_node(pos,{name = 'mymonths:sticks_default'})
local i = 1
repeat
local n = minetest.get_node({x = pos.x, y = pos.y - i, z = pos.z})
if n.name == "air" then
minetest.spawn_item({
x = pos.x,
y = pos.y - i,
z = pos.z},
'default:apple')
end
i = i + 1
until n.name == "air" or i == 4
end
end
})
--apples die in November
minetest.register_abm({
nodenames = {'default:apple'},
interval = 15,
chance = 10,
action = function (pos, node, active_object_count, active_object_count_wider)
local nodeu1 = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
local nodeu2 = minetest.get_node({x = pos.x, y = pos.y - 2, z = pos.z})
local nodeu3 = minetest.get_node({x = pos.x, y = pos.y - 3, z = pos.z})
local nodeu4 = minetest.get_node({x = pos.x, y = pos.y - 4, z = pos.z})
if mymonths.month_counter == 11 then
if nodeu1.name == "air" then
minetest.spawn_item({
x = pos.x,
y = pos.y - 1,
z = pos.z}, 'default:apple')
minetest.set_node(pos,{name = 'mymonths:sticks_default'})
elseif nodeu2.name == "air" then
minetest.spawn_item({
x = pos.x,
y = pos.y - 2,
z = pos.z}, 'default:apple')
minetest.set_node(pos,{name = 'mymonths:sticks_default'})
elseif nodeu3.name == "air" then
minetest.spawn_item({
x = pos.x,
y = pos.y - 3,
z = pos.z}, 'default:apple')
minetest.set_node(pos,{name = 'mymonths:sticks_default'})
elseif nodeu4.name == "air" then
minetest.spawn_item({
x = pos.x,
y = pos.y - 4,
z = pos.z}, 'default:apple')
minetest.set_node(pos,{name = 'mymonths:sticks_default'})
else
minetest.set_node(pos,{name = 'mymonths:sticks_default'})
end
end
end
})
--Settings
mymonths = {}
--Turn damage on or off. This will make storms and hail cause damage to players
mymonths.damage = false
--You can turn weather off; this will put snow and puddles off too
mymonths.use_weather = true
--Leaves change color in the fall.
mymonths.leaves = true
--Have snow accumulate on the ground
mymonths.snow_on_ground = true
--Puddles appear when raining
mymonths.use_puddles = true
--Flowers die in winter, grown in spring
mymonths.flowers_die = true
--Grass changes color in fall, and spring
mymonths.grass_change = true
if minetest.get_modpath("lightning") then
lightning.auto = false
end
if minetest.get_modpath("thirsty") then
thirst = true
end
local modpath = minetest.get_modpath("mymonths")
local input = io.open(modpath .. "/settings.txt", "r")
if input then
dofile(modpath .. "/settings.txt")
input:close()
input = nil
end
dofile(modpath .. "/functions.lua")
dofile(modpath .. "/abms.lua")
dofile(modpath .. "/command.lua")
dofile(modpath .. "/months.lua")
if mymonths.use_weather == true then
dofile(modpath .. "/weather.lua")
else
mymonths.snow_on_ground = false
mymonths.use_puddles = false
end
if mymonths.snow_on_ground == false then
minetest.register_alias("mymonths:snow_cover_1", "air")
minetest.register_alias("mymonths:snow_cover_2", "air")
minetest.register_alias("mymonths:snow_cover_3", "air")
minetest.register_alias("mymonths:snow_cover_4", "air")
minetest.register_alias("mymonths:snow_cover_5", "air")
end
if mymonths.use_puddles == false then
minetest.register_alias("mymonths:puddle", "air")
end
if mymonths.grass_change == true then
dofile(modpath .. "/grass.lua")
end
if mymonths.leaves == true then
dofile(modpath .. "/leaves.lua")
else
minetest.register_alias("mymonths:leaves_pale_green", "default:leaves")
minetest.register_alias("mymonths:leaves_orange", "default:leaves")
minetest.register_alias("mymonths:leaves_red", "default:leaves")
minetest.register_alias("mymonths:sticks_default", "default:leaves")
minetest.register_alias("mymonths:sticks_aspen", "default:aspen_leaves")
end
if mymonths.flowers_die == true then
dofile(modpath .. "/flowers.lua")
end
Nathan.S wrote:I checked out your new init.lua file, I like it. Things are cleaner, and it has the same functionality, so I've copied that over our code. (I've also added you as a contributor in the code.)
Nathan.S wrote:...
P.S.
There is an easter egg, that wasn't intentional, forgot to remove some testing code. See if you can find it. :D This deal won't last long so update today. ;)
-- Flowers grow in spring, flower spread ABM is in flower mod, this just gives
-- initial population as that ABM won't grow flowers where there are none.
minetest.register_abm({
nodenames = {'group:soil'},
interval = 10,
chance = 300,
action = function (pos, node)
if node.name == 'default:desert_sand' or node.name == 'default:dirth_with_snow' then
return
end
Users browsing this forum: No registered users and 11 guests