summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Root.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 1eca73cb2..09c91bc72 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -1006,3 +1006,33 @@ int cRoot::GetFurnaceFuelBurnTime(const cItem & a_Fuel)
cFurnaceRecipe * FR = Get()->GetFurnaceRecipe();
return FR->GetBurnTime(a_Fuel);
}
+
+
+
+
+
+AStringVector cRoot::GetPlayerTabCompletionMultiWorld(const AString & a_Text)
+{
+ AStringVector Results;
+ class cWorldCallback : public cWorldListCallback
+ {
+ public:
+ cWorldCallback(AStringVector & a_Results, const AString & a_Search) :
+ m_Results(a_Results),
+ m_Search(a_Search)
+ {
+ }
+
+ virtual bool Item(cWorld * a_World) override
+ {
+ a_World->TabCompleteUserName(m_Search, m_Results);
+ return true;
+ }
+ private:
+ AStringVector & m_Results;
+ const AString & m_Search;
+ } WC(Results, a_Text);
+
+ Get()->ForEachWorld(WC);
+ return Results;
+}