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 deprecated function calls #104

Conversation

Emojigit
Copy link
Member

@Emojigit Emojigit commented Jun 17, 2024

This PR relaces deprecated calls. The following are fixed:

  • Calls to ObjectRef:moveto() (Replaced by ObjectRef:add_pos() or ObjectRef:move_to() depending on engine version)
  • Calls to ObjectRef:setyaw() (Replaced by ObjectRef:set_yaw())
  • Calling MetaDataRef:set_string() with nil as the second parameter (Replaced by "")

The following one is purposely not fixed:

local deprecated_metadata = itemstack:get_metadata()

This PR is ready for review.

Copy link
Member

@Niklp09 Niklp09 left a comment

Choose a reason for hiding this comment

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

LGTM. Might be worth mentioning that add_pos is available in 5.9.0 and higher.

@Emojigit Emojigit requested a review from Niklp09 June 17, 2024 22:51
@Emojigit

This comment was marked as outdated.

@Emojigit
Copy link
Member Author

Emojigit commented Jun 17, 2024

I re-requested approval because of the significant change on add_object_pos. If somebody cherry-picking luanti-org/luanti@ceaa7e2 and causing a false-positive is a concern, I can revert my changes.

Copy link
Member

@BuckarooBanzay BuckarooBanzay 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 the code looks good 👍 (up to you now @Niklp09 😏)

util_execute_cycle.lua Outdated Show resolved Hide resolved
@Emojigit Emojigit requested review from Niklp09 and SmallJoker June 22, 2024 06:38
@SmallJoker
Copy link
Member

LGTM. Will merge in a few days unless there are objections.

@SmallJoker SmallJoker merged commit cd3a42c into minetest-mods:master Jun 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants