Skip to content

Commit 1dad3f7

Browse files
committed
Attack Type Fix
Added more options for attack type as well.
1 parent aecb5a4 commit 1dad3f7

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

assets/lists.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,20 @@
117117
"C"
118118
],
119119

120-
"attack_type": [
121-
"STR",
122-
"MAG"
123-
],
120+
"attack_type": {
121+
"STR - Sword": "00",
122+
"STR - Lance": "01",
123+
"STR - Axe": "02",
124+
"STR - Bow": "03",
125+
"STR - Knife": "04",
126+
"STR - Strike": "05",
127+
"MAG - Fire": "06",
128+
"MAG - Thunder": "07",
129+
"MAG - Wind": "08",
130+
"MAG - Light": "09",
131+
"MAG - Dark": "0A",
132+
"MAG - Card": "10"
133+
},
124134

125135
"rank_map": {
126136
"SS": "014B",

src/functions/itemCode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _data(data) -> list[str]:
3131

3232
if input:
3333
if header == 'Attack_Type':
34-
str_mag = {'ATK': '00', 'MAG': '06'}.get(input)
34+
str_mag = config.attack_type.get(input)
3535
code.append(code_gen(ITEM, offset, str_mag, ALL, 2))
3636

3737
elif header == 'Weapon_Rank':

ui/elements/item_editor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ def reset_data():
7878
frame.grid_rowconfigure(i, weight=1)
7979
customtkinter.CTkLabel(frame, text=data.replace("_", " ")).grid(row=i, column=0, padx=5, pady=5, sticky='nsew')
8080
if data in ['Attack_Type', 'Weapon_Rank']:
81-
opt_list = config.attack_type if data == 'Attack_Type' else config.weapon_ranks
82-
option_menu = customtkinter.CTkOptionMenu(frame, values=opt_list, dynamic_resizing=False, width=config.option_width)
81+
_width = config.option_width if data == "Weapon_Rank" else config.option_width*2
82+
opt_list = list(config.attack_type) if data == 'Attack_Type' else config.weapon_ranks
83+
option_menu = customtkinter.CTkOptionMenu(frame, values=opt_list, dynamic_resizing=False, width=_width)
8384
option_menu.grid(row=i, column=1, padx=5, pady=5)
8485
option_menu.set('')
8586
self.item_data.append(option_menu)

0 commit comments

Comments
 (0)