… | |
… | |
384 | return nrof ? nrof : 1; |
384 | return nrof ? nrof : 1; |
385 | } |
385 | } |
386 | |
386 | |
387 | uint64 total_weight () const |
387 | uint64 total_weight () const |
388 | { |
388 | { |
389 | return weight * number_of (); |
389 | return weight * number_of () + carrying; |
390 | } |
390 | } |
391 | |
391 | |
392 | // return the dominant material of this item, always return something |
392 | // return the dominant material of this item, always return something |
393 | const materialtype_t *dominant_material () const; |
393 | const materialtype_t *dominant_material () const; |
394 | |
394 | |
… | |
… | |
592 | */ |
592 | */ |
593 | |
593 | |
594 | INTERFACE_CLASS (archetype) |
594 | INTERFACE_CLASS (archetype) |
595 | struct archetype : object |
595 | struct archetype : object |
596 | { |
596 | { |
597 | static archetype *empty; // the empty_archetype |
597 | static arch_ptr empty; // the empty_archetype |
|
|
598 | MTH static void gc (); |
598 | |
599 | |
599 | archetype (const char *name); |
600 | archetype (const char *name); |
600 | ~archetype (); |
601 | ~archetype (); |
601 | void gather_callbacks (AV *&callbacks, event_type event) const; |
602 | void gather_callbacks (AV *&callbacks, event_type event) const; |
602 | |
603 | |