mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 13:25:51 +00:00
openrec patch v0.4.2
This commit is contained in:
@@ -141,6 +141,10 @@ namespace server
|
||||
{
|
||||
s = PlayerEventsResponse;
|
||||
}
|
||||
if (Url == "activities/charades/v1/words")
|
||||
{
|
||||
s = Activities.Charades.words();
|
||||
}
|
||||
if (Url == "gamesessions/v2/joinrandom")
|
||||
{
|
||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||
@@ -361,6 +365,10 @@ namespace server
|
||||
{
|
||||
s = PlayerEventsResponse;
|
||||
}
|
||||
if (Url == "activities/charades/v1/words")
|
||||
{
|
||||
s = Activities.Charades.words();
|
||||
}
|
||||
if (Url == "gamesessions/v2/joinrandom")
|
||||
{
|
||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||
|
||||
197
Activities.cs
Normal file
197
Activities.cs
Normal file
@@ -0,0 +1,197 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace api
|
||||
{
|
||||
// Token: 0x0200000B RID: 11
|
||||
internal class Activities
|
||||
{
|
||||
// Token: 0x0200000C RID: 12
|
||||
public class Charades
|
||||
{
|
||||
// Token: 0x0600001D RID: 29 RVA: 0x0000410C File Offset: 0x0000230C
|
||||
public static string words()
|
||||
{
|
||||
List<Activities.Charades.word> value = new List<Activities.Charades.word>
|
||||
{
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "talking ben",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "orange",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "grape",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "roblox",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "tree",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "cloud",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "iphone",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "your house",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "spaghetti",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "lean",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "bitcoin",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "nft",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "grass",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "recroom2016",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "joker",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "fortnite",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "woman",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "spiderman",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "vr",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "among us",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "coach",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "coach with a gun",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "funny fish",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "skinwalker",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "christmas tree",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "ur mom",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "stick of ram",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "big mac",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "ninetndo switch",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "crescendo",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "boxing",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "angry birds",
|
||||
Difficulty = 0
|
||||
}
|
||||
};
|
||||
return JsonConvert.SerializeObject(value);
|
||||
}
|
||||
|
||||
// Token: 0x0200000D RID: 13
|
||||
public class word
|
||||
{
|
||||
// Token: 0x17000004 RID: 4
|
||||
// (get) Token: 0x0600001F RID: 31 RVA: 0x000020DC File Offset: 0x000002DC
|
||||
// (set) Token: 0x06000020 RID: 32 RVA: 0x000020E4 File Offset: 0x000002E4
|
||||
public string EN_US { get; set; }
|
||||
|
||||
// Token: 0x17000005 RID: 5
|
||||
// (get) Token: 0x06000021 RID: 33 RVA: 0x000020ED File Offset: 0x000002ED
|
||||
// (set) Token: 0x06000022 RID: 34 RVA: 0x000020F5 File Offset: 0x000002F5
|
||||
public int Difficulty { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ namespace gamesessions2018
|
||||
// Token: 0x060000BE RID: 190 RVA: 0x00004C08 File Offset: 0x00002E08
|
||||
public static string JoinRandom(string jsonData)
|
||||
{
|
||||
long? creatorid = 1243409L;
|
||||
long gamesessionid = 2018L;
|
||||
Console.WriteLine("OpenRec GameSession Room");
|
||||
GameSessions.JoinRandomRequest joinRandomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRandomRequest>(jsonData);
|
||||
@@ -18,26 +19,29 @@ namespace gamesessions2018
|
||||
{
|
||||
gamesessionid = new Random().Next(0, 100);
|
||||
}
|
||||
{
|
||||
Config.localGameSession = new GameSessions.SessionInstance
|
||||
{
|
||||
GameSessionId = gamesessionid,
|
||||
RegionId = "us",
|
||||
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
||||
RecRoomId = null,
|
||||
EventId = null,
|
||||
CreatorPlayerId = 1243409L,
|
||||
Name = "OpenRec Room",
|
||||
ActivityLevelId = joinRandomRequest.ActivityLevelIds[0],
|
||||
Private = false,
|
||||
Sandbox = false,
|
||||
SupportsScreens = true,
|
||||
SupportsVR = true,
|
||||
GameInProgress = false,
|
||||
MaxCapacity = 20,
|
||||
IsFull = false
|
||||
};
|
||||
if (start.Program.version == "2017")
|
||||
{
|
||||
creatorid = (long?)APIServer.CachedPlayerID;
|
||||
}
|
||||
Config.localGameSession = new GameSessions.SessionInstance
|
||||
{
|
||||
GameSessionId = gamesessionid,
|
||||
RegionId = "us",
|
||||
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
||||
RecRoomId = null,
|
||||
EventId = null,
|
||||
CreatorPlayerId = creatorid,
|
||||
Name = "OpenRec Room",
|
||||
ActivityLevelId = joinRandomRequest.ActivityLevelIds[0],
|
||||
Private = false,
|
||||
Sandbox = false,
|
||||
SupportsScreens = true,
|
||||
SupportsVR = true,
|
||||
GameInProgress = false,
|
||||
MaxCapacity = 20,
|
||||
IsFull = false
|
||||
};
|
||||
|
||||
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
||||
{
|
||||
Result = 0,
|
||||
@@ -67,6 +71,7 @@ namespace gamesessions2018
|
||||
gamesessionid = new Random().Next(0, 100);
|
||||
}
|
||||
GameSessions.CreateRequest createRequest = JsonConvert.DeserializeObject<GameSessions.CreateRequest>(jsonData);
|
||||
|
||||
Config.localGameSession = new GameSessions.SessionInstance
|
||||
{
|
||||
GameSessionId = gamesessionid,
|
||||
|
||||
@@ -55,14 +55,9 @@ namespace server
|
||||
this.listener.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
||||
|
||||
public static string BlankResponse = "";
|
||||
|
||||
|
||||
// Token: 0x04000192 RID: 402
|
||||
private HttpListener listener = new HttpListener();
|
||||
}
|
||||
}
|
||||
|
||||
10
Program.cs
10
Program.cs
@@ -18,11 +18,11 @@ namespace 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: " + appversion + ")");
|
||||
Console.WriteLine("Made and provided by RecRoom 2016.");
|
||||
Console.WriteLine("Download source code here: https://github.com/recroom2016/OpenRec");
|
||||
Console.WriteLine("Discord: https://discord.gg/daC8QUhnFP" + Environment.NewLine);
|
||||
if (!(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt").Contains(version)))
|
||||
if (!(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt").Contains(appversion)))
|
||||
{
|
||||
Console.WriteLine("This version of OpenRec is outdated. We recommend you install the latest version, OpenRec " + new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt"));
|
||||
}
|
||||
@@ -186,7 +186,7 @@ namespace start
|
||||
|
||||
if (readline == "4")
|
||||
{
|
||||
Console.WriteLine("Please select the version of RecRoom the server should host: (2017, 2018)");
|
||||
Console.WriteLine("Please select the version of RecRoom the server should host: (2017 (Beta), 2018)");
|
||||
string readline2 = Console.ReadLine();
|
||||
if (readline2 == "2016")
|
||||
{
|
||||
@@ -240,8 +240,8 @@ namespace start
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static string version = "0.4.1";
|
||||
public static string version = "";
|
||||
public static string appversion = "0.4.2";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user