MCPcopy Create free account
hub / github.com/bwapi/bwapi / getCheatFlag

Function getCheatFlag

bwapi/BWAPI/Source/BW/CheatType.cpp:7–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace BW
6{
7 CheatFlags::Enum getCheatFlag(const std::string &str)
8 {
9 // Convert to lowercase in a new string
10 std::string name = Util::to_lower_copy(str);
11
12 // Get the cheat flag
13 if ( name == "black sheep wall" ) return CheatFlags::BlackSheepWall;
14 else if ( name == "breathe deep" ) return CheatFlags::BreatheDeep;
15 else if ( name == "food for thought" ) return CheatFlags::FoodForThought;
16 else if ( name == "game over man" ) return CheatFlags::GameOverMan;
17 else if ( name == "medieval man" ) return CheatFlags::MedievalMan;
18 else if ( name == "modify the phase variance" ) return CheatFlags::ModifyThePhaseVariance;
19 else if ( name == "noglues" ) return CheatFlags::NoGlues;
20 else if ( name == "operation cwal" ) return CheatFlags::OperationCwal;
21 else if ( name == "ophelia" ) return CheatFlags::Ophelia;
22 else if ( name == "power overwhelming" ) return CheatFlags::PowerOverwelming;
23 else if ( name == "show me the money" ) return CheatFlags::ShowMeTheMoney;
24 else if ( name == "something for nothing" ) return CheatFlags::SomethingForNothing;
25 else if ( name == "staying alive" ) return CheatFlags::StayingAlive;
26 else if ( name == "the gathering" ) return CheatFlags::TheGathering;
27 else if ( name == "there is no cow level" ) return CheatFlags::ThereIsNoCowLevel;
28 else if ( name == "war aint what it used to be" ) return CheatFlags::WarAintWhatItUsedToBe;
29 else if ( name == "whats mine is mine" ) return CheatFlags::WhatsMineIsMine;
30 else return CheatFlags::None;
31 }
32}

Callers 1

vSendTextExMethod · 0.85

Calls 1

to_lower_copyFunction · 0.85

Tested by

no test coverage detected