Skip to content

Commit

Permalink
new fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtraJuiceMan committed Sep 3, 2018
1 parent 78b521b commit b262601
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions CopiedLobbyMess/CopiedLobbyMess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,18 @@ protected override void Load()

#region Functions
public static int GetWorkshopCount() =>
(String.Join(",", Provider.serverWorkshopFileIDs.Select(x => x.ToString()).ToArray()).Length - 1) / 120 + 1;
(String.Join(",", Provider.getServerWorkshopFileIDs().Select(x => x.ToString()).ToArray()).Length - 1) / 120 + 1;

public static int GetConfigurationCount() =>
(String.Join(",", typeof(ModeConfigData).GetFields()
.SelectMany(x => x.GetValue(Provider.modeConfigData).GetType().GetFields().Select(y => y.GetValue(x.GetValue(Provider.modeConfigData))))
.SelectMany(x => x.FieldType.GetFields().Select(y => y.GetValue(x.GetValue(Provider.modeConfigData))))
.Select(x => x is bool v ? v ? "T" : "F" : (String.Empty + x)).ToArray()).Length - 1) / 120 + 1;


public void OnPostLevelLoaded(int xd) => ModifyLobbyInfo();

private void ModifyLobbyInfo()
{
bool workshop = Provider.serverWorkshopFileIDs.Count > 0;
bool workshop = Provider.getServerWorkshopFileIDs().Count > 0;

#region Workshop
if (Configuration.Instance.HideWorkshop)
Expand Down Expand Up @@ -140,7 +139,7 @@ private void ModifyLobbyInfo()
SteamGameServer.SetBotPlayerCount(1);
if (!Configuration.Instance.HidePlugins && !Configuration.Instance.MessPlugins)
SteamGameServer.SetKeyValue("rocketplugins", string.Join(",", R.Plugins.GetPlugins().Select(p => p.Name).ToArray()));
string version = ModuleHook.modules.FirstOrDefault(a => a.config.Name == "Rocket.Unturned")?.config.Version ?? "0.0.0.69";
string version = ModuleHook.modules.Find(a => a.config.Name == "Rocket.Unturned")?.config.Version ?? "0.0.0.69";
SteamGameServer.SetKeyValue("rocket", version);
}
#endregion
Expand Down
5 changes: 3 additions & 2 deletions CopiedLobbyMess/CopiedLobbyMess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\Libraries\Assembly-CSharp.dll</HintPath>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Unity\Editor\stm\steamapps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\Libraries\Assembly-CSharp-firstpass.dll</HintPath>
Expand Down

0 comments on commit b262601

Please sign in to comment.