mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 13:25:51 +00:00
0.6.0
This commit is contained in:
33
APIServer.cs
33
APIServer.cs
@@ -88,7 +88,7 @@ namespace server
|
|||||||
}
|
}
|
||||||
if (Url.StartsWith("players/v1/"))
|
if (Url.StartsWith("players/v1/"))
|
||||||
{
|
{
|
||||||
s = getorcreate.GetOrCreate(CachedPlayerID);
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
if (Url == "avatar/v2")
|
if (Url == "avatar/v2")
|
||||||
{
|
{
|
||||||
@@ -124,10 +124,6 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = File.ReadAllText("SaveData\\avataritems.txt");
|
s = File.ReadAllText("SaveData\\avataritems.txt");
|
||||||
}
|
}
|
||||||
if (Url == "equipment/v1/getUnlocked")
|
|
||||||
{
|
|
||||||
s = File.ReadAllText("SaveData\\equipment.txt");
|
|
||||||
}
|
|
||||||
if (Url == "avatar/v2/gifts")
|
if (Url == "avatar/v2/gifts")
|
||||||
{
|
{
|
||||||
s = BracketResponse;
|
s = BracketResponse;
|
||||||
@@ -144,18 +140,6 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = Activities.Charades.words();
|
s = Activities.Charades.words();
|
||||||
}
|
}
|
||||||
if (Url == "gamesessions/v2/joinrandom")
|
|
||||||
{
|
|
||||||
s = gamesesh.GameSessions.JoinRandom(text);
|
|
||||||
}
|
|
||||||
if (Url == "gamesessions/v2/create")
|
|
||||||
{
|
|
||||||
s = gamesesh.GameSessions.Create(text);
|
|
||||||
}
|
|
||||||
if (rawUrl == "//api/sanitize/v1/isPure")
|
|
||||||
{
|
|
||||||
s = JsonConvert.SerializeObject(Sanitize.GetSanitize());
|
|
||||||
}
|
|
||||||
Console.WriteLine("API Response: " + s);
|
Console.WriteLine("API Response: " + s);
|
||||||
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
||||||
response.ContentLength64 = (long)bytes.Length;
|
response.ContentLength64 = (long)bytes.Length;
|
||||||
@@ -433,7 +417,7 @@ namespace server
|
|||||||
{
|
{
|
||||||
if (CachedVersionMonth == 09)
|
if (CachedVersionMonth == 09)
|
||||||
{
|
{
|
||||||
s = File.ReadAllText("SaveData\\storefronts2.txt");
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -614,16 +598,25 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/hotrooms.txt");
|
s = new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/hotrooms.txt");
|
||||||
}
|
}
|
||||||
if (Url.StartsWith("rooms/v4/details/29"))
|
if (Url.StartsWith("rooms/v2/instancedetails"))
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
|
if (Url == "rooms/v4/details/29")
|
||||||
{
|
{
|
||||||
s = File.ReadAllText("SaveData\\Rooms\\Downloaded\\RoomDetails.json");
|
s = File.ReadAllText("SaveData\\Rooms\\Downloaded\\RoomDetails.json");
|
||||||
|
Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
else if (Url.StartsWith("rooms/v4/details"))
|
||||||
|
{
|
||||||
|
s = JsonConvert.SerializeObject(c00005d.m000023(Convert.ToInt32(Url.Remove(0, 17))));
|
||||||
}
|
}
|
||||||
Console.WriteLine("API Response: " + s);
|
Console.WriteLine("API Response: " + s);
|
||||||
bytes = Encoding.UTF8.GetBytes(s);
|
bytes = Encoding.UTF8.GetBytes(s);
|
||||||
response.ContentLength64 = (long)bytes.Length;
|
response.ContentLength64 = (long)bytes.Length;
|
||||||
Stream outputStream = response.OutputStream;
|
Stream outputStream = response.OutputStream;
|
||||||
outputStream.Write(bytes, 0, bytes.Length);
|
outputStream.Write(bytes, 0, bytes.Length);
|
||||||
Thread.Sleep(1);
|
Thread.Sleep(50);
|
||||||
outputStream.Close();
|
outputStream.Close();
|
||||||
this.listener.Stop();
|
this.listener.Stop();
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ namespace api
|
|||||||
File.WriteAllText("SaveData\\Rooms\\Downloaded\\datablob.txt", root2.SubRooms[0].DataBlob);
|
File.WriteAllText("SaveData\\Rooms\\Downloaded\\datablob.txt", root2.SubRooms[0].DataBlob);
|
||||||
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomsceneid.txt", root2.SubRooms[0].UnitySceneId);
|
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomsceneid.txt", root2.SubRooms[0].UnitySceneId);
|
||||||
File.WriteAllText("SaveData\\Rooms\\Downloaded\\imagename.txt", root2.ImageName);
|
File.WriteAllText("SaveData\\Rooms\\Downloaded\\imagename.txt", root2.ImageName);
|
||||||
|
File.WriteAllText("SaveData\\Rooms\\Downloaded\\cheercount.txt", Convert.ToString(root2.Stats.CheerCount));
|
||||||
|
File.WriteAllText("SaveData\\Rooms\\Downloaded\\favcount.txt", Convert.ToString(root2.Stats.FavoriteCount));
|
||||||
|
File.WriteAllText("SaveData\\Rooms\\Downloaded\\visitcount.txt", Convert.ToString(root2.Stats.VisitCount));
|
||||||
ulong rand = Convert.ToUInt64(new Random().Next(0, 99));
|
ulong rand = Convert.ToUInt64(new Random().Next(0, 99));
|
||||||
room = new Room
|
room = new Room
|
||||||
{
|
{
|
||||||
|
|||||||
14
Program.cs
14
Program.cs
@@ -39,7 +39,7 @@ namespace start
|
|||||||
bannedflag = true;
|
bannedflag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Console.WriteLine("1) Changelog" + Environment.NewLine +"2) Change Settings" + Environment.NewLine + "3) Modify Profile" + Environment.NewLine + "4) Custom Room Downloader" + Environment.NewLine + "5) Start Server");
|
Console.WriteLine("1) Changelog" + Environment.NewLine +"2) Change Settings" + Environment.NewLine + "3) Modify Profile" + Environment.NewLine + "4) Custom Room Downloader (Beta)" + Environment.NewLine + "5) Start Server");
|
||||||
string readline = Console.ReadLine();
|
string readline = Console.ReadLine();
|
||||||
if (readline == "1")
|
if (readline == "1")
|
||||||
{
|
{
|
||||||
@@ -205,7 +205,17 @@ namespace start
|
|||||||
Console.Clear();
|
Console.Clear();
|
||||||
Console.WriteLine("Please type in the name of the room you would like to download: (Case sensitive)");
|
Console.WriteLine("Please type in the name of the room you would like to download: (Case sensitive)");
|
||||||
string roomname = Console.ReadLine();
|
string roomname = Console.ReadLine();
|
||||||
string text = new WebClient().DownloadString("https://rooms.rec.net/rooms?name=" + roomname + "&include=297");
|
string text = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
text = new WebClient().DownloadString("https://rooms.rec.net/rooms?name=" + roomname + "&include=297");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine("Failed to download room...");
|
||||||
|
goto Start;
|
||||||
|
}
|
||||||
CustomRooms.RoomDecode(text);
|
CustomRooms.RoomDecode(text);
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
Console.WriteLine("Success!");
|
Console.WriteLine("Success!");
|
||||||
|
|||||||
@@ -1484,7 +1484,7 @@ namespace vaultgamesesh
|
|||||||
RoomId = Convert.ToUInt64(File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomid.txt")),
|
RoomId = Convert.ToUInt64(File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomid.txt")),
|
||||||
Name = File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomname.txt"),
|
Name = File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomname.txt"),
|
||||||
Description = "OpenRec Downloaded Custom Room",
|
Description = "OpenRec Downloaded Custom Room",
|
||||||
CreatorPlayerId = APIServer.CachedPlayerID,
|
CreatorPlayerId = Convert.ToUInt64(File.ReadAllText("SaveData\\Profile\\userid.txt")),
|
||||||
ImageName = File.ReadAllText("SaveData\\Rooms\\Downloaded\\imagename.txt"),
|
ImageName = File.ReadAllText("SaveData\\Rooms\\Downloaded\\imagename.txt"),
|
||||||
State = 0,
|
State = 0,
|
||||||
Accessibility = 1,
|
Accessibility = 1,
|
||||||
@@ -1519,12 +1519,12 @@ namespace vaultgamesesh
|
|||||||
{
|
{
|
||||||
new c00005d.c000063
|
new c00005d.c000063
|
||||||
{
|
{
|
||||||
Tag = "rro",
|
Tag = "custom",
|
||||||
Type = 2
|
Type = 2
|
||||||
},
|
},
|
||||||
new c00005d.c000063
|
new c00005d.c000063
|
||||||
{
|
{
|
||||||
Tag = "sport",
|
Tag = "",
|
||||||
Type = 0
|
Type = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user