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

Mobs adding interface #33

Merged
merged 15 commits into from May 20, 2024
Merged

Conversation

JustMonk
Copy link
Contributor

@JustMonk JustMonk commented Mar 29, 2023

Good job. I want to propose a way to add/remove mobs (which will be saved in json format) from the interface to make process more user-friendly, it also required some changes in the data format

Changes:

  • Mob adding popup: when "save" button is pressed, selected image (with cutted mob name) will be copied to the "assets/names" folder as "{mob_name}.png"
  • List of selected mobs saved in sg storage as list of names (list[str])
  • List of all added mobs stored in "assets/mob_list.json"
  • Method MobInfo.get_all_mobs now returns a dict:
{
    [mobName: string]: {
        name: string
        element: "wind" | "fire" | "soil" | "water" | "electricity"
        map_name: string
        height_offset: number
    }
}
  • Instead of getting mob["name_img"] currently bot used getting a file "assets/names/{mob_name}.png" (and also calls cv.imread in runtime)
  • Mob deleting popup: when "delete" button is pressed, if mobs were selected they become unselected and their images removes from "assets/names"
  • Small refactoring of popup handlers

@xandao-dev xandao-dev merged commit 1527dfc into xandao-dev:main May 20, 2024
@lrphael
Copy link

lrphael commented May 20, 2024

Thnx @xandao-dev for merge this PR

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