… | |
… | |
976 | object::read (object_thawer &f, maptile *map) |
976 | object::read (object_thawer &f, maptile *map) |
977 | { |
977 | { |
978 | assert (f.kw == KW_arch); |
978 | assert (f.kw == KW_arch); |
979 | |
979 | |
980 | archetype *arch = archetype::find (f.get_str ()); |
980 | archetype *arch = archetype::find (f.get_str ()); |
|
|
981 | |
|
|
982 | if (!arch) |
|
|
983 | { |
|
|
984 | LOG (llevError, "object refering to nonexistant archetype '%s'.\n", f.get_str ()); |
|
|
985 | arch = archetype::find ("earthwall"); |
|
|
986 | } |
|
|
987 | |
981 | assert (arch); //D maybe use exception handling of sorts? |
988 | assert (arch); //D maybe use exception handling of sorts? |
982 | |
989 | |
983 | object *op = object::create (); |
990 | object *op = object::create (); |
984 | |
991 | |
985 | op->map = map; |
992 | op->map = map; |