Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to disable printing inside a luacontroller #633

Merged
merged 3 commits into from Feb 23, 2023

Conversation

fluxionary
Copy link
Contributor

fixes #626.

default behavior is now to dump and log the argument to print similar to how it used to work. by setting mesecon.luacontroller_print_behavior = noop in minetest.conf, this behavior can be disabled.

Copy link
Contributor

@numberZero numberZero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Does it work well with nested objects (that are printed on several lines)?

settingtypes.txt Outdated Show resolved Hide resolved
@fluxionary
Copy link
Contributor Author

LGTM. Does it work well with nested objects (that are printed on several lines)?

it still uses dump(), so a single message is often broken up over multiple lines. an alternate could be to split the dump by line, and log each separately, though that's not really a meaningfully better option IMO.

Copy link
Contributor

@Desour Desour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Indeed LGTM.

settingtypes.txt Outdated Show resolved Hide resolved
mesecons_luacontroller/init.lua Show resolved Hide resolved
Co-authored-by: DS <vorunbekannt75@web.de>
@numberZero numberZero merged commit 6890624 into minetest-mods:master Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

output of print() goes to the server log.
3 participants