| 639 | } |
| 640 | |
| 641 | MpGameMode NetworkManager::StringToGameMode(StringView value) |
| 642 | { |
| 643 | auto gameModeString = StringUtils::lowercase(value); |
| 644 | if (gameModeString == "battle"sv || gameModeString == "b"sv) { |
| 645 | return MpGameMode::Battle; |
| 646 | } else if (gameModeString == "teambattle"_s || gameModeString == "tb"_s) { |
| 647 | return MpGameMode::TeamBattle; |
| 648 | } else if (gameModeString == "race"_s || gameModeString == "r"_s) { |
| 649 | return MpGameMode::Race; |
| 650 | } else if (gameModeString == "teamrace"_s || gameModeString == "tr"_s) { |
| 651 | return MpGameMode::TeamRace; |
| 652 | } else if (gameModeString == "treasurehunt"_s || gameModeString == "th"_s) { |
| 653 | return MpGameMode::TreasureHunt; |
| 654 | } else if (gameModeString == "teamtreasurehunt"_s || gameModeString == "tth"_s) { |
| 655 | return MpGameMode::TeamTreasureHunt; |
| 656 | } else if (gameModeString == "capturetheflag"_s || gameModeString == "ctf"_s) { |
| 657 | return MpGameMode::CaptureTheFlag; |
| 658 | } else if (gameModeString == "cooperation"_s || gameModeString == "coop"_s || gameModeString == "c"_s) { |
| 659 | return MpGameMode::Cooperation; |
| 660 | } else { |
| 661 | return MpGameMode::Unknown; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | String NetworkManager::UuidToString(StaticArrayView<Uuid::Size, Uuid::Type> uuid) |
| 666 | { |
nothing calls this directly
no test coverage detected