27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
namespace PlotLine.Services;
|
|
|
|
// Opt-in mapping; existing Location/Context consumers keep their current presentation.
|
|
public static class LocationWorkspaceIcons
|
|
{
|
|
public static (string Icon, string Tone) Type(string? name) => name?.ToLowerInvariant() switch
|
|
{
|
|
"country" or "planet" => ("location-globe", "info"),
|
|
"region" or "district" => ("maps", "success"),
|
|
"town" or "city" or "village" => ("location-city", "primary"),
|
|
"street" => ("location-street", "warning"),
|
|
"building" => ("location-house", "primary"),
|
|
"floor" => ("location-level", "info"),
|
|
"room" => ("location-door", "data-5"),
|
|
"outdoor area" => ("location-tree", "success"),
|
|
"vehicle interior" => ("location-vehicle", "warning"),
|
|
"landmark" or "natural feature" => ("location-mountain", "success"),
|
|
"other" => ("locations", "secondary"),
|
|
_ => ("help", "secondary")
|
|
};
|
|
public static object Presentation(string value, string name)
|
|
{
|
|
var (icon, tone) = Type(name);
|
|
return CharacterQuickAttributes.Presentation(new(value, name, icon, tone));
|
|
}
|
|
}
|