mirror of
https://github.com/mhwikicn/mhdos-armor-set-searcher
synced 2025-12-05 20:39:04 +08:00
format scripts
This commit is contained in:
parent
3c141f870c
commit
536b45db0d
@ -1,5 +1,6 @@
|
||||
import json
|
||||
|
||||
|
||||
def reorder_resistances(raw: list) -> list:
|
||||
return [
|
||||
raw[0],
|
||||
@ -9,6 +10,7 @@ def reorder_resistances(raw: list) -> list:
|
||||
raw[4],
|
||||
]
|
||||
|
||||
|
||||
def map_skills_map(raw: dict, skill_ids: dict) -> dict:
|
||||
skills = {}
|
||||
for s in raw:
|
||||
@ -22,6 +24,7 @@ def map_skills_map(raw: dict, skill_ids: dict) -> dict:
|
||||
|
||||
return skills
|
||||
|
||||
|
||||
def map_deco(raw: dict, skill_ids: dict) -> dict:
|
||||
return {
|
||||
"name": raw["name"],
|
||||
@ -54,7 +57,8 @@ if __name__ == "__main__":
|
||||
for piece in armor_category["armor"]:
|
||||
# get attributes
|
||||
name = piece["name"]
|
||||
if name == "None": continue
|
||||
if name == "None":
|
||||
continue
|
||||
defe = piece["defense"]
|
||||
|
||||
# get type
|
||||
|
||||
@ -2,9 +2,11 @@ import json
|
||||
|
||||
CATEGORIES = []
|
||||
|
||||
|
||||
def clean_name(s: str) -> str:
|
||||
return s.split("<")[0]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# read input
|
||||
with open("./raw-skills.json") as f:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user