~hutzdog/TOS2-Auto-Crossout

6bdf2deae3aaa15844d40cb040f88108f60f2f3c — Danielle Hutzley 4 months ago e2cca95
Attempt to mitigate random extraneous role reveals
2 files changed, 8 insertions(+), 2 deletions(-)

M justfile
M src/Patches.cs
M justfile => justfile +6 -0
@@ 10,3 10,9 @@ build-dev *ARGS:

build-release *ARGS:
  just _build -c Release {{ARGS}}

install-dev *ARGS: (build-dev ARGS)
  cp dist/AutoCrossout.dll "${STEAM_LIBRARY_PATH}/steamapps/common/Town of Salem 2/SalemModLoader/Mods/"

install-release *ARGS: (build-release ARGS)
  cp dist/AutoCrossout.dll "${STEAM_LIBRARY_PATH}/steamapps/common/Town of Salem 2/SalemModLoader/Mods/"

M src/Patches.cs => src/Patches.cs +2 -2
@@ 72,9 72,9 @@ namespace AutoCrossout.Patches

          if (Pepper.IsGamePhasePlay() && Accessors.RoleListAccessor.hrg_controller != null)
            Accessors.RoleListAccessor.CrossOutA(data.role);
          else if (Pepper.IsRoleRevealPhase() || Pepper.IsPickNamesOrGamePhase())
          else if (Pepper.IsRoleRevealPhase() || Pepper.IsGamePhasePlay())
            CrossOutStartingRoles.StartingRoles.Add(data.role);
          else 
          else
          {
            Utils.WriteDebug("Cancelling role crossout: not in correct game phase");
            return;