Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register.lua: Throw error if node 'light_source' > core.LIGHT_MAX
Add 'core.LIGHT_MAX = 14' to builtin/game/constants.lua with the intention to replace misplaced 'default.LIGHT_MAX = 14' in Minetest Game. Add comment in light.h requiring the constant be changed in both places. Add lighting bug warning to note in lua_api.txt. There are hundreds of mod uses of 15 which causes a lighting bug.
- Loading branch information
Showing
4 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paramat but why preventing server start if you can output simple warning to console/debug.txt and leave server admin headache-free?
Quoting cheapie:
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to modify six mods to make one world load after this.
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warnings are not always seen and 15 causes a serious and difficult-to-fix lighting bug. So we thought the strictness justified.
It's no extra work to fix things now instead of later.
However we could make it a warning and auto-limit to 14 @sofar ?
Easy to code so someone else could do that, we're busy.
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen any lighting issues before from mods using a light_source of 15 (or the completely-invalid 30, like blox did for some reason). Is there an issue report here somewhere for it?
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"we're busy", says the guy whose committed code broke a bunch of mods. Seriously?
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #3964 (comment)
When adding and removing the node infinitely propagating light is created, i don't yet know of a way to fix it, maybe a mod using a voxelmanip to reset lighting.
What code broke what mods? We solved a widespread and serious bug and added notification to avoid it, there are many other situations where node definition errors will halt the game, it's not unusual.
We are indeed busy and a simple PR could be done by a contributor. Not saying we'll agree to a less strict notification though, i'm undecided.
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a mod works before the commit, and fails after, and nothing functional about the mod has actually changed, then by definition the engine broke the mod. If there are "hundreds" of bad uses of lighting values around, then that alone was sufficient reason not to throw an error.
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree it's breakiing, if anything it's fixing. Ok i'll change it now to a warning plus auto-limit,
15 is so widespread and likely to persist for months and not everyone knows how to edit mods,
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#4538
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just found how to fix the lighting bug, it's easy when you know how.
3aefa5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#4538 merged.