Added bug types

This commit is contained in:
Tretiner 2024-07-27 22:13:58 +05:00
parent 6b201ff221
commit 1e533e6420
4 changed files with 16 additions and 0 deletions

View File

@ -1,9 +1,12 @@
using SoulstormReplayReader.Core.Domain.Action; using SoulstormReplayReader.Core.Domain.Action;
using SoulstormReplayReader.Core.Enums;
namespace SoulstormReplayReader.Core.Domain.BugCheckers; namespace SoulstormReplayReader.Core.Domain.BugCheckers;
public abstract class BugCheckerBase(int playerId, RaceEnum playerRace) public abstract class BugCheckerBase(int playerId, RaceEnum playerRace)
{ {
public abstract BugType BugType { get; }
public readonly int PlayerId = playerId; public readonly int PlayerId = playerId;
public readonly RaceEnum PlayerRace = playerRace; public readonly RaceEnum PlayerRace = playerRace;

View File

@ -1,10 +1,13 @@
using SoulstormReplayReader.Core.Domain.Action; using SoulstormReplayReader.Core.Domain.Action;
using SoulstormReplayReader.Core.Enums;
using SoulstormReplayReader.Core.Utils; using SoulstormReplayReader.Core.Utils;
namespace SoulstormReplayReader.Core.Domain.BugCheckers; namespace SoulstormReplayReader.Core.Domain.BugCheckers;
public sealed class FastT2Checker(int playerId, RaceEnum playerRace) : BugCheckerBase(playerId, playerRace) public sealed class FastT2Checker(int playerId, RaceEnum playerRace) : BugCheckerBase(playerId, playerRace)
{ {
public override BugType BugType => BugType.FastT2;
private byte _gensBuilt = 0; private byte _gensBuilt = 0;
private bool _isAspectPortalBuilt = false; private bool _isAspectPortalBuilt = false;
private bool _isSoulShrineBuilt = false; private bool _isSoulShrineBuilt = false;

View File

@ -1,9 +1,12 @@
using SoulstormReplayReader.Core.Domain.Action; using SoulstormReplayReader.Core.Domain.Action;
using SoulstormReplayReader.Core.Enums;
namespace SoulstormReplayReader.Core.Domain.BugCheckers; namespace SoulstormReplayReader.Core.Domain.BugCheckers;
public sealed class GenBugChecker(int playerId, RaceEnum playerRace) : BugCheckerBase(playerId, playerRace) public sealed class GenBugChecker(int playerId, RaceEnum playerRace) : BugCheckerBase(playerId, playerRace)
{ {
public override BugType BugType => BugType.GenBug;
private const int TicksRange = 4; private const int TicksRange = 4;
private const int GensToTrigger = 3; private const int GensToTrigger = 3;

View File

@ -0,0 +1,7 @@
namespace SoulstormReplayReader.Core.Enums;
public enum BugType : byte
{
GenBug,
FastT2
}