1 | |
|
|
2 | |
|
|
3 | /* Basic stuff for use with the alchemy code. Clearly some of this stuff |
1 | /* Basic stuff for use with the alchemy code. Clearly some of this stuff |
4 | * could go into server/alchemy, but I left it here just in case it proves |
2 | * could go into server/alchemy, but I left it here just in case it proves |
5 | * more generally useful. |
3 | * more generally useful. |
6 | * |
4 | * |
7 | * Nov 1995 - file created by b.t. thomas@astro.psu.edu |
5 | * Nov 1995 - file created by b.t. thomas@astro.psu.edu |
… | |
… | |
89 | int result; |
87 | int result; |
90 | |
88 | |
91 | result = 1; |
89 | result = 1; |
92 | for (i = 0; i < rp->arch_names; i++) |
90 | for (i = 0; i < rp->arch_names; i++) |
93 | { |
91 | { |
94 | if (find_archetype (rp->arch_name[i]) != NULL) |
92 | if (archetype::find (rp->arch_name[i]) != NULL) |
95 | { |
93 | { |
96 | artifact *art = locate_recipe_artifact (rp, i); |
94 | artifact *art = locate_recipe_artifact (rp, i); |
97 | |
95 | |
98 | if (!art && strcmp (rp->title, "NONE") != 0) |
96 | if (!art && strcmp (rp->title, "NONE") != 0) |
99 | { |
97 | { |
… | |
… | |
299 | |
297 | |
300 | for (i = 0; i < formula->arch_names; i++) |
298 | for (i = 0; i < formula->arch_names; i++) |
301 | { |
299 | { |
302 | const char *string = formula->arch_name[i]; |
300 | const char *string = formula->arch_name[i]; |
303 | |
301 | |
304 | if (find_archetype (string) != NULL) |
302 | if (archetype::find (string) != NULL) |
305 | { |
303 | { |
306 | art = locate_recipe_artifact (formula, i); |
304 | art = locate_recipe_artifact (formula, i); |
307 | if (!art && strcmp (formula->title, "NONE")) |
305 | if (!art && strcmp (formula->title, "NONE")) |
308 | LOG (llevError, "Formula %s has no artifact\n", &formula->title); |
306 | LOG (llevError, "Formula %s has no artifact\n", &formula->title); |
309 | else |
307 | else |
… | |
… | |
506 | |
504 | |
507 | for (i = 0; i < formula->arch_names; i++) |
505 | for (i = 0; i < formula->arch_names; i++) |
508 | { |
506 | { |
509 | const char *string = formula->arch_name[i]; |
507 | const char *string = formula->arch_name[i]; |
510 | |
508 | |
511 | if ((at = find_archetype (string)) != NULL) |
509 | if ((at = archetype::find (string)) != NULL) |
512 | { |
510 | { |
513 | art = locate_recipe_artifact (formula, i); |
511 | art = locate_recipe_artifact (formula, i); |
514 | if (!art && strcmp (formula->title, "NONE")) |
512 | if (!art && strcmp (formula->title, "NONE")) |
515 | LOG (llevError, "Formula %s has no artifact\n", &formula->title); |
513 | LOG (llevError, "Formula %s has no artifact\n", &formula->title); |
516 | else |
514 | else |