GameConfigIdea / jsconfig_idea_support.py
kwabs22
Some changes and flie splitting
a69d738
raw
history blame
971 Bytes
#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