flyff-bots icon indicating copy to clipboard operation
flyff-bots copied to clipboard

Mobs adding interface

Open JustMonk opened this issue 1 year ago • 0 comments

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

JustMonk avatar Mar 29 '23 04:03 JustMonk