-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boneworks 100% status livesplit component
- Loading branch information
jakzo
committed
Jul 22, 2024
1 parent
34aeb29
commit 677f085
Showing
22 changed files
with
758 additions
and
229 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added support for sending data to the Boneworks 100% run status LiveSplit component. |
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 @@ | ||
First release. |
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 |
---|---|---|
@@ -1,13 +1,45 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace Sst.Common.Boneworks { | ||
public class HundredPercentState { | ||
public const string NAMED_PIPE = "BoneworksHundredPercent"; | ||
public const string TYPE_AMMO_LIGHT = "ammo_light"; | ||
public const string TYPE_AMMO_MEDIUM = "ammo_medium"; | ||
public const string TYPE_ITEM = "item"; | ||
|
||
public Dictionary<string, RngState> rngUnlocks = | ||
new[] { | ||
("Baseball", "81207815-e447-430b-9ea6-6d8c35842fef", 0.1f), | ||
("Golf Club", "290780a8-4f88-451a-88a5-1599f8e7e89f", 0.02f), | ||
("Baton", "53e4ff47-b0f4-426c-956d-ed391ca6f5f7", 0.1f), | ||
} | ||
.ToDictionary(def => def.Item2, def => new RngState() { | ||
name = def.Item1, | ||
attempts = 0, | ||
prevAttemptChance = def.Item3, | ||
probabilityNotDroppedYet = 1f, | ||
hasDropped = false, | ||
}); | ||
public int unlockLevelCount; | ||
public int unlockLevelMax; | ||
public int ammoLevelCount; | ||
public int ammoLevelMax; | ||
public Collectible[] justCollected; | ||
public Collectible[] levelCollectibles; | ||
|
||
public class Collectible { | ||
public string Type; | ||
public string Uuid; | ||
public string DisplayName; | ||
} | ||
|
||
public int unlockRngCount; | ||
public int unlockRngMax; | ||
public int unlockNormalCount; | ||
public int unlockNormalMax; | ||
public int unlockNormalLevel; | ||
public int levelAmmoCount; | ||
public int levelAmmoMax; | ||
public class RngState { | ||
public string name; | ||
public int attempts; | ||
public float prevAttemptChance; | ||
public float probabilityNotDroppedYet; | ||
public bool hasDropped; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.IO; | ||
using System.IO.Compression; | ||
using System.Linq; | ||
using System.Reflection; | ||
|
||
namespace Sst.Utilities { | ||
public static class Resources { | ||
public static void ExtractResource(string resourceName, string dir) { | ||
var assembly = Assembly.GetExecutingAssembly(); | ||
string resourcePath = assembly.GetManifestResourceNames().Single( | ||
str => str.EndsWith(resourceName)); | ||
using (var stream = assembly.GetManifestResourceStream(resourcePath)) { | ||
using (var archive = new ZipArchive(stream, ZipArchiveMode.Read)) { | ||
foreach (var entry in archive.Entries) { | ||
var entryStream = entry.Open(); | ||
using (var fileStream = | ||
File.Create(Path.Combine(dir, entry.FullName))) { | ||
entryStream.CopyTo(fileStream); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Binary file added
BIN
+21.3 KB
projects/Boneworks/SpeedrunTools/resources/DefaultCollectibleOrder.zip
Binary file not shown.
Oops, something went wrong.