mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 13:25:51 +00:00
0.3.5
This commit is contained in:
@@ -192,7 +192,7 @@ namespace server
|
|||||||
}
|
}
|
||||||
if (Url == "images/v2/named")
|
if (Url == "images/v2/named")
|
||||||
{
|
{
|
||||||
s = ImagesV2Named;
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
||||||
{
|
{
|
||||||
@@ -278,7 +278,11 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||||
}
|
}
|
||||||
if (rawUrl == "//api/images/v4/uploadtransient?gameSessionId=2018")
|
if (Url == "gamesessions/v2/create")
|
||||||
|
{
|
||||||
|
s = gamesessions2018.GameSessions.Create(text);
|
||||||
|
}
|
||||||
|
if (rawUrl.Contains("images/v4/uploadtransient?gameSessionId=2018"))
|
||||||
{
|
{
|
||||||
File.WriteAllBytes("SaveData\\Images\\image" + Convert.ToString(int.Parse(File.ReadAllText("SaveData\\Images\\count.txt") + 1)) + ".png", Encoding.UTF8.GetBytes(text.Remove(0, 50).Remove(text.Length - 48, 48)));
|
File.WriteAllBytes("SaveData\\Images\\image" + Convert.ToString(int.Parse(File.ReadAllText("SaveData\\Images\\count.txt") + 1)) + ".png", Encoding.UTF8.GetBytes(text.Remove(0, 50).Remove(text.Length - 48, 48)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,17 +11,21 @@ namespace gamesessions2018
|
|||||||
// Token: 0x060000BE RID: 190 RVA: 0x00004C08 File Offset: 0x00002E08
|
// Token: 0x060000BE RID: 190 RVA: 0x00004C08 File Offset: 0x00002E08
|
||||||
public static string JoinRandom(string jsonData)
|
public static string JoinRandom(string jsonData)
|
||||||
{
|
{
|
||||||
|
long gamesessionid = 2018L;
|
||||||
bool sandboxmode = false;
|
bool sandboxmode = false;
|
||||||
GameSessions.JoinRandomRequest joinRandomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRandomRequest>(jsonData);
|
GameSessions.JoinRandomRequest joinRandomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRandomRequest>(jsonData);
|
||||||
if (File.ReadAllText("SaveData\\App\\sandbox.txt") == "Enabled")
|
if (File.ReadAllText("SaveData\\App\\sandbox.txt") == "Enabled")
|
||||||
{
|
{
|
||||||
sandboxmode = true;
|
sandboxmode = true;
|
||||||
}
|
}
|
||||||
|
if (File.ReadAllText("SaveData\\App\\privatedorm.txt") == "Enabled")
|
||||||
|
{
|
||||||
|
gamesessionid = new Random().Next(0, 100);
|
||||||
|
}
|
||||||
{
|
{
|
||||||
Config.localGameSession = new GameSessions.SessionInstance
|
Config.localGameSession = new GameSessions.SessionInstance
|
||||||
{
|
{
|
||||||
GameSessionId = 2018L,
|
GameSessionId = gamesessionid,
|
||||||
RegionId = "us",
|
RegionId = "us",
|
||||||
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
||||||
RecRoomId = null,
|
RecRoomId = null,
|
||||||
@@ -38,7 +42,6 @@ namespace gamesessions2018
|
|||||||
IsFull = false
|
IsFull = false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
||||||
{
|
{
|
||||||
Result = 0,
|
Result = 0,
|
||||||
@@ -61,13 +64,12 @@ namespace gamesessions2018
|
|||||||
// Token: 0x060000C0 RID: 192 RVA: 0x00004D24 File Offset: 0x00002F24
|
// Token: 0x060000C0 RID: 192 RVA: 0x00004D24 File Offset: 0x00002F24
|
||||||
public static string Create(string jsonData)
|
public static string Create(string jsonData)
|
||||||
{
|
{
|
||||||
Console.WriteLine("[API][GameSession] Creating Room...");
|
Console.WriteLine("Custom Room Test...");
|
||||||
GameSessions.CreateRequest createRequest = JsonConvert.DeserializeObject<GameSessions.CreateRequest>(jsonData);
|
GameSessions.CreateRequest createRequest = JsonConvert.DeserializeObject<GameSessions.CreateRequest>(jsonData);
|
||||||
|
|
||||||
{
|
{
|
||||||
Config.localGameSession = new GameSessions.SessionInstance
|
Config.localGameSession = new GameSessions.SessionInstance
|
||||||
{
|
{
|
||||||
GameSessionId = 2017L,
|
GameSessionId = 1L,
|
||||||
RegionId = "us",
|
RegionId = "us",
|
||||||
RoomId = createRequest.ActivityLevelIds,
|
RoomId = createRequest.ActivityLevelIds,
|
||||||
RecRoomId = null,
|
RecRoomId = null,
|
||||||
@@ -84,7 +86,6 @@ namespace gamesessions2018
|
|||||||
IsFull = false
|
IsFull = false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
||||||
{
|
{
|
||||||
Result = 0,
|
Result = 0,
|
||||||
@@ -272,25 +273,13 @@ namespace gamesessions2018
|
|||||||
// Token: 0x02000025 RID: 37
|
// Token: 0x02000025 RID: 37
|
||||||
public class CreateRequest
|
public class CreateRequest
|
||||||
{
|
{
|
||||||
// Token: 0x17000055 RID: 85
|
public bool IsSandbox { get; set; }
|
||||||
// (get) Token: 0x060000F2 RID: 242 RVA: 0x0000271C File Offset: 0x0000091C
|
|
||||||
// (set) Token: 0x060000F3 RID: 243 RVA: 0x00002724 File Offset: 0x00000924
|
|
||||||
public string ActivityLevelIds { get; set; }
|
public string ActivityLevelIds { get; set; }
|
||||||
|
|
||||||
// Token: 0x17000056 RID: 86
|
|
||||||
// (get) Token: 0x060000F4 RID: 244 RVA: 0x0000272D File Offset: 0x0000092D
|
|
||||||
// (set) Token: 0x060000F5 RID: 245 RVA: 0x00002735 File Offset: 0x00000935
|
|
||||||
public ulong[] ExpectedPlayerIds { get; set; }
|
public ulong[] ExpectedPlayerIds { get; set; }
|
||||||
|
|
||||||
// Token: 0x17000057 RID: 87
|
|
||||||
// (get) Token: 0x060000F6 RID: 246 RVA: 0x0000273E File Offset: 0x0000093E
|
|
||||||
// (set) Token: 0x060000F7 RID: 247 RVA: 0x00002746 File Offset: 0x00000946
|
|
||||||
public GameSessions.RegionPing[] RegionPings { get; set; }
|
public GameSessions.RegionPing[] RegionPings { get; set; }
|
||||||
|
|
||||||
// Token: 0x17000058 RID: 88
|
|
||||||
// (get) Token: 0x060000F8 RID: 248 RVA: 0x0000274F File Offset: 0x0000094F
|
|
||||||
// (set) Token: 0x060000F9 RID: 249 RVA: 0x00002757 File Offset: 0x00000957
|
|
||||||
public bool IsSandbox { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Token: 0x02000026 RID: 38
|
// Token: 0x02000026 RID: 38
|
||||||
|
|||||||
@@ -3,6 +3,16 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
<ApplicationIcon>icon2.ico</ApplicationIcon>
|
||||||
|
<AssemblyName>OpenRec</AssemblyName>
|
||||||
|
<RootNamespace>OpenRec</RootNamespace>
|
||||||
|
<Authors>recroom2016</Authors>
|
||||||
|
<PackageIcon>icon2.png</PackageIcon>
|
||||||
|
<PackageIconUrl />
|
||||||
|
<RepositoryUrl>https://github.com/recroom2016/OpenRec</RepositoryUrl>
|
||||||
|
<PackageProjectUrl>https://discord.gg/daC8QUhnFP</PackageProjectUrl>
|
||||||
|
<Company>OpenRec</Company>
|
||||||
|
<Version>0.4.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -15,4 +25,11 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="C:\Users\Tucker\Downloads\icon2.png">
|
||||||
|
<Pack>True</Pack>
|
||||||
|
<PackagePath></PackagePath>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
23
Program.cs
23
Program.cs
@@ -16,6 +16,7 @@ namespace start
|
|||||||
goto Start;
|
goto Start;
|
||||||
|
|
||||||
Start:
|
Start:
|
||||||
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
Console.WriteLine("OpenRec - Open source RecNet server software. (Version: " + version + ")");
|
Console.WriteLine("OpenRec - Open source RecNet server software. (Version: " + version + ")");
|
||||||
Console.WriteLine("Made and provided by RecRoom 2016.");
|
Console.WriteLine("Made and provided by RecRoom 2016.");
|
||||||
Console.WriteLine("Download source code here: https://github.com/recroom2016/OpenRec");
|
Console.WriteLine("Download source code here: https://github.com/recroom2016/OpenRec");
|
||||||
@@ -31,8 +32,8 @@ namespace start
|
|||||||
Console.Clear();
|
Console.Clear();
|
||||||
goto Settings;
|
goto Settings;
|
||||||
|
|
||||||
Settings:
|
Settings: //SaveData\\App\\privatedorm.txt
|
||||||
Console.WriteLine("1) Sandbox Mode: " + File.ReadAllText("SaveData\\App\\sandbox.txt") + Environment.NewLine + "2) Go Back");
|
Console.WriteLine("1) Sandbox Mode: " + File.ReadAllText("SaveData\\App\\sandbox.txt") + Environment.NewLine + "2) Private Dorm: " + File.ReadAllText("SaveData\\App\\privatedorm.txt") + Environment.NewLine + "3) Go Back");
|
||||||
string readline4 = Console.ReadLine();
|
string readline4 = Console.ReadLine();
|
||||||
if (readline4 == "1")
|
if (readline4 == "1")
|
||||||
{
|
{
|
||||||
@@ -49,6 +50,20 @@ namespace start
|
|||||||
goto Settings;
|
goto Settings;
|
||||||
}
|
}
|
||||||
else if (readline4 == "2")
|
else if (readline4 == "2")
|
||||||
|
{
|
||||||
|
if (File.ReadAllText("SaveData\\App\\privatedorm.txt") == "Disabled")
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\privatedorm.txt", "Enabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\privatedorm.txt", "Disabled");
|
||||||
|
}
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine("Success!");
|
||||||
|
goto Settings;
|
||||||
|
}
|
||||||
|
else if (readline4 == "3")
|
||||||
{
|
{
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
goto Start;
|
goto Start;
|
||||||
@@ -139,7 +154,7 @@ namespace start
|
|||||||
}
|
}
|
||||||
if (readline == "3")
|
if (readline == "3")
|
||||||
{
|
{
|
||||||
Console.WriteLine("Please select the version of RecRoom the server should host: (2018)");
|
Console.WriteLine("Please select the version of RecRoom the server should host: (2017, 2018)");
|
||||||
string readline2 = Console.ReadLine();
|
string readline2 = Console.ReadLine();
|
||||||
if (readline2 == "2016")
|
if (readline2 == "2016")
|
||||||
{
|
{
|
||||||
@@ -170,7 +185,7 @@ namespace start
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string version = "0.3";
|
public static string version = "0.3.5";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
4
Setup.cs
4
Setup.cs
@@ -54,6 +54,10 @@ namespace start
|
|||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\App\\sandbox.txt", "Disabled");
|
File.WriteAllText("SaveData\\App\\sandbox.txt", "Disabled");
|
||||||
}
|
}
|
||||||
|
if (!(File.Exists("SaveData\\App\\privatedorm.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\privatedorm.txt", "Disabled");
|
||||||
|
}
|
||||||
if (!(File.Exists("SaveData\\Images\\count.txt")))
|
if (!(File.Exists("SaveData\\Images\\count.txt")))
|
||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\Images\\count.txt", "0");
|
File.WriteAllText("SaveData\\Images\\count.txt", "0");
|
||||||
|
|||||||
Reference in New Issue
Block a user