MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getName

Method getName

src/Savegame/Ufo.cpp:253–270  ·  view source on GitHub ↗

* Returns the UFO's unique identifying name. * @param lang Language to get strings from. * @return Full name. */

Source from the content-addressed store, hash-verified

251 * @return Full name.
252 */
253std::wstring Ufo::getName(Language *lang) const
254{
255 switch (_status)
256 {
257 case FLYING:
258 case DESTROYED: // Destroyed also means leaving Earth.
259 return lang->getString("STR_UFO_").arg(_id);
260 break;
261 case LANDED:
262 return lang->getString("STR_LANDING_SITE_").arg(_landId);
263 break;
264 case CRASHED:
265 return lang->getString("STR_CRASH_SITE_").arg(_crashId);
266 break;
267 default:
268 return L"";
269 }
270}
271
272/**
273 * Returns the amount of damage this UFO has taken.

Callers 15

loadMapResourcesMethod · 0.45
saveMethod · 0.45
saveMethod · 0.45
saveMethod · 0.45
ufoReachedWaypointMethod · 0.45
generateMapMethod · 0.45
loadMAPMethod · 0.45
loadRMPMethod · 0.45
initMethod · 0.45
invClickMethod · 0.45
BriefingStateMethod · 0.45
btnOkClickMethod · 0.45

Calls 2

argMethod · 0.60
getStringMethod · 0.45

Tested by 3

ResearchCompleteStateMethod · 0.36
btnReportClickMethod · 0.36