Skip to content

Commit

Permalink
Merge branch 'MultiplayerLite' of https://github.com/Zingabopp/BeatSa…
Browse files Browse the repository at this point in the history
…berMultiplayer into MultiplayerLite
  • Loading branch information
Zingabopp committed Jan 22, 2020
2 parents cd895df + da0a894 commit 2b9e335
Show file tree
Hide file tree
Showing 21 changed files with 656 additions and 217 deletions.
4 changes: 2 additions & 2 deletions BeatSaberMultiplayer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Global
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.Release|Any CPU.Build.0 = Release|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.ReleaseDiscord|Any CPU.ActiveCfg = ReleaseDiscord|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.ReleaseDiscord|Any CPU.Build.0 = ReleaseDiscord|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.ReleaseDiscord|Any CPU.ActiveCfg = Release|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.ReleaseDiscord|Any CPU.Build.0 = Release|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.ServerDebug|Any CPU.ActiveCfg = Debug|Any CPU
{19E76954-2EBA-4761-8AD4-1425CC29EC0E}.ServerRelease|Any CPU.ActiveCfg = Release|Any CPU
{5EB8EED4-4FC1-4ABD-B9E9-0EDB0CAEB7A1}.AllDebug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
52 changes: 14 additions & 38 deletions BeatSaberMultiplayer/BeatSaberMultiplayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseDiscord|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ReleaseDiscord\</OutputPath>
<DefineConstants>TRACE;UNITY_STANDALONE; UMBRA_FIX_SCORESABER;DISCORDCORE</DefineConstants>
<DebugType>portable</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>7.3</LangVersion>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="AvatarController.cs" />
<Compile Include="Client.cs" />
Expand All @@ -56,6 +47,14 @@
<Compile Include="Data\ServerRepository.cs" />
<Compile Include="Data\SongInfo.cs" />
<Compile Include="Data\LevelOptionsInfo.cs" />
<Compile Include="DiscordInterface\ActivityStructs.cs" />
<Compile Include="DiscordInterface\DiscordInterop.cs" />
<Compile Include="DiscordInterface\DiscordJoinRequest.cs" />
<Compile Include="DiscordInterface\DiscordUser.cs" />
<Compile Include="DiscordInterface\IActivityRequest.cs" />
<Compile Include="DiscordInterface\IDiscordInstance.cs" />
<Compile Include="DiscordInterface\IUserInfo.cs" />
<Compile Include="DiscordInterface\PresenceLoader.cs" />
<Compile Include="InGameOnlineController.cs" />
<Compile Include="IPlayerInfoReceiver.cs" />
<Compile Include="Misc\ControllersHelper.cs" />
Expand Down Expand Up @@ -117,24 +116,6 @@
<Compile Include="Data\VoipFragment.cs" />
<Compile Include="VOIP\VoipListener.cs" />
</ItemGroup>
<Choose>
<When Condition="'$(Configuration)|$(Platform)' == 'ReleaseDiscord|AnyCPU'">
<ItemGroup>
<EmbeddedResource Include="manifest_discord.json">
<LogicalName>$(RootNamespace).manifest.json</LogicalName>
</EmbeddedResource>
<None Include="manifest_original.json"/>
</ItemGroup>
</When>
<When Condition="'$(Configuration)|$(Platform)' != 'ReleaseDiscord|AnyCPU'">
<ItemGroup>
<EmbeddedResource Include="manifest_original.json">
<LogicalName>$(RootNamespace).manifest.json</LogicalName>
</EmbeddedResource>
<None Include="manifest_discord.json"/>
</ItemGroup>
</When>
</Choose>
<ItemGroup>
<EmbeddedResource Include="Assets\Shader.asset" />
<EmbeddedResource Include="UI\SettingsView.bsml">
Expand Down Expand Up @@ -163,6 +144,7 @@
<DependentUpon>RoomListViewController.cs</DependentUpon>
</EmbeddedResource>
<None Include="BuildTargets.targets" />
<EmbeddedResource Include="manifest.json" />
<None Include="packages.config" />
<EmbeddedResource Include="UI\ViewControllers\CreateRoomScreen\MainRoomCreationViewController.bsml">
<DependentUpon>MainRoomCreationViewController.cs</DependentUpon>
Expand Down Expand Up @@ -217,18 +199,12 @@
<ItemGroup>
<EmbeddedResource Include="Assets\DoubleArrowIcon.png" />
</ItemGroup>
<Choose>
<When Condition="'$(Configuration)|$(Platform)' == 'ReleaseDiscord|AnyCPU'">
<ItemGroup>
<Reference Include="DiscordCore, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Refs\DiscordCore.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<ItemGroup>
<Reference Include="DiscordCore, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Refs\DiscordCore.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony.1.2.0.1">
<HintPath>..\Refs\0Harmony.1.2.0.1.dll</HintPath>
<Private>False</Private>
Expand Down
9 changes: 2 additions & 7 deletions BeatSaberMultiplayer/BuildTargets.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@
</GetCommitHash>
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll" DestinationFiles="$(OutputPath)Final\Plugins\$(AssemblyName).dll" />
<Copy SourceFiles="$(OutputPath)$(AssemblyName).pdb" DestinationFiles="$(OutputPath)Final\Plugins\$(AssemblyName).pdb" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseDiscord|AnyCPU'">
<ManifestName>manifest_discord.json</ManifestName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' != 'ReleaseDiscord|AnyCPU'">
<ManifestName>manifest_original.json</ManifestName>
</PropertyGroup>
<GetManifestInfo ManifestName="$(ManifestName)">

<GetManifestInfo ManifestName="manifest.json">
<Output TaskParameter="PluginVersion" PropertyName="PluginVersion" />
<Output TaskParameter="GameVersion" PropertyName="GameVersion" />
<Output TaskParameter="AssemblyVersion" PropertyName="AssemblyVersion" />
Expand Down
77 changes: 77 additions & 0 deletions BeatSaberMultiplayer/DiscordInterface/ActivityStructs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BeatSaberMultiplayerLite.DiscordInterface
{

public struct GameActivity
{
public string Source;
public GameActivityType Type;
public long ApplicationId;
public string Name;
public string State;
public string Details;
public GameActivityTimestamps Timestamps;
public GameActivityAssets Assets;
public GameActivityParty Party;
public GameActivitySecrets Secrets;
public bool Instance;
}

public enum GameActivityType
{
Playing = 0,
Streaming = 1,
Listening = 2,
Watching = 3
}

public enum GameActivityRequestReply
{
No = 0,
Yes = 1,
Ignore = 2
}
public enum GameActivityActionType
{
Join = 1,
Spectate = 2
}

public struct GameActivityTimestamps
{
public long Start;
public long End;
}

public struct GameActivityAssets
{
public string LargeImage;
public string LargeText;
public string SmallImage;
public string SmallText;
}

public struct GameActivityParty
{
public string Id;
public GamePartySize Size;
}

public struct GamePartySize
{
public int CurrentSize;
public int MaxSize;
}

public struct GameActivitySecrets
{
public string Match;
public string Join;
public string Spectate;
}
}
Loading

0 comments on commit 2b9e335

Please sign in to comment.