fix issues

This commit is contained in:
Gurge44 committed 2026-10-04 11:35:18 +02:00
1 parent 1461403589
commit ed6ebed013
9 files changed
+28 -234

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@
<Target Name="Roles" AfterTargets="Build">
<Copy SourceFiles="CustomRoles.cs" DestinationFolder="CTA/CustomTeamAssigner/"/>
</Target>
<Target Name="Copy" AfterTargets="Build" Condition="'$(AmongUs)' != '' And '$(Configuration)' == 'Debug'">
<Target Name="Copy" AfterTargets="Build" Condition="'$(AmongUs)' != '' And Exists('local.props')">
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll" DestinationFolder="$(AmongUs)/BepInEx/plugins/"/>
</Target>
</Project>
-7
View File
@@ -1,7 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura>
<IncludeAssemblies>
Csv
</IncludeAssemblies>
</Costura>
</Weavers>
-188
View File
@@ -1,188 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of
"embed all Copy Local references", delimited with line breaks
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of
"embed all Copy Local references", delimited with line breaks.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default
action of "embed all Copy Local references", delimited with line breaks
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default
action of "embed all Copy Local references", delimited with line breaks.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited
with line breaks.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited
with line breaks.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory.
This is helpful for some scenarios that expected an assembly to be loaded from a
physical file.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls whether the runtime assemblies are embedded with their full
path or only with their assembly name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when
they are loaded. You can turn compression off with this option.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part
of the build. This cleanup can be turned off.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization.
This flag disables that behavior. Make sure you call CosturaUtility.Initialize()
somewhere in your code.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like
'resources.dll' as a satellite resource and prepend the output path. This flag
disables that behavior.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed
all Copy Local references", delimited with |
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed
all Copy Local references", delimited with |.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of
"embed all Copy Local references", delimited with |
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of
"embed all Copy Local references", delimited with |.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with
|.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with
|.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all
weavers have been executed.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly
verification.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
-6
View File
@@ -980,12 +980,6 @@ public class Main : BaseUnityPlugin
handler.Info($"{nameof(ThisAssembly.Git.Sha)}: {ThisAssembly.Git.Sha}");
handler.Info($"{nameof(ThisAssembly.Git.Tag)}: {ThisAssembly.Git.Tag}");
/*
NormalGameOptionsV12.RecommendedImpostors = NormalGameOptionsV12.MaxImpostors = Enumerable.Repeat(128, 128).ToArray();
NormalGameOptionsV12.MinPlayers = Enumerable.Repeat(4, 128).ToArray();
HideNSeekGameOptionsV12.MinPlayers = Enumerable.Repeat(4, 128).ToArray();
*/
PrivateTagManager.LoadTagsFromFile();
Harmony.PatchAll(Assembly.GetExecutingAssembly());
+7 -1
View File
@@ -58,7 +58,7 @@ static class ChatControllerAwakePatch
{
while (__instance)
{
if (__instance.IsOpenOrOpening)
if (__instance.State is ChatControllerState.Open or ChatControllerState.Opening or ChatControllerState.Closing)
{
__instance.freeChatField.background.color = DarkBackgroundColor;
@@ -72,6 +72,12 @@ static class ChatControllerAwakePatch
if (OpenKeyboardIcon) OpenKeyboardIcon.sprite = Utils.LoadSprite("EHR.Resources.Images.DarkKeyboard.png", 100f);
}
if (!Main.DarkTheme.Value)
{
__instance.freeChatField.textArea.outputText.color = Color.black;
yield break;
}
yield return null;
}
}
+15
View File
@@ -21,6 +21,21 @@ internal static class Crowded
public static readonly int MaxImpostors = GameOptionsManager.Instance.currentHostOptions.MaxPlayers / 2;
private static int MaxPlayers => CurrentServerType == ServerType.Vanilla ? 15 : 127;
[HarmonyPatch(typeof(CreateGameOptions), nameof(CreateGameOptions.Confirm))]
public static class CreateGameOptionsConfirm
{
public static bool Prefix(CreateGameOptions __instance)
{
if (!DestroyableSingleton<MatchMaker>.Instance.Connecting(__instance)) return false;
__instance.logger.Info("Hosting an online game");
// - skip player count and impostor count checks -
GameOptionsManager.Instance.GameHostOptions.TryGetInt(Int32OptionNames.NumImpostors, out int num);
if (num == 0) GameOptionsManager.Instance.GameHostOptions.SetInt(Int32OptionNames.NumImpostors, 1);
__instance.CoStartGame();
return false;
}
}
[HarmonyPatch(typeof(CreateOptionsPicker), nameof(CreateOptionsPicker.Awake))]
public static class CreateOptionsPickerAwake
{
+1 -30
View File
@@ -273,35 +273,6 @@ Click this badge to view our translation project:
### Translation progress
[![Crowdin](https://badges.awesome-crowdin.com/translation-15788979-676754.png)](https://crowdin.com/project/ehr)
<br>
## Should I switch from TOHE to EHR?
- In comparison, both mods are great, but EHR has more roles, features, game modes, and settings.
- Moreover, EHR contains almost all the roles from TOHE, so you won't be missing out on anything.
- Some roles were deleted or reworked to make them more balanced or to make them fit better with the new roles.
- If you switch to EHR, you will have access to all features without paying for anything.
- Test builds are available for free in our Discord server, and you can report bugs and suggest features there as well.
- /up was reworked to /setrole, allowing you to set anyone's role for the next game, not only yours.
- You can fully gain access to /setrole by just hosting EHR lobbies weekly or uploading EHR content to YouTube, but
everyone can use /setrole to set their own role without any requirements (essentially /up).
- EHR has a Custom Team Assigner application, which is a unique feature that no other mod has.
- You can force or ban certain role/add-on combinations directly in the game using /combo.
- Not sure how to use commands? Use /help to see a list of all available commands.
- EHR helps the host use commands by directly displaying their short descriptions, arguments, descriptions for all
arguments, and checking whether an argument is valid or not.
- You can also press TAB to autocomplete commands.
- Some hints and tips are displayed during the loading screen and ejection animations, which can help you discover new
features.
- EHR has 16 unique custom game modes, which can be played with any number of players, some even alone.
- You can make lobbies with more than 15 players on modded servers, just type /cs players 100 - for example - to set the
player limit to 100.
- I, the main developer of EHR, care about user feedback and suggestions, and I try to implement them as much as
possible.
- If this wasn't convincing enough, you can always try EHR and see if you like it better than TOHE.
- In the end, it's your choice, and I respect it.
#### There are more game changing features, which you can find on our website: [EHR Wiki](https://ehr-wiki.gurge44.eu/)
<br>
@@ -618,7 +589,7 @@ Click this badge to view our translation project:
# License for the Custom Team Assigner application (everything inside the `CTA` folder)
```
Copyright (c) 2025, Gurge44
Copyright (c) 2026, Gurge44
All rights reserved.
+4 -1
View File
@@ -52,7 +52,9 @@ public class Perplexer : RoleBase
public override bool OnShapeshift(PlayerControl shapeshifter, PlayerControl target, bool shapeshifting)
{
if (shapeshifting && MarkedId == byte.MaxValue && target.IsAlive() && shapeshifter.GetAbilityUseLimit() >= 1f)
if (!shapeshifting) return true;
if (MarkedId == byte.MaxValue && target.IsAlive() && shapeshifter.GetAbilityUseLimit() >= 1f)
{
MarkedId = target.PlayerId;
Main.AllPlayerSpeed[MarkedId] *= -1;
@@ -66,6 +68,7 @@ public class Perplexer : RoleBase
if (target && target.IsAlive()) target.MarkDirtySettings();
}, AbilityDuration.GetFloat(), "Perplexer Revert Control Invert");
}
return false;
}
}