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

Fix travelnet removal issue and cleanup removal code #58

Merged
merged 3 commits into from
Aug 21, 2022

Conversation

oversword
Copy link
Collaborator

@oversword oversword commented Aug 19, 2022

Fixes #57

The issue here was that after this MR #56 I accidentally changed one instance of "owner" to "owner_name" that was referring to metadata, not formspec fields. The error was made because the metadata is serialised, so is a table with the fields property, I interpreted this as formspec fields instead of metadata so didn't correct it when reviewing the code.

Incorrect. We want it to remove the station if the data is broken. I've cleaned up the code a little as I noticed we don't technically detect all failures and may actually give a player an item when the removal actually fails.

I split up the travelnet.remove_box method into travelnet.remove_box_action and travelnet.remove_box_message, separating out the action lets us tell if it's succeeded or not before continuing. It also brings it closer in line with the high-level actions, which respond in the same way on failure

travelnet.remove_box is kept, and simply calls into those new methods to replicate the old behaviour

@oversword
Copy link
Collaborator Author

Actually... if the data doesn't exist, maybe we do want to remove the node without updating the data...

functions.lua Show resolved Hide resolved
Copy link
Member

@S-S-X S-S-X left a comment

Choose a reason for hiding this comment

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

Didn't test but LGTM

@OgelGames
Copy link

Tested and works as expected 👍

@OgelGames OgelGames merged commit 20e77d5 into mt-mods:master Aug 21, 2022
waxtatect added a commit to waxtatect/travelnet that referenced this pull request Aug 22, 2022
translations as po files from unmerged PRs: mt-mods#52, mt-mods#58 and mt-mods#41 in https://github.com/Sokomine/travelnet
converted to tr files manually with regex
wsor4035 pushed a commit that referenced this pull request Aug 26, 2022
* add fr, it and pl translations

translations as po files from unmerged PRs: #52, #58 and #41 in https://github.com/Sokomine/travelnet
converted to tr files manually with regex

* update translations

generated using https://github.com/minetest-tools/update_translations

* clean unused strings and manual fixes

* typos and missing translations

* generate the translations... again with the script

some small fixes too

* more fixes

descriptions defined in travelnet.node_description are translated but not found by the script

* let's do this

add S() to travelnet.node_description directly, remove part of changes in 833c5a3

* one more string

travelnet have this field filled with the player name

* consistency with "Travelnet-Box"

already taken in account by most translations, missed the template in the previous commit
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.

Removing travelnet doesn't remove it from network
3 participants