Skip to content

Commit

Permalink
Use pc.Role.CanUse()
Browse files Browse the repository at this point in the history
Co-authored-by: Hyz-sui <[email protected]>
  • Loading branch information
Tommy-XL and Hyz-sui authored Jan 23, 2024
1 parent d8dd10d commit 6a6cd3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Patches/UsablesPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static bool Prefix(Vent __instance, [HarmonyArgument(0)] GameData.PlayerI

// カスタムロールを元にベントを使えるか判定
// エンジニアベースの役職は常にtrue
couldUse = playerControl.CanUseImpostorVentButton() || (pc.Role.Role == RoleTypes.Engineer && !Utils.IsActive(SystemTypes.Comms));
couldUse = playerControl.CanUseImpostorVentButton() || (pc.Role.Role == RoleTypes.Engineer && pc.Role.CanUse(__instance.Cast<IUsable>()));

canUse = couldUse;
// カスタムロールが使えなかったら使用不可
Expand Down

0 comments on commit 6a6cd3f

Please sign in to comment.