Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottWilson0903 committed Nov 12, 2021
1 parent 93723ad commit c5e7a00
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions Models/CustomCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class CustomCard
public IceCubeIdentifier iceCubeId;
public TailIdentifier tailId;

public CustomCard(string name)
public CustomCard(string name, List<AbilityIdentifier> abilityId=null, EvolveIdentifier evolveId=null, IceCubeIdentifier iceCubeId=null, TailIdentifier tailId=null)
{
this.name = name;
CustomCard.cards.Add(this);
Expand All @@ -60,7 +60,7 @@ public CustomCard(string name)
List<AbilityIdentifier> toRemove = new List<AbilityIdentifier>();
if (this.abilityId is not null)
{
foreach (AbilityIdentifier id in this.abilityId)
foreach (AbilityIdentifier id in abilityId)
{
if (id.id != 0)
{
Expand All @@ -72,27 +72,27 @@ public CustomCard(string name)
this.abilityId.Remove(id);
}
}
if (this.abilityId is not null && this.abilityId.Count > 0)
if (abilityId is not null && this.abilityId.Count > 0)
{
CustomCard.abilityIds[CustomCard.cards.Count - 1] = this.abilityId;
CustomCard.abilityIds[CustomCard.cards.Count - 1] = abilityId;
}

// Handle EvolveIdentifier
if (this.evolveId is not null)
if (evolveId is not null)
{
CustomCard.evolveIds[CustomCard.cards.Count - 1] = this.evolveId;
CustomCard.evolveIds[CustomCard.cards.Count - 1] = evolveId;
}

// Handle IceCubeIdentifier
if (this.iceCubeId is not null)
if (iceCubeId is not null)
{
CustomCard.iceCubeIds[CustomCard.cards.Count - 1] = this.iceCubeId;
CustomCard.iceCubeIds[CustomCard.cards.Count - 1] = iceCubeId;
}

// Handle TailIdentifier
if (this.tailId is not null)
if (tailId is not null)
{
CustomCard.tailIds[CustomCard.cards.Count - 1] = this.tailId;
CustomCard.tailIds[CustomCard.cards.Count - 1] = tailId;
}
}

Expand Down
12 changes: 6 additions & 6 deletions Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ private void SetEvolveIdentifiers()
EvolveIdentifier id = item.Value;
if (id.Evolution != null)
{
NewCard.cards[item.Key].evolveParams = id.Evolution;
CustomCard.cards[item.Key].evolveParams = id.Evolution;
}
else
{
Plugin.Log.LogWarning($"Evolution card {id} not found for card {NewCard.cards[item.Key]}");
Plugin.Log.LogWarning($"Evolution card {id} not found for card {CustomCard.cards[item.Key]}");
}
}
}
Expand All @@ -165,11 +165,11 @@ private void SetIceCubeIdentifiers()
IceCubeIdentifier id = item.Value;
if (id.IceCube != null)
{
NewCard.cards[item.Key].iceCubeParams = id.IceCube;
CustomCard.cards[item.Key].iceCubeParams = id.IceCube;
}
else
{
Plugin.Log.LogWarning($"IceCube card {id} not found for card {NewCard.cards[item.Key]}");
Plugin.Log.LogWarning($"IceCube card {id} not found for card {CustomCard.cards[item.Key]}");
}
}
}
Expand All @@ -194,11 +194,11 @@ private void SetTailIdentifiers()
TailIdentifier id = item.Value;
if (id.Tail != null)
{
NewCard.cards[item.Key].tailParams = id.Tail;
CustomCard.cards[item.Key].tailParams = id.Tail;
}
else
{
Plugin.Log.LogWarning($"Tail card {id} not found for card {NewCard.cards[item.Key]}");
Plugin.Log.LogWarning($"Tail card {id} not found for card {CustomCard.cards[item.Key]}");
}
}
}
Expand Down

0 comments on commit c5e7a00

Please sign in to comment.