示例#1
0
def read_resource_requirement(
        data: Dict,
        resource_database: ResourceDatabase) -> ResourceRequirement:
    data = data["data"]
    return ResourceRequirement.with_data(resource_database,
                                         ResourceType.from_str(data["type"]),
                                         data["name"], data["amount"],
                                         data["negate"])
 def mk_req(name: str):
     return ResourceRequirement.with_data(echoes_resource_database,
                                          ResourceType.ITEM, name, 1, False)