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

Hammer tube repair issue with TP tubes #36

Closed
S-S-X opened this issue Jun 11, 2022 · 5 comments · Fixed by #37
Closed

Hammer tube repair issue with TP tubes #36

S-S-X opened this issue Jun 11, 2022 · 5 comments · Fixed by #37
Labels
bug Something isn't working

Comments

@S-S-X
Copy link
Member

S-S-X commented Jun 11, 2022

TP tubes refusing to continue sending when broken and then repaired again.

Tubes should have optional repair method to allow overriding default minetest.swap_node repair behavior with additional stuff.
That makes fixing simple while keeping full compatibility and allowing any behavior node requires for repair.

Just call new def.on_repair or def.pipeworks_on_repair or whatever here if it is defined or use old behavior as fallback:

pipeworks.logger(log_msg.." with "..wieldname.." to repair it.")
minetest.swap_node(pos, { name = was_node.name, param2 = was_node.param2 })
pipeworks.scan_for_tube_objects(pos)

@S-S-X S-S-X added the bug Something isn't working label Jun 11, 2022
@S-S-X
Copy link
Member Author

S-S-X commented Jun 11, 2022

Also does anyone have idea why there's empty space in messages like this?

log_msg.."            with "..wieldnam

@BuckarooBanzay
Copy link
Member

Also does anyone have idea why there's empty space in messages like this?

Not sure, maybe to align it with other messages, but it's not even a "tab" character 🤔

@SwissalpS
Copy link
Contributor

probably to show that these additional lines belong to line started at line 67 and that they are not individual messages

@OgelGames
Copy link
Contributor

probably to show that these additional lines belong to line started at line 67 and that they are not individual messages

Yep, I just noticed it when testing, it makes them line up:

[pipeworks] singleplayer struck a broken tube at (-217,9,171)
            with anvil:hammer to repair it.

I don't know why they are on separate lines though, it's not like line length matters with log messages...

@SwissalpS
Copy link
Contributor

I think it's just to make them stand out more and easier to read. I sometimes do that when debugging but mostly remove it for deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants