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

Method GetDisplayName

engine/Poseidon/World/Scene/Object.cpp:64–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64RString Object::GetDisplayName() const
65{
66 static RString empty;
67 if (!_shape)
68 {
69 return empty;
70 }
71 MapType type = _shape->GetMapType();
72 switch (type)
73 {
74 case MapTree:
75 case MapSmallTree:
76 return LocalizeString(IDS_DN_TREE);
77 case MapBush:
78 return LocalizeString(IDS_DN_BUSH);
79 case MapBuilding:
80 return LocalizeString(IDS_DN_BUILDING);
81 case MapHouse:
82 return LocalizeString(IDS_DN_HOUSE);
83 case MapForestBorder:
84 case MapForestTriangle:
85 case MapForestSquare:
86 return LocalizeString(IDS_DN_FOREST);
87 case MapChurch:
88 return LocalizeString(IDS_DN_CHURCH);
89 case MapChapel:
90 return LocalizeString(IDS_DN_CHAPEL);
91 case MapCross:
92 return LocalizeString(IDS_DN_CROSS);
93 case MapRock:
94 return LocalizeString(IDS_DN_ROCK);
95 case MapBusStop:
96 return LocalizeString(IDS_DN_BUS_STOP);
97 // ignored maptypes
98 // MapFountain,
99 // MapFence, MapWall,
100 // vehicle should handle some types
101 case MapBunker:
102 case MapFortress:
103 case MapViewTower:
104 case MapLighthouse:
105 case MapQuay:
106 case MapFuelstation:
107 case MapHospital:
108 LOG_DEBUG(Graphics, "{}: This should be handled by VehicleType", (const char*)GetDebugName());
109 default:
110 return empty;
111 }
112}
113
114RString Object::GetNameSound() const
115{

Callers 5

showFolderDialogFunction · 0.45
WhatAttackResultMethod · 0.45
WhatFireResultMethod · 0.45
AttachMethod · 0.45

Calls 2

LocalizeStringFunction · 0.85
GetMapTypeMethod · 0.80

Tested by

no test coverage detected