… | |
… | |
497 | |
497 | |
498 | // return the volume of this object in cm³ |
498 | // return the volume of this object in cm³ |
499 | MTH uint64 volume () const |
499 | MTH uint64 volume () const |
500 | { |
500 | { |
501 | return (uint64)total_weight () |
501 | return (uint64)total_weight () |
502 | * 1000 |
502 | * 1024 // 1000 actually |
503 | * (type == CONTAINER ? 1000 : 1) |
503 | * (type == CONTAINER ? 128 : 1) |
504 | / dominant_material ()->density; |
504 | / dominant_material ()->density; // ugh, division |
505 | } |
505 | } |
506 | |
506 | |
507 | MTH bool is_arch () const { return this == (const object *)(const archetype *)arch; } |
507 | MTH bool is_arch () const { return this == (const object *)(const archetype *)arch; } |
508 | |
508 | |
509 | MTH bool is_wiz () const { return flag [FLAG_WIZ]; } |
509 | MTH bool is_wiz () const { return flag [FLAG_WIZ]; } |