From 0b10f0318b9f9ab308f04712698aa104bec21e29 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 17 Feb 2011 20:32:49 -0800 Subject: Specific messages for each pickup failure reason. Reviewed-by: Jaxad0127 Manaplus: fix code style and add some checks. --- src/localplayer.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/localplayer.h') diff --git a/src/localplayer.h b/src/localplayer.h index b9495b6ca..c7e6e7838 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -49,6 +49,21 @@ class AwayListener : public gcn::ActionListener void action(const gcn::ActionEvent &event); }; +/** + * Reasons an item can fail to be picked up. + */ +enum +{ + PICKUP_OKAY, + PICKUP_BAD_ITEM, + PICKUP_TOO_HEAVY, + PICKUP_TOO_FAR, + PICKUP_INV_FULL, + PICKUP_STACK_FULL, + PICKUP_DROP_STEAL +}; + + /** * The local player character. */ @@ -194,7 +209,8 @@ class LocalPlayer : public Being, public ActorSpriteListener, /** * Shows item pickup notifications. */ - void pickedUp(const ItemInfo &itemInfo, int amount); + void pickedUp(const ItemInfo &itemInfo, int amount, + unsigned char fail); int getLevel() const; -- cgit v1.2.3-60-g2f50