Beispiel #1
0
        public static void SetIcon(this BlueprintUnitFact fact, string iconAssetGuid)
        {
            var iconFact = Main.Library?.Get <BlueprintUnitFact>(iconAssetGuid);

            if (iconFact == null)
            {
                Main.Logger?.Error($"SetIcon: asset of type {typeof(BlueprintUnitFact).Name} with guid {iconAssetGuid} not found in library.");
                return;
            }
            fact.SetIcon(iconFact.Icon);
        }
Beispiel #2
0
 public static void SetNameDescriptionIcon(this BlueprintUnitFact feature, BlueprintUnitFact other)
 {
     SetNameDescription(feature, other);
     feature.SetIcon(other.Icon);
 }
Beispiel #3
0
 public static void SetNameDescriptionIcon(this BlueprintUnitFact feature, String displayName, String description, Sprite icon)
 {
     SetNameDescription(feature, displayName, description);
     feature.SetIcon(icon);
 }