… | |
… | |
1430 | * the only place this is not set is when saving the player. |
1430 | * the only place this is not set is when saving the player. |
1431 | */ |
1431 | */ |
1432 | bool |
1432 | bool |
1433 | object::write (object_freezer &f) |
1433 | object::write (object_freezer &f) |
1434 | { |
1434 | { |
1435 | archetype *at = arch ? arch : archetype::empty; |
1435 | if (is_arch ()) |
1436 | |
1436 | { |
|
|
1437 | f.put (KW_object, arch->archname); |
|
|
1438 | write_diff (f, this, archetype::empty); |
|
|
1439 | } |
|
|
1440 | else |
|
|
1441 | { |
1437 | f.put (KW_arch, at->archname); |
1442 | f.put (KW_arch, arch->archname); |
1438 | write_diff (f, this, at); |
1443 | write_diff (f, this, arch); |
|
|
1444 | } |
1439 | |
1445 | |
1440 | for (object *tmp = inv; tmp; tmp = tmp->below) |
1446 | for (object *tmp = inv; tmp; tmp = tmp->below) |
1441 | tmp->write (f); |
1447 | tmp->write (f); |
1442 | |
1448 | |
1443 | f.put (this); |
1449 | f.put (this); |