… | |
… | |
110 | size_t i; |
110 | size_t i; |
111 | int result = 1; |
111 | int result = 1; |
112 | |
112 | |
113 | for (i = 0; i < rp->arch_names; i++) |
113 | for (i = 0; i < rp->arch_names; i++) |
114 | { |
114 | { |
115 | if (archetype::find (rp->arch_name[i]) != NULL) |
115 | if (archetype::find (rp->arch_name[i])) |
116 | { |
116 | { |
117 | artifact *art = locate_recipe_artifact (rp, i); |
117 | artifact *art = locate_recipe_artifact (rp, i); |
118 | |
118 | |
119 | if (!art && strcmp (rp->title, "NONE") != 0) |
119 | if (!art && rp->title != shstr_NONE) |
120 | { |
120 | { |
121 | LOG (llevError, "WARNING: Formula %s of %s has no artifact.\n", rp->arch_name[i], &rp->title); |
121 | LOG (llevError, "WARNING: Formula %s of %s has no artifact.\n", rp->arch_name[i], &rp->title); |
122 | result = 0; |
122 | result = 0; |
123 | } |
123 | } |
124 | } |
124 | } |
… | |
… | |
376 | part1[cp - name] = '\0'; |
376 | part1[cp - name] = '\0'; |
377 | strcpy (part2, cp + 4); |
377 | strcpy (part2, cp + 4); |
378 | |
378 | |
379 | /* find the first archetype matching the first part of the name */ |
379 | /* find the first archetype matching the first part of the name */ |
380 | for_all_archetypes (at) |
380 | for_all_archetypes (at) |
381 | if (!strcasecmp (at->object::name, part1) && at->title == NULL) |
381 | if (at->object::name.eq_nc (part1) && !at->title) |
382 | { |
382 | { |
383 | /* find the first artifact derived from that archetype (same type) */ |
383 | /* find the first artifact derived from that archetype (same type) */ |
384 | for (al = first_artifactlist; al; al = al->next) |
384 | for (al = first_artifactlist; al; al = al->next) |
385 | if (al->type == at->type) |
385 | if (al->type == at->type) |
386 | { |
386 | { |
… | |
… | |
398 | strcpy (part1, name); |
398 | strcpy (part1, name); |
399 | part1[cp - name] = '\0'; |
399 | part1[cp - name] = '\0'; |
400 | strcpy (part2, cp + 3); |
400 | strcpy (part2, cp + 3); |
401 | /* examine all archetypes matching the first part of the name */ |
401 | /* examine all archetypes matching the first part of the name */ |
402 | for_all_archetypes (at) |
402 | for_all_archetypes (at) |
403 | if (!strcasecmp (at->object::name, part1) && at->title == NULL) |
403 | if (at->object::name.eq_nc (part1) && !at->title) |
404 | { |
404 | { |
405 | if (at->randomitems) |
405 | if (at->randomitems) |
406 | { |
406 | { |
407 | at2 = find_treasure_by_name (at->randomitems->items, part2, 0); |
407 | at2 = find_treasure_by_name (at->randomitems->items, part2, 0); |
408 | if (at2) |
408 | if (at2) |