1 | /* |
1 | /* |
2 | * CrossFire, A Multiplayer game for X-windows |
2 | * CrossFire, A Multiplayer game |
3 | * |
3 | * |
4 | * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
5 | * Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (C) 1992 Frank Tore Johansen |
6 | * Copyright (C) 1992 Frank Tore Johansen |
7 | * |
7 | * |
… | |
… | |
351 | #endif |
351 | #endif |
352 | |
352 | |
353 | if (!op->parse_kv (f)) |
353 | if (!op->parse_kv (f)) |
354 | goto fail; |
354 | goto fail; |
355 | |
355 | |
|
|
356 | op->post_load_check (); |
|
|
357 | |
356 | parts.push_back (std::make_pair (at, op)); |
358 | parts.push_back (std::make_pair (at, op)); |
357 | |
359 | |
358 | if (f.kw != KW_more) |
360 | if (f.kw != KW_more) |
359 | break; |
361 | break; |
360 | |
362 | |
… | |
… | |
526 | } |
528 | } |
527 | |
529 | |
528 | archetype * |
530 | archetype * |
529 | archetype::get (const char *name) |
531 | archetype::get (const char *name) |
530 | { |
532 | { |
|
|
533 | if (!name) |
|
|
534 | { |
|
|
535 | LOG (llevError, "null archetype requested\n"); |
|
|
536 | name = "(null)"; |
|
|
537 | } |
|
|
538 | |
531 | archetype *at = find (name); |
539 | archetype *at = find (name); |
532 | |
540 | |
533 | if (!at) |
541 | if (!at) |
534 | { |
542 | { |
535 | archetypes.push_back (at = new archetype); |
543 | archetypes.push_back (at = new archetype); |