add aliases for $arrow command

This commit is contained in:
Martin Michelsen
2025-04-21 19:48:22 -07:00
parent afa23f03c7
commit ebef2f2bd1
2 changed files with 28 additions and 2 deletions
+27 -1
View File
@@ -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);
}