Hey,
I checked it and have a fix proposal, the tree-s growing from the seeds, are not data.raw.tree, but data.raw.plant["tree-plant"], if I iterate through those and apply your changes even hovering the mouse on planted tree will show, that it is modified by the glowing tree's mod.
This also works on seeds generated by other mods.
for name, plant in pairs(data.raw.plant) do
if plant.variations then
for _, variation in pairs(plant.variations) do
local light = util.table.deepcopy(variation.leaves)
local sprite = util.table.deepcopy(variation.leaves)
local scale_modifier = 5
local color = plant.colors[math.random(1, #plant.colors)]
color = divide_color(color, 10)
set_animation_scale_recursive(light, scale_modifier)
set_animation_scale_recursive(sprite, scale_modifier)
draw_as_light_recursive(light)
draw_as_light_recursive(sprite)
set_tint_recursive(light, color)
set_tint_recursive(sprite, color)
if glow_leaves_chance >= math.random() then
if variation.leaves then
draw_as_glow_recursive(variation.leaves)
end
end
local glow_overlay_layers = {
layers = {}
}
if variation.overlay then
local animation = util.table.deepcopy(variation.overlay)
table.insert(glow_overlay_layers.layers, animation)
end
if glow_aura_light_chance >= math.random() then
table.insert(glow_overlay_layers.layers, light)
end
if glow_aura_haze_chance >= math.random() then
table.insert(glow_overlay_layers.layers, sprite)
end
if glow_overlay_layers.layers[1] then
variation.overlay = glow_overlay_layers
end
end
end
end