Class TooltipManagerServer
Handles constructing tooltips from a set of tooltip parts for controllers, using caching to prevent duplicate
queries, and error detection to detect non-dirted parts, etc. See Tooltip.md for a full description.
Inheritance
System.Object
TooltipManagerServer
Assembly: Eco.Gameplay.dll
[ChatCommandHandler]
public class TooltipManagerServer : Singleton<TooltipManagerServer>, IController, IViewController, IHasUniversalID
Constructors
Using reflection in default constructor to find all the members tagged with the NewTooltipAttribute and register them for the types that they apply to.
Declaration
public TooltipManagerServer()
Declaration
public TooltipManagerServer(IEnumerable<Type> controllerClasses, IEnumerable<Type> tooltipLibraries)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
controllerClasses |
Represents collection of classes that derived from IController. This collection will be scanned for tooltip parts to register.
|
System.Collections.Generic.IEnumerable<System.Type> |
tooltipLibraries |
Represents collection of tooltip libraries (classes with 'TooltipLibrary' attribute). This collection will be scanned for tooltip parts to register.
|
Fields
Number of seconds between scans of tooltip cache taht remove entries that reference objects that were already garbage collected.
Declaration
public static readonly double CacheCleanupRate
Field Value
Type |
Description |
System.Double |
|
Number of seconds between applying cache updates from Eco.Gameplay.Systems.NewTooltip.TooltipSubscriptions.queuedDirty.
Declaration
public const float CacheRefreshRate = 5F
Field Value
Type |
Description |
System.Single |
|
Properties
Declaration
public Dictionary<Type, List<TooltipPart>> ClientTypeToParts { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<TooltipPart>> |
|
Declaration
public Dictionary<Type, List<TooltipChildrenPart>> ClientTypeToTooltipChildren { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<TooltipChildrenPart>> |
|
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public Dictionary<(Type, string), TooltipPartBase> NameToPart { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.ValueTuple<System.Type, System.String>, TooltipPartBase> |
|
Declaration
public Dictionary<Type, List<TooltipChildrenPart>> TypeToChildrenParts { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<TooltipChildrenPart>> |
|
Declaration
public Dictionary<Type, List<TooltipPart>> TypeToParts { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<TooltipPart>> |
|
Methods
Removes all cached data in ourselves and children support classes.
Declaration
Declaration
public TooltipServerResponse GetTooltipParts(User user, TooltipServerRequest request, TooltipOrigin origin, TTCat exclusions)
Parameters
Returns
Returns tooltip parts for controller referenced by passed link. May be used for late bounded links for objects which isn't persistent or doesn't have serialized universal ID.
When requested returns TooltipServerResponse with all necessary information for tooltip rendering and caching on client side.
Client then will have resolved Universal ID and type info for that link id and will use GetTooltipParts(User, TooltipServerRequest, TooltipOrigin, TTCat) for further requests using link id only for initial tooltip content request.
Declaration
public BSONObject GetTooltipPartsByLinkId(Player player, string linkId, TooltipOrigin origin, TTCat exclusions)
Parameters
Returns
Declaration
Declaration
public static Task PrepareCache()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Events
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
Extension Methods