add get/setProfileInformation() to modify profile information field#7511
add get/setProfileInformation() to modify profile information field#7511vadi2 merged 3 commits intoMudlet:developmentfrom
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
Great PR 👍 |
| int TLuaInterpreter::setProfileInformation(lua_State* L) | ||
| { | ||
| Host& host = getHostFromLua(L); | ||
| const QString text = getVerifiedString(L, __func__, 1, "text"); |
There was a problem hiding this comment.
💡 Might it be worth also accepting a nilas the argument - so that calling setProfileInformation() without ANY argument also does the clearing operation?
There was a problem hiding this comment.
added, also added that it revert to the default text immediately if nil or empty string supplied
There was a problem hiding this comment.
ok, I can add that
but setProfileInformation should only accept a string then and not the nil, correct?
There was a problem hiding this comment.
ℹ️ There are 12 clear...(...) functions AND 8 reset...(...) ones but it is not so easy to determine how many of the 103 set...(...) functions might have a clear/reset functionality...
There was a problem hiding this comment.
implemented clearProfileInformation() function
setProfileInformation() now only accepts a string, return nil and error message if string is empty
updated Area 51
Brief overview of PR changes/additions
getProfileInformation()andsetProfileInformation(string)functions to Lua to read/write to the profile information displayed on the profile connection window.setProfileInformation("")) also reverts to default game information.Motivation for adding to Mudlet
Gives the ability to add profile specific information via the Lua API which can then be seen on the profile connection window.
Other info (issues closed, discussion etc)
closes #5333