Compare commits

..

2 Commits

Author SHA1 Message Date
ivan tkachenko 766e393a58 Add LethalConfig with suitable custom options
The custom callback attempts to prevent modifications mid-round. Use
IsHost to check for permissions, as IsClient is always true for
everyone even in local single-player setting.

There is a bug in LethalConfig which makes it possible to modify entries
bypassing the callback once per round, but it is pretty hard to abuse:
https://github.com/AinaVT/LethalConfig/issues/60
2025-07-12 16:56:58 +03:00
ivan tkachenko 26fb620173 Add config synchronization via CSync
It only synchronizes from host to clients.
2025-07-12 02:11:32 +03:00
2 changed files with 1 additions and 5 deletions

View File

@ -15,10 +15,7 @@
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*"/> <PackageReference Include="BepInEx.PluginInfoProps" Version="1.*"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.9" IncludeAssets="compile"/> <PackageReference Include="UnityEngine.Modules" Version="2022.3.9" IncludeAssets="compile"/>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" /> <PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" />
<!-- <!-- Publicize internal methods, so we could generate config entries for tracks at runtime instead of generating code at compile time -->
Publicize internal methods, so we could generate config entries for tracks at runtime instead
of generating code at compile time. See https://github.com/lc-sigurd/CSync/issues/11
-->
<PackageReference Include="Sigurd.BepInEx.CSync" Version="5.0.1" Publicize="true" /> <PackageReference Include="Sigurd.BepInEx.CSync" Version="5.0.1" Publicize="true" />
<PackageReference Include="AinaVT-LethalConfig" Version="1.4.6" /> <PackageReference Include="AinaVT-LethalConfig" Version="1.4.6" />
</ItemGroup> </ItemGroup>

View File

@ -313,7 +313,6 @@ namespace MuzikaGromche
} }
// HACK because CSync doesn't provide an API to register a list of config entries // HACK because CSync doesn't provide an API to register a list of config entries
// See https://github.com/lc-sigurd/CSync/issues/11
foreach (var track in Plugin.Tracks) foreach (var track in Plugin.Tracks)
{ {
// This is basically what ConfigFile.PopulateEntryContainer does // This is basically what ConfigFile.PopulateEntryContainer does