cooljeanius / The_Earths_Gut

The Earth's Gut (TEG) is a Wesnoth add-on campaign; originally by @anonymissimus
https://forums.wesnoth.org/viewtopic.php?f=8&t=26800
GNU General Public License v2.0
6 stars 6 forks source link

Figure out what to do with previously-commented-out Lua #26

Closed cooljeanius closed 1 year ago

cooljeanius commented 2 years ago

Normally, in languages with a preprocessor (C, WML, autoconf/m4), I like to change commented-out code into ifdef-ed out code instead, so that it's easier to re-enable if necessary. Lua doesn't have a preprocessor, though, AFAIK. So, instead I'll want to find something else to do with the commented-out Lua code: just remove it? Have it guarded by a language-level conditional? If so, what should the guarding conditional generally be? wesnoth.game_config.debug_mode?

cooljeanius commented 2 years ago

If so, what should the guarding conditional generally be? wesnoth.game_config.debug_mode?

(Note that wesnoth.game_config.debug_mode makes sense for stuff that was commented out due to being debug messages that don't need to be seen in production, but it doesn't make sense for stuff that was commented out due to being broken or buggy... I guess the main issue at hand for this bug, then, is telling the difference between the two...)

cooljeanius commented 2 years ago

working on this

cooljeanius commented 2 years ago

I'll probably want to remove some of those dbms() calls, but for now let's just wait for a response to Elvish-Hunter/Wesnoth_Lua_Pack#6

cooljeanius commented 1 year ago

ok I think the current handling of them is probably fine; there are still dbms() usages there, but they're extremely highly conditionalized, so I doubt an average player will be running into them.