diff --git a/README.md b/README.md index 90b3c7b6..2edea95f 100644 --- a/README.md +++ b/README.md @@ -576,7 +576,7 @@ Some commands only work on the game server and not on the proxy server. The chat * `$auction` (Episode 3 only): Bring up the CARD Auction menu, regardless of how many players are in the game or if you have a VIP card. * Personal state commands - * `$arrow `: Change your lobby arrow color. + * `$arrow `: Change your lobby arrow color. The color may be specified by number (0-12) or by name (red, blue, green, yellow, purple, cyan, orange, pink, white, white2, white3, or black). * `$secid `: Set your override section ID. After running this command, any games you create will use your override section ID for rare drops instead of your character's actual section ID. If you're in a game and you are the leader of the game, this also immediately changes the item tables used by the server when creating items. To revert to your actual section id, run `$secid` with no name after it. On the proxy server, this will not work if the remote server controls item drops. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing. * `$rand `: Set your override random seed (specified as a 32-bit hex value). This will make any games you create use the given seed for rare enemies. This also makes item drops deterministic in Blue Burst games hosted by newserv. On the proxy server, this command can cause desyncs with other players in the same game, since they will not see the overridden random seed. To remove the override, run `$rand` with no arguments. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing. * `$ln [name-or-type]`: Set the lobby number. Visible only to you. This command exists because some non-lobby maps can be loaded as lobbies with invalid lobby numbers. See the "GC lobby types" and "Ep3 lobby types" entries in the information menu for acceptable values here. Note that non-lobby maps do not have a lobby counter, so there's no way to exit the lobby without using either `$ln` again or `$exit`. On the game server, `$ln` reloads the lobby immediately; on the proxy server, it doesn't take effect until you load another lobby yourself (which means you'll like have to use `$exit` to escape). Run this command with no argument to return to the default lobby. diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 3368e25d..9a5f49a4 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -244,7 +244,33 @@ ChatCommandDefinition cc_arrow( {"$arrow"}, +[](const ServerArgs& a) { auto l = a.c->require_lobby(); - a.c->lobby_arrow_color = stoull(a.text, nullptr, 0); + if (a.text == "red") { + a.c->lobby_arrow_color = 0x01; + } else if (a.text == "blue") { + a.c->lobby_arrow_color = 0x02; + } else if (a.text == "green") { + a.c->lobby_arrow_color = 0x03; + } else if (a.text == "yellow") { + a.c->lobby_arrow_color = 0x04; + } else if (a.text == "purple") { + a.c->lobby_arrow_color = 0x05; + } else if (a.text == "cyan") { + a.c->lobby_arrow_color = 0x06; + } else if (a.text == "orange") { + a.c->lobby_arrow_color = 0x07; + } else if (a.text == "pink") { + a.c->lobby_arrow_color = 0x08; + } else if (a.text == "white") { + a.c->lobby_arrow_color = 0x09; + } else if (a.text == "white2") { + a.c->lobby_arrow_color = 0x0A; + } else if (a.text == "white3") { + a.c->lobby_arrow_color = 0x0B; + } else if (a.text == "black") { + a.c->lobby_arrow_color = 0x0C; + } else { + a.c->lobby_arrow_color = stoull(a.text, nullptr, 0); + } if (!l->is_game()) { send_arrow_update(l); }