Skip to content

Commit

Permalink
Make copied states not carry over changes between copies
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSmugleaf committed Jan 6, 2024
1 parent 9a6e11d commit 5d64a9b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SpaceWizards.RsiLib/RSI/RsiState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ public RsiState() : this("", DirectionType.None, null, null, null)
{
}

public RsiState(RsiState state) : this(
state.Name,
state.Directions,
state.Delays?.Select(l => l.ToList()).ToList(),
state.Flags?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value),
state.ImagePath,
(Image<Rgba32>[,]?) state.Frames.Clone())
{
}

public string Name { get; set; }

public DirectionType Directions { get; set; }
Expand Down

0 comments on commit 5d64a9b

Please sign in to comment.