account for torso up in get-skills script

This commit is contained in:
TimHasert 2023-08-20 22:54:58 +02:00
parent 9d7f1c8e22
commit eb67470b6e

View File

@ -21,13 +21,17 @@ if __name__ == "__main__":
for (id, skill) in enumerate(skills): for (id, skill) in enumerate(skills):
# get attributes # get attributes
name = skill["name"] name = skill["name"]
if name == "Torso Up": continue # special case for torso up
category = 0 category = 0
# init skill map and skill names map # init skill map and skill names map
acts = [] acts = []
skill_names[id] = name skill_names[id] = name
# handle torso up
if name == "Torso Up":
skill_activations[id] = []
continue
# iterate over activations of this skill # iterate over activations of this skill
for activation in skill["stagesFormatted"]: for activation in skill["stagesFormatted"]:
# bump activations id # bump activations id
@ -39,8 +43,8 @@ if __name__ == "__main__":
is_positive = bool(points > 0) is_positive = bool(points > 0)
a_name = clean_name(activation["name"]) a_name = clean_name(activation["name"])
# build object and push object # model and push object
build_activation = { modeled_activation = {
"category": category, "category": category,
"id": a_id, "id": a_id,
"isPositive": is_positive, "isPositive": is_positive,
@ -48,7 +52,7 @@ if __name__ == "__main__":
"requiredPoints": points, "requiredPoints": points,
"requiredSkill": id, "requiredSkill": id,
} }
acts.append(build_activation) acts.append(modeled_activation)
# reverse acts (positive acts should be first) and append to map # reverse acts (positive acts should be first) and append to map
acts.reverse() acts.reverse()