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

🔨 cleanup onEffectGain within items/* files #5765

Open
3 tasks done
MowFord opened this issue May 17, 2024 · 1 comment
Open
3 tasks done

🔨 cleanup onEffectGain within items/* files #5765

MowFord opened this issue May 17, 2024 · 1 comment
Labels
enhancement New feature request

Comments

@MowFord
Copy link
Contributor

MowFord commented May 17, 2024

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.

Describe the feature

There are two cleanup items that should happen to all item lua files with onEffectGain/onEffectLose functions

  • update the mods to be applied directly to the effect
    • This should be done for all effects/* files as well, but want to start here
  • remove any instances of onEffectGain for items that don't apply ENCHANTMENT effect, as they are useless and confusing for the uninitiated
@MowFord MowFord added the enhancement New feature request label May 17, 2024
@MowFord
Copy link
Contributor Author

MowFord commented May 17, 2024

a quick and dirty pair of sed commands can do the first item:

  • remove all onEffectLose functions: sed -e '/onEffectLose/,/^$/!b' -e 'd' * -i
  • replace the target: objects to effect: objects: sed -e '/onEffectGain/,/return itemObject/!b' -e 's/target:/effect:/' * -i

Edit: Also please don't do this until #5726 is merged, lol

I'm good to be assigned this, i just wanted to post it here if someone else wants to take a crack at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

No branches or pull requests

1 participant