Skip to content

Commit

Permalink
v2.0.8 release
Browse files Browse the repository at this point in the history
target celeste tas 3.41.0
  • Loading branch information
LozenChen committed Oct 5, 2024
1 parent e7bb205 commit dedff15
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 27 deletions.
13 changes: 2 additions & 11 deletions Source/Gameplay/AutoWatchEntity/Trigger/TriggerInfoHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//#define ForMaintenance
using System.Reflection;
using System.Reflection;

namespace Celeste.Mod.TASHelper.Gameplay.AutoWatchEntity;

Expand All @@ -17,7 +16,7 @@ internal static class TriggerInfoHelper {

public static Dictionary<Type, TriggerDynamicPlayerHandler> DynamicInfoPlayerGetters = new Dictionary<Type, TriggerDynamicPlayerHandler>();

private static HashSet<string> implementedMods = new HashSet<string>() { "Celeste" };
internal static HashSet<string> implementedMods = new HashSet<string>() { "Celeste", "SkinModHelper", "SkinModHelperPlus" };

[Initialize]
public static void Initialize() {
Expand All @@ -36,14 +35,6 @@ public static void Initialize() {
}
ModTriggerStaticInfo.AddToDictionary();
ModTriggerDynamicInfo.AddToDictionary();
#if ForMaintenance
Logger.Log(LogLevel.Debug, $"TASHelper/{nameof(TriggerInfoHelper)}:NotImplementedTriggers",
string.Join("\n", Utils.ModUtils.GetTypes().Where(x =>
x.IsSubclassOf(typeof(Trigger))
&& !StaticInfoGetters.ContainsKey(x)
&& !implementedMods.Contains(x.Assembly.GetName().Name)
).Select(x => x.Assembly.GetName().Name + " @ " + x.FullName)));
#endif
}

public static bool TryCreateStaticHandler(MethodInfo method, out TriggerStaticHandler handler) {
Expand Down
33 changes: 26 additions & 7 deletions Source/Maintenance/MaintenanceRoutine.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,44 @@
//#define Maintenance

#if Maintenance
using Celeste.Mod.TASHelper.Gameplay.AutoWatchEntity;
using Celeste.Mod.TASHelper.Utils;
using Monocle;

namespace Celeste.Mod.TASHelper.Maintenance;
internal static class MaintenaceRoutine {

private static void CheckSpeedrunTool() {
// Tiny SRT needs "sync fork" from SpeedrunTool
// also, if a mod support SRT on its own, we need to create a corresponding support in TASHelper
internal static class MaintenanceRoutine {

[Initialize]

private static void Initialize() {
Logger.Log(LogLevel.Debug, "TAS Helper Maintenance", "This should be commented out when release!");

CheckTriggerInfoHelper();
}

[Initialize]

private static void CheckTriggerInfoHelper() {
int count = 0;
Logger.Log(LogLevel.Debug, $"TASHelper/{nameof(TriggerInfoHelper)}:NotImplementedTriggers",
"As follows:\n" + string.Join("\n", Utils.ModUtils.GetTypes().Where(x =>
x.IsSubclassOf(typeof(Trigger))
&& !TriggerInfoHelper.StaticInfoGetters.ContainsKey(x)
&& !TriggerInfoHelper.implementedMods.Contains(x.Assembly.GetName().Name)
).Select(x => { count++; return $"{count}). {x.Assembly.GetName().Name} @ {x.FullName}"; })));
}

private static void CheckSimplifiedTriggers() {
// check if new triggers appear and need to be "simplified"
List<Type> types = ModUtils.GetTypes().Where(x => x.IsSameOrSubclassOf(typeof(Trigger))).ToList();
foreach (Type type in types) {
Logger.Log("TAS Helper Maintenance", type.FullName);
}
}
}

private static void CheckSpeedrunTool() {
// Tiny SRT needs "sync fork" from SpeedrunTool
// also, if a mod support SRT on its own, we need to create a corresponding support in TASHelper
}

private static void CheckTasSync() {
// run tases of the most popular maps
Expand Down
3 changes: 2 additions & 1 deletion Source/Module/WhatsNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public static void CreateUpdateLog() {
AddLog("2.0.4", "Bugfix: If Cassette tempo = 0 and there's freeze frame, then game gets stuck (thanks @trans_alexa)");
AddLog("2.0.5", "Bugfix: Cutscene is auto-watched even if Auto Watch is not enabled. (thanks @socksygen)");
AddLog("2.0.6", "Feature: Auto-Watch now supports Triggers, and vanilla / Everest ones are handled well.");
AddLog("2.0.7", "Feature: Auto-Watch now supports CrumbleWallOnRumble.");
AddLog("2.0.7", "Feature: Auto-Watch now supports CrumbleWallOnRumble.");
AddLog("2.0.8", "Change: Target CelesteTAS v3.41.0", "Feature: Auto-Watch supports more triggers.");
UpdateLogs.Sort((x, y) => new Version(y.Item1).CompareTo(new Version(x.Item1)));
}

Expand Down
8 changes: 4 additions & 4 deletions Source/Predictor/InputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public static void ReadInputs(int frames) {
}

public static void ExecuteCommands(int frame) {
if (Manager.Controller.Commands.GetValueOrDefault(Manager.Controller.CurrentFrameInTas + frame) is { } CurrentCommands) {
foreach (var command in CurrentCommands) {
if (Manager.Controller.Commands.GetValueOrDefault(Manager.Controller.CurrentFrameInTas + frame) is List<Command> CurrentCommands) {
foreach (Command command in CurrentCommands) {
if (SupportedRuntimeCommands.Contains(command.Attribute.Name) &&
(!EnforceLegalCommand.EnabledWhenRunning || command.Attribute.LegalInMainGame)) {
(!EnforceLegalCommand.EnabledWhenRunning || command.Attribute.LegalInFullGame)) {
command.Invoke();
}
}
Expand All @@ -39,7 +39,7 @@ public static void Initialize() {
EmptyInput = emptyInput;
SupportedRuntimeCommands.Clear();
foreach (string str in _supportedRuntimeCommands) {
if (TasCommandAttribute.MethodInfos.Keys.Where(x => x.Name == str) is { } commands && commands.IsNotNullOrEmpty() && commands.First().ExecuteTiming.Has(ExecuteTiming.Runtime)) {
if (Command.Commands.Where(x => x.Name == str) is { } commands && commands.IsNotNullOrEmpty() && commands.First().ExecuteTiming.Has(ExecuteTiming.Runtime)) {
SupportedRuntimeCommands.Add(str);
}
}
Expand Down
2 changes: 1 addition & 1 deletion TASHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<Publicize Include="CelesteTAS-EverestInterop:TAS.Input.InputController.Checksum" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.Input.InputController.ParseFileEnd" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.Input.InputController.CurrentFrameInTas" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.Input.Commands.TasCommandAttribute.MethodInfos" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.Input.Command.Commands" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.EverestInterop.Hitboxes.ActualEntityCollideHitbox" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.EverestInterop.Hitboxes.ActualEntityCollideHitbox.LoadActualCollidePosition" />
<Publicize Include="CelesteTAS-EverestInterop:TAS.EverestInterop.Hitboxes.ActualEntityCollideHitbox.SavePlayerPosition" />
Expand Down
6 changes: 3 additions & 3 deletions everest.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
- Name: TASHelper
Version: 2.0.7
Version: 2.0.8
DLL: bin/Release/net7.0/TASHelper.dll
Dependencies:
- Name: EverestCore
Version: 1.4818.0
Version: 1.5034.0
- Name: CelesteTAS
Version: 3.40.0
Version: 3.41.0
- Name: SpeedrunTool
Version: 3.20.0

0 comments on commit dedff15

Please sign in to comment.