Terrain changes are not reflected in the lighting array #32
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Terrain changes (such as through a Change Terrain node) do not update the t_d.lighting array.
It's been pointed out that this aspect of the bug could be useful, and as such I'm going to modify the Change Town Lighting node to allow this feature (so that you can "purge" the lighting array by setting it to the same light level it already was).
commit
d289ae8partially fixes this issue by copy-pasting the lighting generation code from the Scenario Editor. However, due to unknown circumstances, any "warped in" light-emitting tiles (i.e. change a cave floor to a torch" will only emit a radius of one tile. I'm not quite sure how to fix this.I haven't tested yet to be sure it works right, but lighting is now recalculated whenever a terrain space is changed to a type with a different light radius. I'm wondering what about the bug could be useful though?
Pretty sure I fixed this by always regenerating the lighting after a terrain change...
Confirmed: this is fixed.