Parasite SS via Pet; Finish Chemist (in practice)

This commit is contained in:
Gurge44 committed 2024-04-17 20:05:28 +02:00
1 parent a5fb025178
commit 1f07768b9f
11 files changed
+121 -62

No files matched your search

+1
View File
@@ -223,6 +223,7 @@ public enum CustomRoles
Bargainer,
BloodKnight,
Bubble,
Chemist,
Cherokious,
Collector,
Deathknight,
+1 -1
View File
@@ -7,7 +7,7 @@
<Description>EHR</Description>
<Authors>Gurge44</Authors>
<langVersion>preview</langVersion>
<AmongUs>D:\Epic Games\AmongUs</AmongUs>
<AmongUs>E:\Program Files\AmongUs</AmongUs>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>True</Optimize>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
+1
View File
@@ -21,6 +21,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RPC/@EntryIndexedValue">RPC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SK/@EntryIndexedValue">SK</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SS/@EntryIndexedValue">SS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SSCD/@EntryIndexedValue">SSCD</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=TMP/@EntryIndexedValue">TMP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EHR/@EntryIndexedValue">EHR</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String>
-2
View File
@@ -557,8 +557,6 @@ public static class Options
public static OptionItem DecontaminationTimeOnMiraHQ;
public static OptionItem DecontaminationTimeOnPolus;
public static OptionItem ParasiteCD;
public static OptionItem ShapeshiftCD;
public static OptionItem ShapeshiftDur;
+3
View File
@@ -1827,6 +1827,7 @@ public static class Utils
SelfSuffix.Append(Roles.Impostor.Sentry.GetSuffix(seer));
SelfSuffix.Append(Bargainer.GetSuffix(seer));
SelfSuffix.Append(Bloodmoon.GetSuffix(seer));
SelfSuffix.Append(Chemist.GetSuffix(seer, seer));
switch (seer.GetCustomRole())
{
@@ -2341,6 +2342,7 @@ public static class Utils
TargetSuffix.Append(Stealth.GetSuffix(seer, target));
TargetSuffix.Append(Bubble.GetEncasedPlayerSuffix(seer, target));
TargetSuffix.Append(Commander.GetSuffixText(seer, target));
TargetSuffix.Append(Chemist.GetSuffix(seer, target));
if (target.Is(CustomRoles.Librarian)) TargetSuffix.Append(Librarian.GetNameTextForSuffix(target.PlayerId));
@@ -2442,6 +2444,7 @@ public static class Utils
CustomRoles.Twister => Twister.ShapeshiftCooldown.GetInt(),
CustomRoles.Warlock => Warlock.IsCursed ? -1 : (int)Options.DefaultKillCooldown,
CustomRoles.Swiftclaw => Swiftclaw.DashCD.GetInt() + (includeDuration ? Swiftclaw.DashDuration.GetInt() : 0),
CustomRoles.Parasite => (int)Parasite.SSCD + (includeDuration ? (int)Parasite.SSDur : 0),
CustomRoles.Tiger => Tiger.EnrageCooldown.GetInt() + (includeDuration ? Tiger.EnrageDuration.GetInt() : 0),
CustomRoles.Cherokious => Cherokious.KillCooldown.GetInt(),
_ => -1,
+1 -1
View File
@@ -398,7 +398,7 @@ class HudManagerPatch
CustomRoles.PlagueDoctor => PlagueDoctor.GetLowerTextOthers(player, isForHud: true),
CustomRoles.Stealth => Stealth.GetSuffix(player, isHUD: true),
CustomRoles.Hookshot => Hookshot.SuffixText(player.PlayerId),
CustomRoles.Chemist => Chemist.GetSuffix(player, player),
CustomRoles.Chemist => Chemist.GetSuffix(player, player, hud: true),
CustomRoles.Tornado => Tornado.GetSuffixText(isHUD: true),
_ => player.Is(CustomRoles.Asthmatic) ? Asthmatic.GetSuffixText(player.PlayerId) : string.Empty,
},
+1
View File
@@ -137,6 +137,7 @@ class CoBeginPatch
logger.Info("-------------Other Information-------------");
logger.Info($"Number of players: {Main.AllPlayerControls.Length}");
logger.Info($"Map: {Main.CurrentMap}");
Main.AllPlayerControls.Do(x => Main.PlayerStates[x.PlayerId].InitTask(x));
GameData.Instance.RecomputeTaskCounts();
TaskState.InitialTotalTasks = GameData.Instance.TotalTasks;
+6 -3
View File
@@ -1487,6 +1487,9 @@ class FixedUpdatePatch
case CustomRoles.Snitch:
Suffix.Append(Snitch.GetSnitchArrow(seer, target));
break;
case CustomRoles.Chemist:
Suffix.Append(Chemist.GetSuffix(seer, target));
break;
case CustomRoles.VengefulRomantic when self:
Suffix.Append(VengefulRomantic.GetTargetText(seer.PlayerId));
break;
@@ -1499,13 +1502,13 @@ class FixedUpdatePatch
case CustomRoles.Hitman when self:
Suffix.Append(Hitman.GetTargetText(seer.PlayerId));
break;
case CustomRoles.Penguin when target.PlayerId == seer.PlayerId:
case CustomRoles.Penguin when self:
Suffix.Append(Penguin.GetSuffix(seer));
break;
case CustomRoles.Changeling when target.PlayerId == seer.PlayerId:
case CustomRoles.Changeling when self:
Suffix.Append(Changeling.GetSuffix(seer));
break;
case CustomRoles.Tiger when target.PlayerId == seer.PlayerId:
case CustomRoles.Tiger when self:
Suffix.Append(Tiger.GetSuffix(seer));
break;
case CustomRoles.Predator when self:
+4 -3
View File
@@ -2704,7 +2704,7 @@
"Bargainer.Suffix.InShop": "<size=80%>[<#00ffa5>Shop</color>] Selected: {0} ({1})</size>",
"Chemist": "Chemist",
"ChemistInfo": "Mix Chemicals",
"ChemistInfoLong": "(Neutrals):\\nAs the Chemist, good luck",
"ChemistInfoLong": "(Neutrals):\\nAs the Chemist, mix all sorts of chemicals to make overpowered gasses and items. Each room on the ship functions as a type of factory. In each factory, you can do some processes that take ingredients and get the results. Work your way to get these end products, which do the following:\\n- Sulfuric Acid: Mark someone with the kill button, and that player will spread the acid to all players they go nearby. After some time, all the acid players die.\\n- Methylamine Gas: Vent to blind everyone except you.\\n- Explosive: Gets put onto the next dead body you make. Everyone who tries to report it dies.\\n- Grenade: Put this onto someone via the kill button. They now carry the grenade. It blows up in seconds, killing that player and everyone nearby.",
"Chemist.Item.Air": "Air",
"Chemist.Item.BaseMineralOil": "Base Mineral Oil",
"Chemist.Item.Coal": "Coal",
@@ -2717,14 +2717,15 @@
"Chemist.Item.Steam": "Steam",
"Chemist.Item.ThermalWater": "Thermal Water",
"Chemist.Item.Water": "Water",
"Chemist.Item.IronOre": "Iron Ore",
"Chemist.Item.Explosive.Usage": "Amount of Explosives Lost When Using",
"Chemist.Item.Grenade.Usage": "Amount of Grenades Lost When Using",
"Chemist.Item.SulfuricAcid.Usage": "Amount of Sulfuric Acid Lost When Using",
"Chemist.Item.MethylamineGas.Usage": "Amount of Methylamine Gas Lost When Using",
"Chemist.AirGainedPerSecond": "Amount of Air Gained Every Second",
"Chemist.WaterGainedPerSecond": "Amount of Water Gained Every Second",
"Chemist.CoalGainedPerTask": "Amount of Coal Gained With Each Task Completed",
"Chemist.IronOreGainedPerTask": "Amount of Iron Ore Gained With Each Task Completed",
"Chemist.CoalGainedPerVent": "Amount of Coal Gained With Venting",
"Chemist.IronOreGainedPerVent": "Amount of Iron Ore Gained With Venting",
"Chemist.AcidPlayersDie": "Acid Players Die",
"Chemist.AcidPlayersDieAfterTime": "Time",
"Chemist.BlindDuration": "Blinding Duration",
+46 -2
View File
@@ -1,4 +1,7 @@
using AmongUs.GameOptions;
using EHR.Modules;
using System.Linq;
using UnityEngine;
namespace EHR.Roles.Impostor
{
@@ -7,10 +10,25 @@ namespace EHR.Roles.Impostor
public static bool On;
public override bool IsEnable => On;
public static OptionItem ParasiteCD;
public static OptionItem ShapeshiftCooldown;
public static OptionItem ShapeshiftDuration;
public static float SSCD;
public static float SSDur;
private float Duration;
public static void SetupCustomOption()
{
Options.SetupSingleRoleOptions(4900, TabGroup.ImpostorRoles, CustomRoles.Parasite);
Options.ParasiteCD = FloatOptionItem.Create(4910, "KillCooldown", new(0f, 180f, 2.5f), 30f, TabGroup.ImpostorRoles)
ParasiteCD = FloatOptionItem.Create(4910, "KillCooldown", new(0f, 180f, 2.5f), 30f, TabGroup.ImpostorRoles)
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Parasite])
.SetValueFormat(OptionFormat.Seconds);
ShapeshiftCooldown = FloatOptionItem.Create(4911, "ShapeshiftCooldown", new(0f, 180f, 1f), 30f, TabGroup.ImpostorRoles)
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Parasite])
.SetValueFormat(OptionFormat.Seconds);
ShapeshiftDuration = FloatOptionItem.Create(4912, "ShapeshiftDuration", new(0f, 180f, 1f), 15f, TabGroup.ImpostorRoles)
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Parasite])
.SetValueFormat(OptionFormat.Seconds);
}
@@ -18,21 +36,47 @@ namespace EHR.Roles.Impostor
public override void Add(byte playerId)
{
On = true;
Duration = float.NaN;
}
public override void Init()
{
On = false;
SSCD = ShapeshiftCooldown.GetFloat();
SSDur = ShapeshiftDuration.GetFloat();
}
public override void SetKillCooldown(byte id)
{
Main.AllPlayerKillCooldown[id] = Options.ParasiteCD.GetFloat();
Main.AllPlayerKillCooldown[id] = ParasiteCD.GetFloat();
}
public override void ApplyGameOptions(IGameOptions opt, byte playerId)
{
opt.SetVision(true);
}
public override void OnPet(PlayerControl pc)
{
PlayerControl target = Main.AllAlivePlayerControls.Where(x => !x.Is(Team.Impostor)).Shuffle(IRandom.Instance).FirstOrDefault();
if (target != null)
{
Duration = SSDur;
pc.RpcShapeshift(target, !Options.DisableAllShapeshiftAnimations.GetBool());
}
}
public override void OnFixedUpdate(PlayerControl pc)
{
if (Duration > 0)
{
Duration -= Time.fixedDeltaTime;
}
if (!float.IsNaN(Duration) && Duration <= 0)
{
pc.RpcShapeshift(pc, !Options.DisableAllShapeshiftAnimations.GetBool());
}
}
}
}
+57 -50
View File
@@ -1,4 +1,5 @@
using AmongUs.GameOptions;
using System;
using AmongUs.GameOptions;
using HarmonyLib;
using System.Collections.Generic;
using System.Linq;
@@ -18,8 +19,8 @@ namespace EHR.Roles.Neutral
private static OptionItem AirGainedPerSecond;
private static OptionItem WaterGainedPerSecond;
private static OptionItem CoalGainedPerTask;
private static OptionItem IronOreGainedPerTask;
private static OptionItem CoalGainedPerVent;
private static OptionItem IronOreGainedPerVent;
private static Dictionary<Item, OptionItem> FinalProductUsageAmounts = [];
@@ -56,10 +57,10 @@ namespace EHR.Roles.Neutral
WaterGainedPerSecond = IntegerOptionItem.Create(++id, "Chemist.WaterGainedPerSecond", new(5, 100, 5), 10, tab)
.SetParent(CustomRoleSpawnChances[CustomRoles.Chemist])
.SetValueFormat(OptionFormat.Times);
CoalGainedPerTask = IntegerOptionItem.Create(++id, "Chemist.CoalGainedPerTask", new(1, 10, 1), 2, tab)
CoalGainedPerVent = IntegerOptionItem.Create(++id, "Chemist.CoalGainedPerVent", new(1, 10, 1), 1, tab)
.SetParent(CustomRoleSpawnChances[CustomRoles.Chemist])
.SetValueFormat(OptionFormat.Times);
IronOreGainedPerTask = IntegerOptionItem.Create(++id, "Chemist.IronOreGainedPerTask", new(1, 50, 1), 8, tab)
IronOreGainedPerVent = IntegerOptionItem.Create(++id, "Chemist.IronOreGainedPerVent", new(1, 50, 1), 4, tab)
.SetParent(CustomRoleSpawnChances[CustomRoles.Chemist])
.SetValueFormat(OptionFormat.Times);
@@ -106,7 +107,9 @@ namespace EHR.Roles.Neutral
_ = new LateTask(() =>
{
FactoryLocations = ShipStatus.Instance.AllRooms
.Zip(EnumHelper.GetAllValues<Factory>())
.Select(x => Translator.GetString($"{x.RoomId}"))
.Distinct()
.Zip(EnumHelper.GetAllValues<Factory>()[1..])
.ToDictionary(x => x.First, x => x.Second);
}, 10f, log: false);
}
@@ -133,6 +136,8 @@ namespace EHR.Roles.Neutral
ItemCounts[item] = 0;
}
ItemCounts[Item.SulfuricAcid] = 30;
if (!AmongUsClient.Instance.AmHost) return;
if (!Main.ResetCamPlayerList.Contains(playerId))
Main.ResetCamPlayerList.Add(playerId);
@@ -200,7 +205,8 @@ namespace EHR.Roles.Neutral
private static readonly Dictionary<Factory, Dictionary<string, (List<(int Count, Item Item)> Ingredients, List<(int Count, Item Item)> Results)>> Processes = new()
{
[Factory.ChemicalPlant] =
[Factory.None] = [],
[Factory.ChemicalPlant] = new()
{
["Synthesis Sulfur"] = ([(60, Item.HydrogenSulfideGas), (40, Item.OxygenGas)], [(3, Item.Sulfur)]),
["Synthesis Of Naphtha"] = ([(150, Item.SynthesisGas), (50, Item.CarbonMonoxide)], [(100, Item.Naphtha)]),
@@ -214,50 +220,49 @@ namespace EHR.Roles.Neutral
["Synthesis Methanol"] = ([(100, Item.CarbonDioxide), (100, Item.HydrogenGas)], [(100, Item.MethanolGas)]),
["Air Separation"] = ([(100, Item.Air)], [(50, Item.OxygenGas), (50, Item.NitrogenGas)])
},
[Factory.AdvancedChemicalPlant] =
[Factory.AdvancedChemicalPlant] = new()
{
["Cracking of Naphtha to Mineral Oil"] = ([(60, Item.Naphtha), (20, Item.ThermalWater), (20, Item.CarbonMonoxide)], [(100, Item.BaseMineralOil)]),
["Coal Cracking Fischer Tropsch Process"] = ([(5, Item.Coal), (50, Item.Steam), (50, Item.OxygenGas)], [(100, Item.SynthesisGas), (20, Item.CarbonDioxide), (30, Item.HydrogenSulfideGas)]),
["Explosives"] = ([(1, Item.Sulfur), (1, Item.Coal), (10, Item.Water)], [(2, Item.Explosive)])
},
[Factory.SteamCracker] =
[Factory.SteamCracker] = new()
{
["Steam Cracking Mineral Oil to Synthesis Gas"] = ([(100, Item.BaseMineralOil), (100, Item.Steam)], [(200, Item.SynthesisGas)])
},
[Factory.BlastFurnace] =
[Factory.BlastFurnace] = new()
{
["Iron Ore Smelting"] = ([(24, Item.IronOre)], [(24, Item.IronIngot)])
},
[Factory.InductionFurnace] =
[Factory.InductionFurnace] = new()
{
["Iron Melting"] = ([(12, Item.IronIngot)], [(120, Item.MoltenIron)])
},
[Factory.CastingMachine] =
[Factory.CastingMachine] = new()
{
["Iron Plate Casting"] = ([(40, Item.MoltenIron)], [(4, Item.IronPlate)])
},
[Factory.Electrolyzer] =
[Factory.Electrolyzer] = new()
{
["Purified Water Electrolysis"] = ([(100, Item.PurifiedWater)], [(40, Item.OxygenGas), (60, Item.HydrogenGas)])
},
[Factory.CoolingTower] =
[Factory.CoolingTower] = new()
{
["Steam Cooling"] = ([(100, Item.Steam)], [(100, Item.PurifiedWater)])
},
[Factory.WaterTreatmentPlant] =
[Factory.WaterTreatmentPlant] = new()
{
["Water Purification"] = ([(150, Item.Water)], [(100, Item.PurifiedWater)]),
["Water Boiling"] = ([(100, Item.Water), (1, Item.Coal)], [(60, Item.Steam)])
},
[Factory.Liquifier] =
[Factory.Liquifier] = new()
{
["Coal Liquefaction"] = ([(1, Item.Coal)], [(50, Item.CarbonDioxide)])
},
[Factory.AssemblingMachine] =
[Factory.AssemblingMachine] = new()
{
["Grenade"] = ([(5, Item.IronPlate), (10, Item.Coal)], [(1, Item.Grenade)])
},
[Factory.None] = []
}
};
static ItemType GetItemType(Item item) => item switch
@@ -293,7 +298,7 @@ namespace EHR.Roles.Neutral
static Color GetItemColor(Item item) => item switch
{
Item.Air => Palette.White_75Alpha,
Item.Air => Palette.HalfWhite,
Item.AmmoniaGas => Color.blue,
Item.BaseMineralOil => Color.green,
Item.CarbonDioxide => Palette.Brown,
@@ -313,7 +318,7 @@ namespace EHR.Roles.Neutral
Item.NitrogenGas => Color.blue,
Item.OxygenGas => Color.red,
Item.PurifiedWater => Color.cyan,
Item.Steam => Palette.HalfWhite,
Item.Steam => Palette.White_75Alpha,
Item.Sulfur => Color.yellow,
Item.SulfurDioxideGas => Color.yellow,
Item.SulfuricAcid => Color.yellow,
@@ -324,7 +329,7 @@ namespace EHR.Roles.Neutral
_ => Color.white
};
private static Dictionary<PlainShipRoom, Factory> FactoryLocations = [];
private static Dictionary<string, Factory> FactoryLocations = [];
public PlayerControl ChemistPC;
private long LastUpdate;
@@ -383,7 +388,7 @@ namespace EHR.Roles.Neutral
{
Main.AllAlivePlayerControls
.ExceptBy(acidPlayers.OtherAcidPlayers, x => x.PlayerId)
.Where(x => x.PlayerId != pc.PlayerId && Vector2.Distance(x.Pos(), pos) < 1.5f)
.Where(x => x.PlayerId != pc.PlayerId && x.PlayerId != ChemistPC.PlayerId && Vector2.Distance(x.Pos(), pos) < 1.5f)
.Do(x => acidPlayers.OtherAcidPlayers.Add(x.PlayerId));
}
@@ -393,7 +398,7 @@ namespace EHR.Roles.Neutral
float radius = GrenadeExplodeRadius.GetFloat();
Main.AllAlivePlayerControls
.Where(x => Vector2.Distance(x.Pos(), pos) < radius && ChemistPC.RpcCheckAndMurder(x, check: true))
.Where(x => x.PlayerId != ChemistPC.PlayerId && Vector2.Distance(x.Pos(), pos) < radius && ChemistPC.RpcCheckAndMurder(x, check: true))
.Do(x => x.Suicide(realKiller: ChemistPC));
}
}
@@ -421,6 +426,14 @@ namespace EHR.Roles.Neutral
}
}
public override void OnExitVent(PlayerControl pc, Vent vent)
{
ItemCounts[Item.Coal] += CoalGainedPerVent.GetInt();
ItemCounts[Item.IronOre] += IronOreGainedPerVent.GetInt();
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
}
public override bool CheckReportDeadBody(PlayerControl reporter, GameData.PlayerInfo target, PlayerControl killer)
{
if (BombedBodies.Contains(target.PlayerId) && ChemistPC.RpcCheckAndMurder(reporter, check: true))
@@ -465,13 +478,13 @@ namespace EHR.Roles.Neutral
if (!GameStates.IsInTask || !pc.IsAlive() || LastUpdate >= Utils.TimeStamp) return;
LastUpdate = Utils.TimeStamp;
ItemCounts[Item.Air] += AirGainedPerSecond.GetInt();
ItemCounts[Item.Water] += WaterGainedPerSecond.GetInt();
if (ItemCounts[Item.Air] < 900) ItemCounts[Item.Air] += AirGainedPerSecond.GetInt();
if (ItemCounts[Item.Water] < 900) ItemCounts[Item.Water] += WaterGainedPerSecond.GetInt();
var beforeFactory = CurrentFactory;
var room = pc.GetPlainShipRoom();
CurrentFactory = FactoryLocations.GetValueOrDefault(room);
CurrentFactory = FactoryLocations.GetValueOrDefault(Translator.GetString($"{room.RoomId}"));
if (CurrentFactory != beforeFactory)
{
@@ -517,24 +530,17 @@ namespace EHR.Roles.Neutral
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
}
public override void OnTaskComplete(PlayerControl pc, int completedTaskCount, int totalTaskCount)
{
if (!pc.IsAlive()) return;
ItemCounts[Item.Coal] += CoalGainedPerTask.GetInt();
ItemCounts[Item.IronOre] += IronOreGainedPerTask.GetInt();
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
}
public static string GetSuffix(PlayerControl seer, PlayerControl target)
public static string GetSuffix(PlayerControl seer, PlayerControl target, bool hud = false)
{
if (Main.PlayerStates[seer.PlayerId].Role is not Chemist cm) return string.Empty;
if (seer.PlayerId == target.PlayerId)
{
var sb = new StringBuilder().Append("<size=80%>");
bool self = seer.PlayerId == target.PlayerId;
if (self && seer.IsModClient() && !hud) return string.Empty;
var sb = new StringBuilder().Append("<size=80%>");
if (self)
{
var grouped = cm.ItemCounts
.Where(x => x.Value > 0)
.GroupBy(x => GetItemType(x.Key))
@@ -549,7 +555,7 @@ namespace EHR.Roles.Neutral
foreach ((Item item, int count) in items)
{
sb.Append(Utils.ColorString(GetItemColor(item), $"{count} {GetChemicalForm(item)}, "));
sb.Append(Utils.ColorString(GetItemColor(item), $"{Utils.ColorString(FinalProductUsageAmounts.TryGetValue(item, out var opt) && opt.GetInt() <= count ? Color.green : Color.white, $"{count}")} {GetChemicalForm(item)}") + ", ");
}
sb.Length -= 2;
@@ -560,13 +566,13 @@ namespace EHR.Roles.Neutral
(List<(int Count, Item Item)> Ingredients, List<(int Count, Item Item)> Results) = Processes[cm.CurrentFactory][cm.SelectedProcess];
sb.Append(string.Join(", ", Ingredients.Select(x => $"{x.Count} {GetChemicalForm(x.Item)}")));
sb.Append('\u2192');
sb.Append(string.Join(", ", Results.Select(x => $"{x.Count} {GetChemicalForm(x.Item)}")));
return sb.Append("</size>").ToString();
Func<(int Count, Item Item), string> selector = x => $"{x.Count} {Utils.ColorString(GetItemColor(x.Item), $"{GetChemicalForm(x.Item)}")}";
sb.Append(string.Join(", ", Ingredients.Select(selector)));
sb.Append(Ingredients.Count + Results.Count > 2 ? "\n\u2192 " : " → ");
sb.Append(string.Join(", ", Results.Select(selector)));
}
else if ((AcidPlayersDieOptions)AcidPlayersDie.GetValue() == AcidPlayersDieOptions.AfterTime)
if ((AcidPlayersDieOptions)AcidPlayersDie.GetValue() == AcidPlayersDieOptions.AfterTime)
{
int time = AcidPlayersDieAfterTime.GetInt();
long now = Utils.TimeStamp;
@@ -574,12 +580,13 @@ namespace EHR.Roles.Neutral
{
if (kvp.Key == target.PlayerId || kvp.Value.OtherAcidPlayers.Contains(target.PlayerId))
{
return Utils.ColorString(Color.yellow, $"\u26a0 {time - (now - kvp.Value.TimeStamp):N0}");
sb.Append(Utils.ColorString(Color.yellow, $"\u26a0 {time - (now - kvp.Value.TimeStamp):N0}"));
break;
}
}
}
return string.Empty;
return sb.Append("</size>").ToString();
}
}
}