Skip to content

Commit

Permalink
Preparation for updating v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dabao40 committed Nov 7, 2024
1 parent 0b2ca34 commit 04b03c3
Show file tree
Hide file tree
Showing 57 changed files with 2,339 additions and 792 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,28 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.nuget/packages
~/.cache/bepinex
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x

- name: Build
run: dotnet build TheOtherRoles/TheOtherRoles.csproj --configuration Release

- name: Upload TheOtherRoles
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: TheOtherRoles.dll
path: TheOtherRoles/bin/Release/net6.0/TheOtherRoles.dll

path: TheOtherRoles/bin/Release/net6.0/TheOtherRoles.dll
Binary file modified Strings.xlsx
Binary file not shown.
555 changes: 329 additions & 226 deletions TheOtherRoles/Buttons.cs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion TheOtherRoles/CustomGameModes/FreePlayGM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void SetWidget(int tab)
RPCProcedure.setRole((byte)r.roleId, PlayerControl.LocalPlayer.PlayerId);

if (r.roleId == RoleId.Fox) {
CachedPlayer.LocalPlayer.PlayerControl.clearAllTasks();
if (Shrine.allShrine?.FirstOrDefault() == null){
Shrine.activateShrines(GameOptionsManager.Instance.currentNormalGameOptions.MapId);
}
Expand Down Expand Up @@ -113,7 +114,7 @@ void SetWidget(int tab)
SetWidget(0);
}

private static void FastSetRole(this PlayerControl targetPlayer, RoleTypes roleType)
public static void FastSetRole(this PlayerControl targetPlayer, RoleTypes roleType)
{
NetworkedPlayerInfo data = targetPlayer.Data;
RoleBehaviour roleBehaviour = UnityEngine.Object.Instantiate(RoleManager.Instance.AllRoles.First(r => r.Role == roleType), data.gameObject.transform);
Expand Down
24 changes: 21 additions & 3 deletions TheOtherRoles/CustomOptionHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace TheOtherRoles {
public class CustomOptionHolder {
public static string[] rates = new string[]{"0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"};
public static string[] ratesModifier = new string[]{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" };
public static string[] ratesModifier = new string[]{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" };
public static string[] presets = new string[]{ "preset1", "preset2", "Random Preset Skeld", "Random Preset Mira HQ", "Random Preset Polus", "Random Preset Airship", "Random Preset Submerged" };

public static CustomOption presetSelection;
Expand Down Expand Up @@ -305,7 +305,6 @@ public class CustomOptionHolder {

public static CustomOption teleporterSpawnRate;
public static CustomOption teleporterCooldown;
public static CustomOption teleporterSampleCooldown;
public static CustomOption teleporterTeleportNumber;

public static CustomOption tricksterSpawnRate;
Expand Down Expand Up @@ -409,6 +408,16 @@ public class CustomOptionHolder {
public static CustomOption schrodingersCatHideRole;
public static CustomOption schrodingersCatCanChooseImpostor;

public static CustomOption kataomoiSpawnRate;
public static CustomOption kataomoiStareCooldown;
public static CustomOption kataomoiStareDuration;
public static CustomOption kataomoiStareCount;
public static CustomOption kataomoiStalkingCooldown;
public static CustomOption kataomoiStalkingDuration;
public static CustomOption kataomoiStalkingFadeTime;
public static CustomOption kataomoiSearchCooldown;
public static CustomOption kataomoiSearchDuration;

public static CustomOption moriartySpawnRate;
public static CustomOption moriartyBrainwashTime;
public static CustomOption moriartyBrainwashCooldown;
Expand Down Expand Up @@ -849,6 +858,16 @@ public static void Load() {
plagueDoctorImmunityTime = CustomOption.Create(6005, Types.Neutral, "plagueDoctorImmunityTime", 10f, 1f, 30f, 1f, plagueDoctorSpawnRate, false, "unitSeconds");
plagueDoctorInfectKiller = CustomOption.Create(6006, Types.Neutral, "plagueDoctorInfectKiller", true, plagueDoctorSpawnRate);
plagueDoctorWinDead = CustomOption.Create(5999, Types.Neutral, "plagueDoctorWinDead", true, plagueDoctorSpawnRate);

kataomoiSpawnRate = CustomOption.Create(8300, Types.Neutral, cs(Kataomoi.color, "kataomoi"), rates, null, true);
kataomoiStareCooldown = CustomOption.Create(8301, Types.Neutral, "kataomoiStareCooldown", 20f, 2.5f, 60f, 2.5f, kataomoiSpawnRate, false, "unitSeconds");
kataomoiStareDuration = CustomOption.Create(8302, Types.Neutral, "kataomoiStareDuration", 3f, 1f, 10f, 1f, kataomoiSpawnRate, false, "unitSeconds");
kataomoiStareCount = CustomOption.Create(8303, Types.Neutral, "kataomoiStareCount", 5f, 1f, 100f, 1f, kataomoiSpawnRate, false, "unitShots");
kataomoiStalkingCooldown = CustomOption.Create(8304, Types.Neutral, "kataomoiStalkingCooldown", 20f, 2.5f, 60f, 2.5f, kataomoiSpawnRate, false, "unitSeconds");
kataomoiStalkingDuration = CustomOption.Create(8305, Types.Neutral, "kataomoiStalkingDuration", 10f, 1f, 30f, 1f, kataomoiSpawnRate, false, "unitSeconds");
kataomoiStalkingFadeTime = CustomOption.Create(8306, Types.Neutral, "kataomoiStalkingFadeTime", 0.5f, 0.0f, 2.5f, 0.5f, kataomoiSpawnRate, false, "unitSeconds");
kataomoiSearchCooldown = CustomOption.Create(8307, Types.Neutral, "kataomoiSearchCooldown", 10f, 2.5f, 60f, 2.5f, kataomoiSpawnRate, false, "unitSeconds");
kataomoiSearchDuration = CustomOption.Create(8308, Types.Neutral, "kataomoiSearchDuration", 10f, 1f, 30f, 1f, kataomoiSpawnRate, false, "unitSeconds");

schrodingersCatSpawnRate = CustomOption.Create(8400, Types.Neutral, cs(SchrodingersCat.color, "schrodingersCat"), rates, null, true);
schrodingersCatKillCooldown = CustomOption.Create(971, Types.Neutral, "schrodingersCatKillCooldown", 20f, 1f, 60f, 0.5f, schrodingersCatSpawnRate, format: "unitSeconds");
Expand Down Expand Up @@ -992,7 +1011,6 @@ public static void Load() {
prophetPowerCrewAsRed = CustomOption.Create(9010, Types.Crewmate, "prophetPowerCrewAsRed", false, prophetSpawnRate);

teleporterSpawnRate = CustomOption.Create(9000, Types.Crewmate, cs(Teleporter.color, "teleporter"), rates, null, true);
teleporterSampleCooldown = CustomOption.Create(9004, Types.Crewmate, "teleporterSampleCooldown", 30f, 5f, 60f, 5f, teleporterSpawnRate, false, "unitSeconds");
teleporterCooldown = CustomOption.Create(9001, Types.Crewmate, "teleporterCooldown", 30f, 5f, 120f, 5f, teleporterSpawnRate, false, "unitSeconds");
teleporterTeleportNumber = CustomOption.Create(9003, Types.Crewmate, "teleporterTeleportNumber", 3f, 1f, 10f, 1f, teleporterSpawnRate, false, "unitScrews");

Expand Down
3 changes: 2 additions & 1 deletion TheOtherRoles/GameHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public enum CustomDeathReason {
Shift,
//LawyerSuicide,
LoverSuicide, // not necessary
KataomoiStare,
WitchExile,
Revenge,
Suicide,
Expand Down Expand Up @@ -67,4 +68,4 @@ public static void overrideDeathReasonAndKiller(PlayerControl player, DeadPlayer
}
}
}
}
}
Loading

0 comments on commit 04b03c3

Please sign in to comment.