… | |
… | |
165 | flags_t flag; /* various flags */ |
165 | flags_t flag; /* various flags */ |
166 | #if FOR_PERL |
166 | #if FOR_PERL |
167 | bool ACC (RW, flag[NUM_FLAGS]); |
167 | bool ACC (RW, flag[NUM_FLAGS]); |
168 | #endif |
168 | #endif |
169 | |
169 | |
170 | shstr ACC (RW, materialname); /* specific material name */ |
170 | materialtype_t *material; // What material this object consists of //TODO, make perl-accessible |
171 | shstr ACC (RW, skill); /* Name of the skill this object uses/grants */ |
171 | shstr ACC (RW, skill); /* Name of the skill this object uses/grants */ |
172 | // materialtype_t *ACC (RW, material); /* What material this object consists of */ |
|
|
173 | object_ptr ACC (RW, owner); /* Pointer to the object which controls this one */ |
172 | object_ptr ACC (RW, owner); /* Pointer to the object which controls this one */ |
174 | object_ptr ACC (RW, enemy); /* Monster/player to follow even if not closest */ |
173 | object_ptr ACC (RW, enemy); /* Monster/player to follow even if not closest */ |
175 | object_ptr ACC (RW, attacked_by); /* This object start to attack us! only player & monster */ |
174 | object_ptr ACC (RW, attacked_by); /* This object start to attack us! only player & monster */ |
176 | object_ptr ACC (RW, chosen_skill); /* the skill chosen to use */ |
175 | object_ptr ACC (RW, chosen_skill); /* the skill chosen to use */ |
177 | object_ptr ACC (RW, spellitem); /* Spell ability monster is choosing to use */ |
176 | object_ptr ACC (RW, spellitem); /* Spell ability monster is choosing to use */ |
… | |
… | |
489 | } |
488 | } |
490 | |
489 | |
491 | MTH void update_weight (); |
490 | MTH void update_weight (); |
492 | |
491 | |
493 | // return the dominant material of this item, always return something |
492 | // return the dominant material of this item, always return something |
494 | const materialtype_t *dominant_material () const; |
493 | const materialtype_t *dominant_material () const |
|
|
494 | { |
|
|
495 | return material; |
|
|
496 | } |
495 | |
497 | |
496 | // return the volume of this object in cm³ |
498 | // return the volume of this object in cm³ |
497 | MTH uint64 volume () const |
499 | MTH uint64 volume () const |
498 | { |
500 | { |
499 | return (uint64)total_weight () |
501 | return (uint64)total_weight () |