summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3ba90789a..19c4707de 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -111,6 +111,20 @@ struct TextDestNodeMetadata : public TextDest
Client *m_client;
};
+struct TextDestPlayerInventory : public TextDest
+{
+ TextDestPlayerInventory(Client *client)
+ {
+ m_client = client;
+ }
+ void gotText(std::map<std::string, std::string> fields)
+ {
+ m_client->sendInventoryFields("", fields);
+ }
+
+ Client *m_client;
+};
+
/* Respawn menu callback */
class MainRespawnInitiator: public IRespawnInitiator
@@ -1507,6 +1521,7 @@ void the_game(
assert(src);
menu->setFormSpec(src->getForm(), inventoryloc);
menu->setFormSource(src);
+ menu->setTextDest(new TextDestPlayerInventory(&client));
menu->drop();
}
else if(input->wasKeyDown(EscapeKey))