Skip to content

Commit 5d64a9b

Browse files
committed
Make copied states not carry over changes between copies
1 parent 9a6e11d commit 5d64a9b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: SpaceWizards.RsiLib/RSI/RsiState.cs

+10
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ public RsiState() : this("", DirectionType.None, null, null, null)
5656
{
5757
}
5858

59+
public RsiState(RsiState state) : this(
60+
state.Name,
61+
state.Directions,
62+
state.Delays?.Select(l => l.ToList()).ToList(),
63+
state.Flags?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value),
64+
state.ImagePath,
65+
(Image<Rgba32>[,]?) state.Frames.Clone())
66+
{
67+
}
68+
5969
public string Name { get; set; }
6070

6171
public DirectionType Directions { get; set; }

0 commit comments

Comments
 (0)