27 lines
679 B
C#
Executable File
27 lines
679 B
C#
Executable File
using LiveSplit.Model;
|
|
using LiveSplit.TZA.Util;
|
|
|
|
namespace LiveSplit.TZA.Splits;
|
|
|
|
internal class EnterLocation : ISplit {
|
|
private ushort Location { get; }
|
|
|
|
internal EnterLocation(ushort location) {
|
|
this.Location = location;
|
|
}
|
|
|
|
public LogicResult Calculate(TimerPhase phase, GameMemory memory) {
|
|
if (phase != TimerPhase.Running) {
|
|
return LogicResult.None;
|
|
}
|
|
|
|
if (!memory.Location.Changed || memory.Location.Current != this.Location) {
|
|
return LogicResult.None;
|
|
}
|
|
|
|
return LogicResult.Split;
|
|
}
|
|
|
|
public string GetHumanName() => $"After entering {LocationNames.Get(this.Location)}";
|
|
}
|