… | |
… | |
270 | }; |
270 | }; |
271 | |
271 | |
272 | struct object : zero_initialised, object_copy |
272 | struct object : zero_initialised, object_copy |
273 | { |
273 | { |
274 | // These variables are not changed by ->copy_to |
274 | // These variables are not changed by ->copy_to |
275 | maptile_ptr ACC (RW, map); /* Pointer to the map in which this object is present */ |
275 | maptile *ACC (RW, map); /* Pointer to the map in which this object is present */ |
276 | |
276 | |
277 | UUID ACC (RW, uuid); // Unique Identifier, survives saves etc. |
277 | UUID ACC (RW, uuid); // Unique Identifier, survives saves etc. |
278 | int ACC (RO, count); |
278 | int ACC (RO, count); |
279 | object_vector_index ACC (RO, index); // index into objects |
279 | object_vector_index ACC (RO, index); // index into objects |
280 | object_vector_index ACC (RO, active); // index into actives |
280 | object_vector_index ACC (RO, active); // index into actives |
… | |
… | |
441 | * 1000 |
441 | * 1000 |
442 | * (type == CONTAINER ? 1000 : 1) |
442 | * (type == CONTAINER ? 1000 : 1) |
443 | / dominant_material ()->density; |
443 | / dominant_material ()->density; |
444 | } |
444 | } |
445 | |
445 | |
|
|
446 | MTH bool is_wiz () const { return flag [FLAG_WIZ]; } |
446 | MTH bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; } |
447 | MTH bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; } |
447 | MTH bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET |
448 | MTH bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET |
448 | || type == CLOAK || type == BOOTS || type == GLOVES |
449 | || type == CLOAK || type == BOOTS || type == GLOVES |
449 | || type == BRACERS || type == GIRDLE; } |
450 | || type == BRACERS || type == GIRDLE; } |
450 | MTH bool is_alive () const { return (type == PLAYER |
451 | MTH bool is_alive () const { return (type == PLAYER |