Room and lobby chat, /host, /fashion, player-colored lines, context tips, and American spelling
- Chat goes to your room (the sandbox, or your game) by default, and to the whole lobby with /all or a leading !. Lines from elsewhere say where they came from ([Sandbox], [Game 2]), lobby-wide ones from your room say [All]. Typing shows only to your room. Protocol 8. - Hosting: everyone is told who hosts now, and the host can hand it over with /host "player". - /fashion <item> wears a fashion locally, like /color. - Lines that mention a player show in that player's color, looked up as they draw. - Tips are tagged with the item and situations they fit, and those that fit are 1.5x as likely. They turn over every 10 seconds on one continuous run, show under the menu too, and can be turned off with Tips in HUD / Gameplay. The HUD hotbars hide while the menu is up (except on its item tabs). - American spelling throughout: color, center, gray, mustache, and so on.
This commit is contained in:
1 parent
f4e7784f3c
commit
93cdf46d5a
38 files changed
+603
-325
No files matched your search
@@ -17,6 +17,13 @@ enum NetState
|
||||
|
||||
// Someone in the lobby (this screen's player too): their server id and name, and their connection's round trip to the
|
||||
// server in milliseconds (-1 while it isn't known: this screen only measures its own).
|
||||
// A line for the chat log from the server, and the member it's about (-1 for none), in whose color it shows.
|
||||
struct NetNotice
|
||||
{
|
||||
std::string text;
|
||||
int member = -1;
|
||||
};
|
||||
|
||||
struct NetMember
|
||||
{
|
||||
int id = -1;
|
||||
@@ -45,6 +52,7 @@ public:
|
||||
void heartbeat();
|
||||
void send(const std::string& bytes, Delivery delivery);
|
||||
void kick_send(int member, const std::string& reason);
|
||||
void host_send(int member);
|
||||
bool is_linked();
|
||||
|
||||
NetState state = NET_OFFLINE;
|
||||
@@ -56,7 +64,7 @@ public:
|
||||
// Binary messages from the server, oldest first, for the session to take.
|
||||
std::vector<std::string> packets;
|
||||
// Lines for the chat log from the server (like this screen being kicked), oldest first, for the chat to take.
|
||||
std::vector<std::string> notices;
|
||||
std::vector<NetNotice> notices;
|
||||
// Members the server said were kicked, with the reason (empty for none given).
|
||||
std::map<int, std::string> kicks;
|
||||
|
||||
@@ -71,4 +79,5 @@ private:
|
||||
void link_open();
|
||||
void signal_handle(const std::string& payload);
|
||||
NetMember* member_get(int id);
|
||||
void host_announce(int previous);
|
||||
};
|
||||
Reference in new issue
Block a user