227 |
public: |
public: |
228 |
Item(const char *kind); |
Item(const char *kind); |
229 |
|
|
230 |
|
// |
231 |
// Item interface |
// Item interface |
232 |
virtual px::V3 get_force(Actor *a) |
// |
|
{ return px::V3(); } |
|
233 |
|
|
234 |
virtual void on_drop(Actor *a) {} |
virtual px::V3 get_force(Actor *a); |
|
virtual void on_pickup(Actor *a) {} |
|
235 |
|
|
236 |
virtual void stone_change(Stone *st) {} |
virtual void on_drop(Actor *a); |
237 |
|
virtual void on_pickup(Actor *a); |
238 |
|
|
239 |
|
virtual void stone_change(Stone *st); |
240 |
|
|
241 |
|
// Called when item is ``hit'' by a moving stone. |
242 |
|
virtual void on_stonehit(Stone *st); |
243 |
|
|
244 |
// Return true if the item should be picked up. |
// Return true if the item should be picked up. |
245 |
virtual bool actor_hit(Actor *a); |
virtual bool actor_hit(Actor *a); |
248 |
virtual string get_inventory_model(); |
virtual string get_inventory_model(); |
249 |
|
|
250 |
// Item is activated by the player |
// Item is activated by the player |
251 |
virtual ItemAction activate(Actor* a, GridPos p) |
virtual ItemAction activate(Actor* a, GridPos p); |
|
{ return ITEM_DROP; } |
|
252 |
}; |
}; |
253 |
} |
} |
254 |
|
|