Requirement#
Game defines the following building requirement types:
Defining multiple requirements#
We will look into how we could define a requirement for a building draft to require built DSA headquarters.
Recommended method#
Or we could avoid nesting attributes under data and put it directly in the requirement object:
Deprecated method#
This is another, older way to define requirements which is deprecated:
{
"requirement": {
"requirements": [
{
"type": "BUILDING",
"data": {
"id": "dsahq",
"count": 1
}
}
]
}
}
The excessive nesting makes it less readable therefore the former method is recommended.