-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #622 from TheTrackerCouncil/tracker-speech-sprite-…
…packs Split tracker speech sprites from regular sprites and configs
- Loading branch information
Showing
23 changed files
with
715 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/TrackerCouncil.Smz3.Data/Options/TrackerSpeechReactionImages.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace TrackerCouncil.Smz3.Data.Options; | ||
|
||
/// <summary> | ||
/// Images for a single reaction | ||
/// </summary> | ||
public class TrackerSpeechReactionImages | ||
{ | ||
/// <summary> | ||
/// Image for when tracker is not talking | ||
/// </summary> | ||
public required string IdleImage { get; set; } | ||
|
||
/// <summary> | ||
/// Image for when tracker is saying something | ||
/// </summary> | ||
public required string TalkingImage { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// A package of different sets of reaction images for Tracker | ||
/// </summary> | ||
public class TrackerSpeechImagePack | ||
{ | ||
/// <summary> | ||
/// The name of the pack | ||
/// </summary> | ||
public required string Name { get; set; } | ||
|
||
/// <summary> | ||
/// The default reaction images for the speech image pack | ||
/// </summary> | ||
public required TrackerSpeechReactionImages Default { get; set; } | ||
|
||
/// <summary> | ||
/// A dictionary of all of the different reaction types for this pack | ||
/// </summary> | ||
public required Dictionary<string, TrackerSpeechReactionImages> Reactions { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the reaction images for a given reaction type. Will return the default reaction type if not specified | ||
/// or the requested reaction type is not present in this pack. | ||
/// </summary> | ||
/// <param name="reactionName">The name of the reaction</param> | ||
/// <returns>The appropriate images to use for the reaction</returns> | ||
public TrackerSpeechReactionImages GetReactionImages(string? reactionName = null) | ||
{ | ||
if (reactionName == null) | ||
{ | ||
return Default; | ||
} | ||
return Reactions.TryGetValue(reactionName.ToLower(), out var reaction) ? reaction : Default; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/TrackerCouncil.Smz3.Data/Services/GitHubFileDownloadUpdateEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
|
||
namespace TrackerCouncil.Smz3.Data.Services; | ||
|
||
/// <summary> | ||
/// Event for the progress of a download of files from GitHub | ||
/// </summary> | ||
/// <param name="completed"></param> | ||
/// <param name="total"></param> | ||
public class GitHubFileDownloadUpdateEventArgs(int completed, int total) : EventArgs | ||
{ | ||
/// <summary> | ||
/// How many files have been finished (either successful or failed) | ||
/// </summary> | ||
public int Completed => completed; | ||
|
||
/// <summary> | ||
/// The total number of files to process | ||
/// </summary> | ||
public int Total => total; | ||
} |
Oops, something went wrong.