MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / get_actor_display_name

Function get_actor_display_name

PythonAPI/examples/no_rendering_mode.py:157–159  ·  view source on GitHub ↗
(actor, truncate=250)

Source from the content-addressed store, hash-verified

155
156
157def get_actor_display_name(actor, truncate=250):
158 name = ' '.join(actor.type_id.replace('_', '.').title().split('.')[1:])
159 return (name[:truncate - 1] + u'\u2026') if len(name) > truncate else name
160
161
162class Util(object):

Callers 2

update_hud_infoMethod · 0.70
_show_nearby_vehiclesMethod · 0.70

Calls 1

titleMethod · 0.45

Tested by

no test coverage detected