MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetTypeName

Method GetTypeName

engine/Evaluator/express.cpp:3148–3184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3146}
3147
3148RString GameState::GetTypeName(GameType type) const
3149{
3150 // GameVoid is static type
3151 if (type == GameVoid)
3152 {
3153 return DefaultInfoFunctions()->GetTypeName(GameVoid);
3154 }
3155 if (type == GameAny)
3156 {
3157 return DefaultInfoFunctions()->GetTypeName(GameVoid);
3158 }
3159 if (type == GameNothing)
3160 {
3161 return DefaultInfoFunctions()->GetTypeName(GameNothing);
3162 }
3163
3164 RString ret = "";
3165 if ((type & GameAny) == GameAny)
3166 {
3167 CatType(ret, DefaultInfoFunctions()->GetTypeName(GameVoid));
3168 type &= ~GameAny;
3169 }
3170 if ((type & GameVoid) == GameVoid)
3171 {
3172 CatType(ret, DefaultInfoFunctions()->GetTypeName(GameVoid));
3173 type &= ~GameVoid;
3174 }
3175 for (int i = 0; i < _typeNames.Size(); i++)
3176 {
3177 if (type & (_typeNames[i].value))
3178 {
3179 CatType(ret, _typeNames[i].typeName);
3180 }
3181 }
3182
3183 return ret;
3184}
3185
3186GameValue GameState::CreateGameValue(GameType type) const
3187{

Callers 6

GetDebugTextMethod · 0.45
InitMethod · 0.45
EvaluateExpressionMethod · 0.45

Calls 2

CatTypeFunction · 0.70
SizeMethod · 0.45

Tested by

no test coverage detected