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

Modlist Improvements #13933

Closed

Conversation

Jade-Harleyy
Copy link

@Jade-Harleyy Jade-Harleyy commented May 7, 2024

This PR:

  • Adds options for renaming and deleting local mods.
  • Adds an option to copy a workshop mod to a local mod.
  • Fixes the context menu's "unsubscribe" button not working.
  • Cleans up context menu creation code, hopefully making it easier to read and work with.
  • Adds methods to the Barotrauma.IO.Directory class to allow for copying and moving directories.

New Localization Tags:

  • RenamePackage - Rename
  • CopyWorkshopToLocal - Copy to local
  • DeleteMods - Delete Local Mods
  • DeleteModsConfirm - Are you sure you want to delete [amount] mod[plural]?\nThis cannot be undone!

- Add options for renaming and deleting local mods.
- Add option to copy a workshop mod to a local mod.
- Fix context menu 'unsubscribe' button not working.
- Cleaned up context menu creation code, hopefully making it easier to read.
@Jade-Harleyy Jade-Harleyy changed the title Modlist Improvements: Modlist Improvements May 7, 2024
@mygamingaccount
Copy link

mygamingaccount commented May 8, 2024

Reviewing:

  • when I try to rename a mod to the same name, it gives me an error (A local package with the name or directory "Modname" already exists) instead of ignoring the change
  • rename text box overlaps with the "Cancel" button

@mygamingaccount
Copy link

I cherry picked this and now it feels awful when Baro updates and this feature is not there

@Regalis11
Copy link
Collaborator

Regalis11 commented May 27, 2024

Are you sure you want to delete [amount] mod[plural]?\nThis cannot be undone!

This will not work in all languages, plurals don't work the same way as they do in English (adding an s to the end) in every language. For example, in Finnish the singular here would be "modin" and the plural would be "modia", and in many languages the rest of the sentence needs to change too when the word is in plural.

TextManager.Get("RenamePackage") + $" {mod.Name}"

This also doesn't work properly. The name of the mod may need to come before the "RenamePackage" word in some languages, and not all languages put a space between the words.

@Regalis11
Copy link
Collaborator

I addressed the localization issues myself and moved this to a PR in our private repo. Thank you for your contribution once again! :)

@Regalis11 Regalis11 closed this May 27, 2024
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.

None yet

3 participants