forked from github/server
recycle quota is always 0.5 in every game, no reason to toch this.
This commit is contained in:
parent
927ada92b6
commit
54a3c2e070
|
@ -75,6 +75,7 @@ static void json_requirements(cJSON *json, requirement **matp) {
|
|||
requirement *mat = calloc(sizeof(requirement), 1+cJSON_GetArraySize(json));
|
||||
for (i=0,child=json->child;child;child=child->next,++i) {
|
||||
mat[i].number = child->valueint;
|
||||
mat[i].recycle = 0.5f;
|
||||
mat[i].rtype = rt_get_or_create(child->string);
|
||||
}
|
||||
*matp = mat;
|
||||
|
|
|
@ -204,6 +204,7 @@ static void test_buildings(CuTest * tc)
|
|||
CuAssertPtrNotNull(tc, bt->construction);
|
||||
CuAssertPtrNotNull(tc, bt->construction->materials);
|
||||
CuAssertIntEquals(tc, 2, bt->construction->materials[0].number);
|
||||
CuAssertDblEquals(tc, 0.5f, bt->construction->materials[0].recycle, 0.0f);
|
||||
CuAssertPtrEquals(tc, (void *)get_resourcetype(R_STONE), (void *)bt->construction->materials[0].rtype);
|
||||
CuAssertIntEquals(tc, 1, bt->construction->materials[1].number);
|
||||
CuAssertPtrEquals(tc, (void *)get_resourcetype(R_IRON), (void *)bt->construction->materials[1].rtype);
|
||||
|
|
Loading…
Reference in New Issue