This commit is contained in:
Gurge44 committed 2025-06-03 10:20:14 +02:00
1 parent edf52f22cf
commit 87f4692cd2
3 files changed
+45 -24

No files matched your search

+19 -3
View File
@@ -1369,7 +1369,7 @@ public static class Utils
case "DisableAirshipDevices" when Main.CurrentMap != MapNames.Airship:
case "PolusReactorTimeLimit" when Main.CurrentMap != MapNames.Polus:
case "AirshipReactorTimeLimit" when Main.CurrentMap != MapNames.Airship:
case "ImpCanBeRole" or "CrewCanBeRole" or "NeutralCanBeRole" when f1:
case "ImpCanBeRole" or "CrewCanBeRole" or "NeutralCanBeRole" or "CovenCanBeRole" when f1:
continue;
}
@@ -3837,8 +3837,13 @@ public static class Utils
return name;
}
private static (int AddonsProgress, int RolesProgress) QuickSetupProgress;
public static void EnterQuickSetupRoles(bool addons)
{
int progress = addons ? QuickSetupProgress.AddonsProgress : QuickSetupProgress.RolesProgress;
bool continuation = progress > 0;
int all = Options.CustomRoleSpawnChances.Keys.Count(x => addons ? x.IsAdditionRole() : !x.IsAdditionRole());
var count = 0;
@@ -3848,6 +3853,8 @@ public static class Utils
count++;
if (continuation && progress >= count) continue;
string str = GetString($"{role}InfoLong");
string infoLong;
@@ -3867,10 +3874,19 @@ public static class Utils
rotStr = ColorString(at.GetAddonTypeColor(), GetString($"ROT.AddonType.{at}"));
}
Action increment = () =>
{
if (addons) QuickSetupProgress.AddonsProgress++;
else QuickSetupProgress.RolesProgress++;
if (addons && QuickSetupProgress.AddonsProgress >= all)
QuickSetupProgress = (0, 0);
};
Prompt.Show(
string.Format(GetString("Promt.EnableRole"), count, all, rotStr, role.ToColoredString(), infoLong),
() => option.SetValue(1),
() => option.SetValue(0));
(() => option.SetValue(1)) + increment,
(() => option.SetValue(0)) + increment);
}
if (addons) return;
+17 -12
View File
@@ -360,23 +360,28 @@ internal static class SetUpRoleTextPatch
string disabledRoleStr = GetString("Rate0");
var i = 0;
foreach (OptionItem o in OptionItem.AllOptions)
foreach ((TabGroup tab, OptionItem[] options) in Options.GroupedOptions)
{
if (!o.IsCurrentlyHidden() && (o.Parent == null ? !o.GetString().Equals(disabledRoleStr) : AllParentsEnabled(o)))
sb.Append($"{(o.Parent == null ? o.GetName(true, true).RemoveHtmlTags().PadRightV2(40) : $"┗ {o.GetName(true, true).RemoveHtmlTags()}".PadRightV2(41))}:{o.GetString().RemoveHtmlTags()}\n");
sb.Append($"\n----{GetString($"TabGroup.{tab}")}----\n");
if (i++ > 20)
foreach (OptionItem o in options)
{
yield return null;
i = 0;
}
if (!o.IsCurrentlyHidden() && (o.Parent == null ? !o.GetString().Equals(disabledRoleStr) : AllParentsEnabled(o)))
sb.Append($"{(o.Parent == null ? o.GetName(true, true).RemoveHtmlTags().PadRightV2(40) : $"┗ {o.GetName(true, true).RemoveHtmlTags()}".PadRightV2(41))}:{o.GetString().RemoveHtmlTags()}\n");
continue;
if (i++ > 20)
{
yield return null;
i = 0;
}
bool AllParentsEnabled(OptionItem oi)
{
if (oi.Parent == null) return true;
return oi.Parent.GetBool() && AllParentsEnabled(oi.Parent);
continue;
bool AllParentsEnabled(OptionItem oi)
{
if (oi.Parent == null) return true;
return oi.Parent.GetBool() && AllParentsEnabled(oi.Parent);
}
}
}
+9 -9
View File
@@ -4041,7 +4041,7 @@
"AnalystInfoLong": "(Crewmates):\\nAs the Analyst, you may use your kill button on someone to analyze them. You will have to stand next to your target for a few seconds to complete the analysis. When the analysis is complete, you will see how many players they've killed so far, how many times they've vented so far, and their role basis.\\n\\nNote: If the host's settings don't allow you to see an information, the result will show 0 or nothing!\\nNote: None of these factors determine whether someone is evil or not! Think twice before judging too fast!",
"AnalyzerCD": "Analyze Cooldown",
"AnalyzerDur": "Analyze Time",
"AnalyzerResult": "\\n\\nShowing analyzation result for <color=#00ffa5>{0}</color>:\\nKills: <color=#ff1919>{1}</color>, Vents: <color=#ffa500>{2}</color>, Role Basis: <color=#00ffff>{3}</color>",
"AnalyzerResult": "Showing analyzation result for <color=#00ffa5>{0}</color>:\\nKills: <color=#ff1919>{1}</color>, Vents: <color=#ffa500>{2}</color>, Role Basis: <color=#00ffff>{3}</color>",
"AnalyzerKillButtonText": "Analyze",
"AnalyzeCD": "Analyze Cooldown",
"AnalyzeDur": "Analyze Duration",
@@ -4382,7 +4382,7 @@
"PostmanCorrectDeliver": "<color=#00ff00>Deliver successful.</color>",
"PostmanTargetDied": "<color=#ffff00>Your target died.</color>",
"PostmanGetNewTarget": "Your new target is {0}.",
"PostmanDone": "\\n\\n<color=#00ff00>You're done delivering messages!\\nYou'll win with the winning team at the end.</color>",
"PostmanDone": "<color=#00ff00>You're done delivering messages!\\nYou'll win with the winning team at the end.</color>",
"PostmanTarget": "<color=#00ffa5>Target:</color> <b>{0}</b>",
"DeliverCooldown": "Deliver Cooldown",
"NecroGuesser": "Necro-Guesser",
@@ -9093,13 +9093,13 @@
"AlchemistVisionOnLightsOut": "Vision During Lights Out During Sight Potion",
"AlchemistVisionDur": "Sight Potion Duration",
"AlchemistVentButtonText": "Drink",
"AlchemistGotShieldPotion": "\\n\\n<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#00ff97>Shield Potion</color>\\n<color=#e6d798>Description: </color>Grants a temporary shield\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotSightPotion": "\\n\\n<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#eee5be>Sight Potion</color>\\n<color=#e6d798>Description: </color>Increases your vision temporarily\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotInvisPotion": "\\n\\n<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#01c834>Invisibility Potion</color>\\n<color=#e6d798>Description: </color>Turns you temporarily invisible\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotQFPotion": "\\n\\n<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#3333ff>Quick Fix Potion</color>\\n<color=#e6d798>Description: </color>You can fix the next critical sabotage alone\\nActivates <color=#e6d798>automatically</color></size></color>",
"AlchemistGotSpeedPotion": "\\n\\n<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#ff8400>Speed Potion</color>\\n<color=#e6d798>Description: </color>Increases your speed temporarily\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotTPPotion": "\\n\\n<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#42d1ff>Teleport Potion</color>\\n<color=#e6d798>Description: </color>Teleports you to a random player\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotSuicidePotion": "\\n\\n\\n<color=#ffffff><size=1.7><color=#ffff00>Awkward Potion</color>\\nLooks like you've mixed the wrong ingredients!\\n<color=#ff1919>Drinking this potion will kill you!</color>\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotShieldPotion": "<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#00ff97>Shield Potion</color>\\n<color=#e6d798>Description: </color>Grants a temporary shield\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotSightPotion": "<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#eee5be>Sight Potion</color>\\n<color=#e6d798>Description: </color>Increases your vision temporarily\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotInvisPotion": "<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#01c834>Invisibility Potion</color>\\n<color=#e6d798>Description: </color>Turns you temporarily invisible\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotQFPotion": "<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#3333ff>Quick Fix Potion</color>\\n<color=#e6d798>Description: </color>You can fix the next critical sabotage alone\\nActivates <color=#e6d798>automatically</color></size></color>",
"AlchemistGotSpeedPotion": "<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#ff8400>Speed Potion</color>\\n<color=#e6d798>Description: </color>Increases your speed temporarily\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotTPPotion": "<color=#ffffff><size=1.7><color=#e6d798>Potion Name: </color><color=#42d1ff>Teleport Potion</color>\\n<color=#e6d798>Description: </color>Teleports you to a random player\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistGotSuicidePotion": "<color=#ffffff><size=1.7><color=#ffff00>Awkward Potion</color>\\nLooks like you've mixed the wrong ingredients!\\n<color=#ff1919>Drinking this potion will kill you!</color>\\nActivate by <color=#e6d798>Venting/Petting</color></size></color>",
"AlchemistNoPotion": "You don't have any potions ready to drink",
"AlchemistShielded": "Shield Potion active",
"AlchemistHasSpeed": "Speed Potion active",