File size: 971 Bytes
a69d738
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#importing default_config from relatively_constant_variables (app.py)

# Helper functions to dynamically add items
def add_inventory_item(inventory_items, type, name, description):
    new_item = {"type": type, "name": name, "description": description}
    inventory_items.append(new_item)
    return inventory_items

def add_skill(skills_items, branch, name, learned):
    new_skill = {"branch": branch, "name": name, "learned": learned == 'True'}
    skills_items.append(new_skill)
    return skills_items

def add_objective(objectives_items, id, name, complete):
    new_objective = {"id": id, "name": name, "complete": complete == 'True'}
    objectives_items.append(new_objective)
    return objectives_items

def add_target(targets_items, name, x, y, collisionType, collisiontext):
    new_target = {"name": name, "x": int(x), "y": int(y), "collisionType": collisionType, "collisiontext": collisiontext}
    targets_items.append(new_target)
    return targets_items