-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCardHolder.cs
More file actions
31 lines (29 loc) · 1.35 KB
/
CardHolder.cs
File metadata and controls
31 lines (29 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using System.Collections.Generic;
using UnboundLib.Cards;
using UnityEngine;
namespace RSClasses
{
public class CardHolder : MonoBehaviour // Loads cards
{
public List<GameObject> Cards;
public List<GameObject> HiddenCards;
public static Dictionary<string, CardInfo> cards = new Dictionary<string, CardInfo> ();
internal void RegisterCards()
{
foreach (var Card in Cards)
{
CustomCard.RegisterUnityCard(Card, RSClasses.ModInitials, Card.GetComponent<CardInfo>().cardName, true, null);
CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(Card.GetComponent<CardInfo>());
cards.Add(Card.GetComponent<CardInfo>().cardName, Card.GetComponent<CardInfo>());
}
foreach (var Card in HiddenCards)
{
CustomCard.RegisterUnityCard(Card, RSClasses.ModInitials, Card.GetComponent<CardInfo>().cardName, false, null);
CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(Card.GetComponent<CardInfo>());
ModdingUtils.Utils.Cards.instance.AddHiddenCard(Card.GetComponent<CardInfo>());
cards.Add(Card.GetComponent<CardInfo>().cardName, Card.GetComponent<CardInfo>());
}
}
}
}