This commit is contained in:
Raidenxd2
2026-08-07 04:45:59 -04:00
commit 255b572a6f
219 changed files with 1652469 additions and 0 deletions
+439
View File
@@ -0,0 +1,439 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
*.env
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
[Dd]ebug/x64/
[Dd]ebugPublic/x64/
[Rr]elease/x64/
[Rr]eleases/x64/
bin/x64/
obj/x64/
[Dd]ebug/x86/
[Dd]ebugPublic/x86/
[Rr]elease/x86/
[Rr]eleases/x86/
bin/x86/
obj/x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
[Aa][Rr][Mm]64[Ee][Cc]/
bld/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Build results on 'Bin' directories
**/[Bb]in/*
# Uncomment if you have tasks that rely on *.refresh files to move binaries
# (https://github.com/github/gitignore/pull/3736)
#!**/[Bb]in/*.refresh
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.trx
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Approval Tests result files
*.received.*
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.idb
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
# but not Directory.Build.rsp, as it configures directory-level build defaults
!Directory.Build.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
**/.paket/paket.exe
paket-files/
# FAKE - F# Make
**/.fake/
# CodeRush personal settings
**/.cr/personal
# Python Tools for Visual Studio (PTVS)
**/__pycache__/
*.pyc
# Cake - Uncomment if you are using it
#tools/**
#!tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
MSBuild_Logs/
# AWS SAM Build and Temporary Artifacts folder
.aws-sam
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
**/.mfractor/
# Local History for Visual Studio
**/.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
**/.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
asdfasdf/ServerData/ns.json
asdfadsf/ServerData/RoomNamesToIds.json
asdfasdf/ServerData/Accounts/
asdfasdf/ServerData/BugReports/
asdfasdf/ServerData/CachedAccounts/
asdfasdf/ServerData/CharadeWords.json
asdfasdf/ServerData/LoggedInUsers.json
asdfasdf/ServerData/RoomNamesToIds.json
asdfasdf/ServerData/RoomFilters.json
asdfasdf/ServerData/Config.json
+8
View File
@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/modules.xml
/.idea.asdfasdf.iml
/contentModel.xml
+3
View File
@@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="project" />
</component>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
@@ -0,0 +1,10 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id>AccessibilityHTML</id>
</State>
<State>
<id>General</id>
</State>
<State>
<id>HTML</id>
</State>
<State>
<id>YAML</id>
</State>
</expanded-state>
</profile-state>
</entry>
</component>
</project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+16
View File
@@ -0,0 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asdfasdf", "asdfasdf\asdfasdf.csproj", "{2BC39B57-3D0E-47DB-BADF-614213A17B83}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2BC39B57-3D0E-47DB-BADF-614213A17B83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BC39B57-3D0E-47DB-BADF-614213A17B83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BC39B57-3D0E-47DB-BADF-614213A17B83}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BC39B57-3D0E-47DB-BADF-614213A17B83}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
+19
View File
@@ -0,0 +1,19 @@
namespace asdfasdf.APIs;
public static class AI
{
public static void Init(WebApplication app)
{
app.MapGet("/roomieai/user/access", () =>
{
RoomieUserAccess userAccess = new()
{
error = "All purchased Roomie energy has been used",
error_id = "AI.InsufficientRoomieAICreditNoSub",
success = false
};
return userAccess;
});
}
}
+577
View File
@@ -0,0 +1,577 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
namespace asdfasdf.APIs;
public static class API
{
public static ApiResponse SuccessResponse;
public static void Init(WebApplication app)
{
SuccessResponse = new()
{
success = true,
error = string.Empty
};
if (!File.Exists("ServerData/CharadeWords.json"))
{
List<CharadeWord> cw = new();
cw.Add(new(0, "Lemres"));
cw.Add(new(1, "your mom"));
cw.Add(new(2, "F"));
cw.Add(new(3, "Gamer"));
cw.Add(new(4, "Gaming chair"));
cw.Add(new(5, "Gaming keyboard"));
cw.Add(new(6, "Oculus Quest 4"));
cw.Add(new(7, "Nintendo Switch 3"));
cw.Add(new(8, "PlayStation 6"));
cw.Add(new(9, "GTA 7"));
cw.Add(new(10, "Black Shoe"));
cw.Add(new(11, "Xbox 720"));
cw.Add(new(12, "wii phone"));
cw.Add(new(13, "Valve Index 2"));
cw.Add(new(14, "BONEWORKS"));
cw.Add(new(15, "BONELAB"));
cw.Add(new(16, "Sonic"));
cw.Add(new(17, "Fuck you you don't get a word"));
cw.Add(new(18, "Rec room 2"));
cw.Add(new(19, "4DCharades"));
cw.Add(new(20, "ONE TWO THREE FOUR BADADADADADADAA BBBBB"));
cw.Add(new(21, "puyo puyo"));
cw.Add(new(22, "t-spin"));
cw.Add(new(23, "garry's mod"));
cw.Add(new(24, "Merge conflict"));
cw.Add(new(25, "Hi. I hate you. I hope you die."));
cw.Add(new(26, "The entirety of North Korea"));
cw.Add(new(27, "Gaming controller"));
cw.Add(new(28, "the"));
cw.Add(new(29, "ENA"));
cw.Add(new(30, "N"));
cw.Add(new(31, "No peeking!"));
File.WriteAllText("ServerData/CharadeWords.json", JsonSerializer.Serialize(cw));
}
if (!File.Exists("ServerData/RoomFilters.json"))
{
RoomFilters filters = new();
filters.PinnedFilters = new();
filters.PopularFilters = new();
filters.TrendingFilters = new();
filters.PinnedFilters.Add("recroomoriginal");
filters.PinnedFilters.Add("community");
filters.PinnedFilters.Add("featured");
filters.PinnedFilters.Add("quest");
filters.PinnedFilters.Add("pvp");
filters.PinnedFilters.Add("hangout");
filters.PinnedFilters.Add("game");
filters.PinnedFilters.Add("art");
filters.PinnedFilters.Add("store");
filters.PinnedFilters.Add("tutorial");
filters.PinnedFilters.Add("fandom");
filters.PinnedFilters.Add("performance");
filters.PinnedFilters.Add("action");
filters.PinnedFilters.Add("horror");
filters.PopularFilters.Add("pvp");
filters.PopularFilters.Add("quest");
filters.PopularFilters.Add("game");
filters.PopularFilters.Add("hangout");
filters.PopularFilters.Add("art");
filters.TrendingFilters.Add("roleplay");
filters.TrendingFilters.Add("nomp");
filters.TrendingFilters.Add("rp");
filters.TrendingFilters.Add("casual");
filters.TrendingFilters.Add("fun");
filters.TrendingFilters.Add("action");
filters.TrendingFilters.Add("military");
filters.TrendingFilters.Add("sports");
File.WriteAllText("ServerData/RoomFilters.json", JsonSerializer.Serialize(filters));
}
app.MapGet("/api/gameconfigs/v1/all", () => File.ReadAllText("gameconfig.json"));
app.MapGet("/api/customAvatarItems/v1/isCreationAllowedForAccount", () =>
{
app.Logger.LogWarning("(API) /api/customAvatarItems/v1/isCreationAllowedForAccount STUB");
CustomAvatarItems_CreationAllowed creationAllowed = new()
{
success = true
};
return creationAllowed;
});
app.MapGet("/api/customAvatarItems/v1/me", () => {
app.Logger.LogWarning("(API) /api/customAvatarItems/v1/me STUB");
return "[]";
});
app.MapPost("/api/customAvatarItems/v1/bulk", () =>
{
app.Logger.LogWarning("(API) /api/customAvatarItems/v1/bulk STUB");
// List<BulkCustomAvatarItem> avatarItems = new();
//
// BulkCustomAvatarItem avatarItem = new()
// {
// Accessibility = 2,
// CreatedAt = "2024-11-06T20:55:26.184Z",
// CreatorAccountId = 1,
// CustomAvatarItemId = "e396c94f-5e76-438f-9ed5-c6174011d239",
// CurrentSaves = Array.Empty<Object>(),
// ForceCannotPublish = false,
// IsFeatured = false,
// IsRecRoomApproved = true,
// ModifiedAt = "2024-11-06T20:55:26.184Z",
// Name = "(UGCTee_Shirt)",
// OutfitType = 101,
// PreviewOrientation = 0,
// Price = 0,
// RankedEntityId = "e396c94f-5e76-438f-9ed5-c6174011d239",
// Tags = Array.Empty<Object>(),
// };
//
// BulkCustomAvatarItem avatarItem2 = new()
// {
// Accessibility = 2,
// CreatedAt = "2024-11-05T23:44:26.452Z",
// CreatorAccountId = 1,
// CustomAvatarItemId = "8c03db9e-ea46-48f9-a114-3afd18454e31",
// CurrentSaves = Array.Empty<Object>(),
// ForceCannotPublish = false,
// IsFeatured = false,
// IsRecRoomApproved = true,
// ModifiedAt = "2024-11-05T23:44:26.452Z",
// Name = "(UGCPulloverHoodie_Shirt)",
// OutfitType = 101,
// PreviewOrientation = 0,
// Price = 0,
// RankedEntityId = "8c03db9e-ea46-48f9-a114-3afd18454e31",
// Tags = Array.Empty<Object>(),
// };
//
// avatarItems.Add(avatarItem);
// avatarItems.Add(avatarItem2);
return Results.Created("/api/customAvatarItems/v1/bulk", "[]");
});
app.MapGet("/api/versioncheck/v4", (string v, int p) =>
{
app.Logger.LogInformation("VersionCheck: " + v + " " + p);
VersionCheckObject ver = new()
{
VersionStatus = 0,
UpdateNotificationStage = 0,
IsVersionIslanded = false,
IsCrossPlayDisabled = false,
};
return ver;
});
// It's also like this on the actual API
app.MapGet("/api/versioncheck/islandedversions", () => "[]");
app.MapGet("/api/keepsakes/categories", () =>
{
app.Logger.LogWarning("(API) /api/keepsakes/categories STUB");
return File.ReadAllText("keepsakes_categories.json");
});
app.MapGet("/api/progressionEvents/event/18", () =>
{
app.Logger.LogWarning("(API) /api/progressionEvents/event/18 STUB");
ProgressionEvent progressionEvent = new()
{
ActiveExperiment = "liveops_2025q4_yeti",
BoostDailyGameplayMinutesLimit = 0,
BoosXpMultiplier = 0,
CollectionEndTime = DateTime.Now.AddMonths(-1),
EventInfoImageName = "DefaultProfileImage.png",
EventLeaderboardId = 18,
InitialCurrencyGrant = 300,
IsEnabled = false,
Name = "Yetis challenge",
ProgressionEventId = 18,
PurchasableXpBoostId = "e4a7b4d4-f609-4008-9874-f6cd01b896ea",
StartTime = DateTime.Now.AddMonths(-2),
UsesBoost = false
};
return progressionEvent;
});
app.MapGet("/api/players/v2/progression/bulk", (int id) =>
{
app.Logger.LogWarning("(API) /api/players/v2/progression/bulk STUB\n" + id);
List<Progression> progressions = new();
Progression progression = new()
{
Level = 50,
PlayerId = Accounts.account.accountId,
XP = 0
};
progressions.Add(progression);
return progressions;
});
app.Map("/api/PlayerReporting/v1/moderationBlockDetails", () =>
{
// var a = await request.ReadFormAsync();
// var a1 = a.ElementAt(0);
app.Logger.LogWarning("(API) /api/PlayerReporting/v1/moderationBlockDetails STUB");
ModerationBlockDetail block = new()
{
ReportCategory = ReportCategory.Moderator,
Duration = 0,
GameSessionId = 0,
IsHostKick = false,
PlayerIdReporter = 0,
IsBan = false,
IsVoiceModAutoban = false,
IsDeviceBan = false,
IsWarning = false,
ShowCreatorCodeOfConduct = false
};
// ModerationBlockDetail block = new()
// {
// ReportCategory = ReportCategory.Moderator,
// Duration = 555,
// GameSessionId = 0,
// IsHostKick = false,
// PlayerIdReporter = 1,
// IsBan = true,
// IsVoiceModAutoban = false,
// IsDeviceBan = true,
// IsWarning = false,
// ShowCreatorCodeOfConduct = false
// };
return Results.Created("/api/PlayerReporting/v1/moderationBlockDetails", block);
});
app.MapGet("/api/PlayerReporting/v1/voteToKickReasons", () =>
{
app.Logger.LogWarning("(API) /api/PlayerReporting/v1/voteToKickReasons STUB");
return "[]";
});
app.MapPost("/api/PlayerReporting/v1/hile", () =>
{
return false;
});
app.MapGet("/api/banappeal/generateCode", () =>
{
ApiResponse response = new()
{
success = false,
error = "Lemres"
};
return response;
});
app.MapGet("/outfits/me", () =>
{
app.Logger.LogWarning("(API) /outfits/me STUB");
Outfit outfit = new()
{
Accessibility = 0,
DataVersion = 0,
LegacyData = new()
{
FaceFeatures = "{\"ver\":6,\"eyeId\":\"AjGMoJhEcEehacRZjUMuDg\",\"eyePos\":{\"x\":0.0,\"y\":0.0},\"eyeScl\":0.05000000074505806,\"mouthId\":\"FrZBRanXEEK29yKJ4jiMjg\",\"mouthPos\":{\"x\":0.0,\"y\":0.0},\"mouthScl\":0.05000000074505806,\"hairPrimaryColorId\":\"\",\"hairSecondaryColorId\":\"5e51ac88-e365-418b-a303-8737fd2e6bc8\",\"hairPatternId\":\"\",\"beardColorId\":\"5e51ac88-e365-418b-a303-8737fd2e6bc8\",\"beardSecondaryColorId\":\"5e51ac88-e365-418b-a303-8737fd2e6bc8\",\"beardPatternId\":\"\",\"faceShapeId\":\"yR4oYZr_AUSynXCgwS2lGw\",\"bodyShapeId\":\"bY1RGIph0kiAxbd6Shn9tQ\",\"useHatAnchorParams\":true,\"useHelmetHair\":1,\"hideEars\":true,\"hatAnchorParams\":{\"NormalizedPosition\":{\"x\":0.5,\"y\":0.5},\"HemisphereOffsets\":{\"x\":0.0,\"y\":0.0,\"z\":0.0},\"HemisphereRotations\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}}}",
HairColor = "5e51ac88-e365-418b-a303-8737fd2e6bc8",
SelectionsV1 = "193a3bf9-abc0-4d78-8d63-92046908b1c5,,0;b6rLwzD4NkKV7xKn9ZYVkA,PRLBrEEZhUumm3VnYVJP6Q,1;5cd08cfb-c729-4c30-96d9-6a99bb934d91,,1;071f179a-dde2-407f-92b2-f0c16fcb4e39,VudVdOAjZUibHmtFeNkvSw,0;ecc1dbe6-ca06-4564-b2a6-30956194d1e9,dee70c38-7a99-4c2b-9181-665f1bf75aca,0b2395e1-ebcc-47e9-aaf1-faf9e9cec4cd,,2;ecc1dbe6-ca06-4564-b2a6-30956194d1e9,f8b0cfe8-e129-4578-8bb5-f60af5d38599,0b2395e1-ebcc-47e9-aaf1-faf9e9cec4cd,,3",
SelectionsV2 = "{\"selections\":[{\"PrefabGuid\":\"193a3bf9-abc0-4d78-8d63-92046908b1c5\",\"CombinationGuid\":\"\",\"BodyPart\":0,\"UgcOutfitData\":{\"BaseAvatarItemColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":0.0},\"CustomAvatarItemId\":\"\"}},{\"PrefabGuid\":\"b6rLwzD4NkKV7xKn9ZYVkA\",\"CombinationGuid\":\"PRLBrEEZhUumm3VnYVJP6Q\",\"BodyPart\":1,\"UgcOutfitData\":{\"BaseAvatarItemColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":0.0},\"CustomAvatarItemId\":\"\"}},{\"PrefabGuid\":\"5cd08cfb-c729-4c30-96d9-6a99bb934d91\",\"CombinationGuid\":\"\",\"BodyPart\":1,\"UgcOutfitData\":{\"BaseAvatarItemColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":0.0},\"CustomAvatarItemId\":\"\"}},{\"PrefabGuid\":\"071f179a-dde2-407f-92b2-f0c16fcb4e39\",\"CombinationGuid\":\"VudVdOAjZUibHmtFeNkvSw\",\"BodyPart\":0,\"UgcOutfitData\":{\"BaseAvatarItemColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":0.0},\"CustomAvatarItemId\":\"\"}},{\"PrefabGuid\":\"ecc1dbe6-ca06-4564-b2a6-30956194d1e9\",\"CombinationGuid\":\"dee70c38-7a99-4c2b-9181-665f1bf75aca,0b2395e1-ebcc-47e9-aaf1-faf9e9cec4cd,\",\"BodyPart\":2,\"UgcOutfitData\":{\"BaseAvatarItemColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":0.0},\"CustomAvatarItemId\":\"\"}},{\"PrefabGuid\":\"ecc1dbe6-ca06-4564-b2a6-30956194d1e9\",\"CombinationGuid\":\"f8b0cfe8-e129-4578-8bb5-f60af5d38599,0b2395e1-ebcc-47e9-aaf1-faf9e9cec4cd,\",\"BodyPart\":3,\"UgcOutfitData\":{\"BaseAvatarItemColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":0.0},\"CustomAvatarItemId\":\"\"}}]}",
SkinColor = "85343b16-d58a-4091-96d8-083a81fb03ae"
},
Slot = 0
};
return outfit;
});
app.MapGet("/api/playerReputation/v2/bulk", (string id) =>
{
app.Logger.LogWarning("(API) /api/playerReputation/v2/bulk STUB");
List<BulkPlayerReputation> reps = new();
BulkPlayerReputation rep = new()
{
AccountId = Accounts.account.accountId,
CheerCreative = 0,
CheerCredit = 10,
CheerGeneral = 0,
CheerGreatHost = 0,
CheerHelpful = 0,
CheerSportsman = 0,
IsCheerful = true,
Noteriety = 0,
SelectedCheer = 0
};
reps.Add(rep);
return reps;
});
app.Map("/api/relationships/v2/get", () => "[]");
app.MapGet("/api/statsigUserProperties", () => "{\"success\" : true}");
app.MapPost("/api/gamesight/event", () =>
{
ApiResponseNoValue response = new()
{
success = true
};
return Results.Created("/api/gamesight/event", response);
});
app.MapGet("/api/config/v1/amplitude", () =>
{
AmplitudeConfig config = new()
{
AmplitudeKey = "93941036bd6a7243bf5c628535f41d63",
UseRudderStack = false,
RudderStackKey = "23NiJHIgu3koaGNCZIiuYvIQNCu",
UseStatSig = true,
StatSigKey = "client-SBZkOrjD3r1Cat3f3W8K6sBd11WKlXZXIlCWj6l4Aje",
StatSigEnvironment = 0
};
return config;
});
app.MapGet("/api/config/v1/backtrace", () =>
{
BacktraceConfig config = new()
{
ReportBudget = 125,
FilterType = 0,
SampleRate = 1,
LogLineCount = 50,
CaptureNativeCrashes = 0,
AMRThresholdMS = 0,
MessageCount = 1000,
MessageRegex = "^.*$",
VersionRegex = ".*"
};
return config;
});
app.MapGet("/api/config/v2", () =>
{
app.Logger.LogWarning("(API) /api/config/v2 STUB");
return File.ReadAllText("wwwroot/config/config.json");
});
app.MapGet("/api/quickPlay/v1/getandclear", () =>
{
app.Logger.LogWarning("(API) /api/quickPlay/v1/getandclear STUB");
return "";
});
app.MapGet("/api/messages/v2/get", () =>
{
app.Logger.LogWarning("(API) /api/messages/v2/get STUb");
return "[]";
});
app.MapGet("/api/images/v2/named", () =>
{
app.Logger.LogWarning("(API) /api/images/v2/named STUB");
return "[]";
});
app.MapGet("/api/communityboard/v2/current", () =>
{
return File.ReadAllText("communityboard.json");
});
app.MapGet("/api/playerevents/v1/all", () =>
{
app.Logger.LogWarning("(API) /api/playerevents/v1/all STUB");
PlayerEvents events = new()
{
Created = Array.Empty<object>(),
Responses = Array.Empty<object>()
};
return events;
});
app.MapGet("/api/customAvatarItems/v1/isCreationEnabled", () =>
{
return true;
});
app.MapGet("/api/customAvatarItems/v1/isRenderingEnabled", () =>
{
return true;
});
app.MapGet("/api/config/v1/azurespeech", () =>
{
var config = new
{
Key = "dce8de5b297747d9b5bddcc7f19e8c5b",
Region = "eastus",
Enabled = false,
};
return config;
});
app.MapGet("/api/announcement/v1/get", () =>
{
app.Logger.LogWarning("(API) /api/announcement/v1/get STUB");
return "[]";
});
app.MapPost("/api/sanitize/v1", ([FromBody] SanitizeRequest request) =>
{
return Results.Ok(JsonSerializer.Serialize(request.Value));
});
app.MapPost("/api/sanitize/v1/isPure", () =>
{
var result = new
{
IsPure = true
};
return result;
});
app.MapGet("/api/testcasemanagement/v1/testpasssummary", () =>
{
app.Logger.LogWarning("(API) /api/testcasemanagement/v1/testpasssummary STUB");
return "[]";
});
app.MapGet("/api/testcasemanagement/v1/testplans", () =>
{
app.Logger.LogWarning("(API) /api/testcasemanagement/v1/testplans STUB");
return "[]";
});
app.MapPost("/api/rooms/v1/verifyRole", () =>
{
app.Logger.LogWarning("(API) /api/rooms/v1/verifyRole STUB");
return true;
});
app.MapGet("/api/inventions/v2/mine", () =>
{
app.Logger.LogWarning("(API) /api/inventions/v2/mine STUB");
return "[]";
});
app.MapGet("/api/apple/musicpromotion/active", () =>
{
return true;
});
app.MapGet("/api/inventions/v2/search", (int skip, int take) =>
{
app.Logger.LogWarning("(API) /api/inventions/v2/search STUB");
return "[]";
});
app.MapGet("/api/inventions/v1/room", (int id) =>
{
app.Logger.LogWarning("(API) /api/inventions/v1/room STUB");
return "[]";
});
app.MapGet("/api/keepsakes/globalconfig", () =>
{
var response = new
{
KeepsakeFeatureEnabled = true,
KeepsakeRoomLimit = 10,
SocialXpBoostEnabled = false
};
return response;
});
app.MapGet("/api/keepsakes/rooms/{roomId}", (int roomId) =>
{
app.Logger.LogWarning("(API) /api/keepsakes/rooms/{{roomId}} STUB");
return Results.NoContent();
});
app.MapGet("/api/activities/charades/v1/words/{activityName}", (string activityName) =>
{
return File.ReadAllText("ServerData/CharadeWords.json");
});
app.MapGet("/api/images/v4/room/{roomId}", (int roomId, int sort, int filter, int take, int skip) =>
{
app.Logger.LogWarning("(API) /api/images/v4/room/{{roomId}} STUB");
return "[]";
});
app.MapGet("/api/playerevents/v1/room/{roomId}", () =>
{
app.Logger.LogWarning("(API) /api/playerevents/v1/room/{{roomId}} STUB");
return "[]";
});
app.MapGet("/api/rooms/v1/filters", () =>
{
return File.ReadAllText("ServerData/RoomFilters.json");
});
app.MapGet("/api/images/v6", (string name) =>
{
app.Logger.LogWarning("(API) /api/images/v6 STUB");
return API.SuccessResponse;
});
}
}
+165
View File
@@ -0,0 +1,165 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
namespace asdfasdf.APIs;
public static class Accounts
{
public static BulkAccount account = JsonSerializer.Deserialize<BulkAccount>(File.ReadAllText("ServerData/Accounts/2/user.json"));
public static void CreateAccount(int accountId, string name)
{
if (!Directory.Exists("ServerData/Accounts/" + accountId))
{
Directory.CreateDirectory("ServerData/Accounts/" + accountId);
}
BulkAccount tAccount = new()
{
AvailableUsernameChanges = 1,
Email = "email@email.com",
Birthday = DateTime.MinValue,
IsFakeJuniorBirthday = false,
accountId = accountId,
username = name,
displayName = name,
displayEmoji = "",
profileImage = "DefaultProfileImage.png",
bannerImage = "DefaultProfileImage.png",
isJunior = false,
platforms = PlatformType.All,
personalPronouns = PersonalPronouns.None,
identityFlags = IdentityFlags.None,
createdAt = DateTime.UtcNow,
isMetaPlatformBlocked = false
};
File.WriteAllText("ServerData/Accounts/" + accountId + "/user.json", JsonSerializer.Serialize(tAccount));
File.WriteAllText("ServerData/Accounts/" + accountId + "/Outfits.json", "[]");
File.Copy("DefaultPlayerSettings.json", "ServerData/Accounts/" + accountId + "/PlayerSettings.json");
File.WriteAllText("ServerData/Accounts/" + accountId + "/avoidjuniors", "false");
File.Copy("DefaultAvatar.json", "ServerData/Accounts/" + accountId + "/Avatar.json");
}
public static void Init(WebApplication app)
{
app.MapGet("/account/me", (HttpRequest request) =>
{
app.Logger.LogInformation(request.Headers.Authorization[0]);
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
return Results.Ok(user.account);
}
}
return Results.NotFound();
});
app.MapPut("/account/me/displayname", ([FromForm] string displayName, HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
user.account.displayName = displayName;
File.WriteAllText("ServerData/Accounts/" + user.id + "/user.json", JsonSerializer.Serialize(user.account));
ApiResponse response = new()
{
success = true,
error = string.Empty
};
return Results.Ok(response);
}
}
return Results.NotFound();
}).DisableAntiforgery();
app.MapPut("/account/me/profileimage", ([FromForm] string imageName, HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
user.account.profileImage = imageName;
File.WriteAllText("ServerData/Accounts/" + user.id + "/user.json", JsonSerializer.Serialize(user.account));
ApiResponse response = new()
{
success = true,
error = string.Empty
};
return Results.Ok(response);
}
}
return Results.NotFound();
}).DisableAntiforgery();
app.MapPut("/account/me/username", ([FromForm] string username, HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
user.account.username = username;
File.WriteAllText("ServerData/Accounts/" + user.id + "/user.json", JsonSerializer.Serialize(user.account));
ApiResponse response = new()
{
success = true,
error = string.Empty
};
return Results.Ok(response);
}
}
return Results.NotFound();
}).DisableAntiforgery();
app.MapGet("/account/bulk", (int id) =>
{
List<BulkAccount> accounts = new();
accounts.Add(JsonSerializer.Deserialize<BulkAccount>(File.ReadAllText("ServerData/Accounts/" + id + "/user.json")));
return accounts;
});
app.MapGet("/role/developer/{id}", () =>
{
return true;
});
app.MapGet("/parentalcontrol/me", () =>
{
ParentalControl pc = new()
{
accountId = account.accountId,
disallowInAppPurchases = false
};
return pc;
});
app.MapGet("/accountprivacysettings/{id}", () =>
{
app.Logger.LogWarning("(Accounts) /accountprivacysettings/{{id}} STUB");
PrivacySettings privacySettings = new()
{
accountId = account.accountId,
isRecentHistoryVisible = true
};
return privacySettings;
});
}
}
+19
View File
@@ -0,0 +1,19 @@
namespace asdfasdf.APIs;
public static class Amplitude
{
public static void Init(WebApplication app)
{
// All of the stuff in amplitude is just to make the Rec Room logs less spammed
app.MapPost("/httpapi", () =>
{
return Results.Ok();
});
app.MapPost("/identify", () =>
{
return Results.Ok();
});
}
}
+255
View File
@@ -0,0 +1,255 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
namespace asdfasdf.APIs;
public static class Auth
{
public static List<LoggedInUser> currentUsers;
public static void Init(WebApplication app)
{
currentUsers = new();
if (File.Exists("ServerData/LoggedInUsers.json"))
{
currentUsers = JsonSerializer.Deserialize<List<LoggedInUser>>(File.ReadAllText("ServerData/LoggedInUsers.json"));
}
app.MapPost("/connect/deviceauthorization", async (HttpRequest request) =>
{
var a = await request.ReadFormAsync();
var clientId = a.ElementAt(0);
var clientSecret = a.ElementAt(1);
app.Logger.LogWarning($"(Auth) /connect/deviceauthorization STUB\n{clientId}\n{clientSecret}");
DeviceAuthorizationResponse response = new()
{
device_code = "stub",
user_code = "stub",
verification_uri = "https://127.0.0.1/other/deviceauth.html",
verification_uri_complete = "https://127.0.0.1/other/deviceauth.html",
expires_in = 69420,
interval = 5
};
return Results.Created("/connect/deviceauthorization", response);
});
app.MapPost("/connect/token", ([FromForm] string? client_id, [FromForm] string? grant_type, [FromForm] string? platform_id, [FromForm] int? device_class, HttpRequest request) =>
{
if (!string.IsNullOrEmpty(client_id) && string.Equals(client_id, "recroom.studio"))
{
device_class = 0;
TokenResponse tokenrrs = new()
{
access_token = BuildJWTToken(),
expires_in = 43200,
key = "FFez0R2bkFhD60xs4h1Vz9IczHop8Y90xGfaQ7wVLGU=",
refresh_token = "1093F3F27DA152B7EB51E02D12193FE961B89A4D1953B1817FBC0CDEF5E6F47C",
scope = "offline_access rn",
token_type = "Bearer"
};
CachedAccount accountrrs = JsonSerializer.Deserialize<CachedAccount>(File.ReadAllText("ServerData/CachedAccounts/" + "76561198376170927" + ".json"));
currentUsers.Add(new()
{
token = "Bearer " + tokenrrs.access_token,
id = accountrrs.AccountId,
account = JsonSerializer.Deserialize<BulkAccount>(File.ReadAllText("ServerData/Accounts/" + accountrrs.AccountId + "/user.json")),
outfits = JsonSerializer.Deserialize<List<OutfitSaveRequest>>(File.ReadAllText("ServerData/Accounts/" + accountrrs.AccountId + "/Outfits.json")),
ps = JsonSerializer.Deserialize<List<PlayerSetting>>(File.ReadAllText("ServerData/Accounts/" + accountrrs.AccountId + "/PlayerSettings.json")),
deviceClass = device_class.Value
});
return Results.Created("/connect/token", tokenrrs);
}
if (grant_type.Equals("create_account"))
{
var response = new
{
error = "invalid_grant",
error_description = "Lemres"
};
return Results.BadRequest(response);
}
TokenResponse token = new()
{
access_token = BuildJWTToken(),
expires_in = 43200,
key = "FFez0R2bkFhD60xs4h1Vz9IczHop8Y90xGfaQ7wVLGU=",
refresh_token = "1093F3F27DA152B7EB51E02D12193FE961B89A4D1953B1817FBC0CDEF5E6F47C",
scope = "offline_access rn",
token_type = "Bearer"
};
CachedAccount account = JsonSerializer.Deserialize<CachedAccount>(File.ReadAllText("ServerData/CachedAccounts/" + platform_id + ".json"));
currentUsers.Add(new()
{
token = "Bearer " + token.access_token,
id = account.AccountId,
account = JsonSerializer.Deserialize<BulkAccount>(File.ReadAllText("ServerData/Accounts/" + account.AccountId + "/user.json")),
outfits = JsonSerializer.Deserialize<List<OutfitSaveRequest>>(File.ReadAllText("ServerData/Accounts/" + account.AccountId + "/Outfits.json")),
ps = JsonSerializer.Deserialize<List<PlayerSetting>>(File.ReadAllText("ServerData/Accounts/" + account.AccountId + "/PlayerSettings.json")),
deviceClass = device_class.Value
});
return Results.Created("/connect/token", token);
}).DisableAntiforgery();
app.MapGet("/cachedlogin/forplatformid/0/{steamId}", (string steamId) =>
{
if (!File.Exists("ServerData/CachedAccounts/" + steamId + ".json"))
{
app.Logger.LogInformation("Creating user for " + steamId);
int accountId = Directory.GetDirectories("ServerData/Accounts").Length + 1;
Accounts.CreateAccount(accountId, steamId);
CachedAccount cached = new()
{
AccountId = accountId,
LastLoginTime = DateTime.UtcNow,
Platform = PlatformType.All,
PlatformId = steamId,
RequirePassword = false
};
File.WriteAllText("ServerData/CachedAccounts/" + steamId + ".json", JsonSerializer.Serialize(cached));
}
List<CachedAccount> accounts = new();
CachedAccount cachedAccount = JsonSerializer.Deserialize<CachedAccount>(File.ReadAllText("ServerData/CachedAccounts/" + steamId + ".json"));
accounts.Add(cachedAccount);
return accounts;
});
app.MapPost("/cachedlogin/forplatformids", () =>
{
app.Logger.LogWarning("(Auth) /cachedlogin/forplatformids STUB");
return "[]";
});
app.MapGet("privileges/me/restrictions", () =>
{
app.Logger.LogWarning("(Auth) /privileges/me/restrictions STUB");
return "[]";
// AccountPrivilege privilege = new()
// {
// AccountId = 0,
// Name = "User",
// Description = "stub",
// EndDate = DateTime.UtcNow,
// AssociatedAccountid = 0,
// AssociatedAccountUsername = "stub",
// ReportCategory = ReportCategory.Moderator,
// DisplayReason = "Lemres"
// };
//
// return privilege;
});
app.MapGet("/eac/challenge", () =>
{
return "\"AQAAAOmBNw8TMlSZs9NsuyGxsU7WMoKVcieTW8IyoSMEGcbTIPg7DZ4JGZTCfg4b1h58FOOkM7r0LUhRVwlq8wo528o3LR9g/kHzlrVJA6H0+HaYTQzjKEe+zl5/VupqSXk8PXQ0BlNiRED3x5YMCGiM+F0fYmd0NU4K0d5hY+A=\"";
});
app.MapPost("/account/recoverpassword", () =>
{
app.Logger.LogWarning("(Auth) /account/recoverpassword STUB");
ApiResponseNoValue response = new()
{
error = "Lemres",
error_id = "id",
success = false
};
return Results.Created("/account/recoverpassword", response);
});
// Legacy?
app.MapGet("/api/settings/v2", () =>
{
app.Logger.LogWarning("(API) /api/settings/v2 STUB");
return File.ReadAllText("DefaultPlayerSettings.json");
});
// Legacy?
app.MapPost("/api/settings/v2/set", () =>
{
app.Logger.LogWarning("(API) /api/settings/v2/set STUB");
return File.ReadAllText("DefaultPlayerSettings.json");
});
app.MapPost("/api/images/v4/uploadsaved", async (HttpRequest request) =>
{
var file = request.Form.Files.FirstOrDefault();
string fileName = Guid.NewGuid() + ".jpg";
using (var stream = new FileStream("wwwroot/" + fileName, FileMode.Create))
{
await file.CopyToAsync(stream);
}
return Results.Ok(new {ImageName = fileName});
}).DisableAntiforgery();
}
private static string BuildJWTToken()
{
var roles = new List<string>
{
"influencer",
"developer",
"moderator",
"screenshare",
"keepsake",
"livekeepsakeeventroomsaveoverride",
"multiinstanceevent",
"betastudio",
"ugcloc"
};
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("SecretKeywqewqeqqqqqqqqqqqweeeeeeeeeeeeeeeeeeeqweqe"));
var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
var issuer = "reccc";
var claims = new[]
{
new Claim("sub", "0"),
new Claim("role", JsonSerializer.Serialize(roles), JsonClaimValueTypes.JsonArray),
new Claim(JwtRegisteredClaimNames.Iat, DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(), ClaimValueTypes.Integer64)
};
var jwtValidity = DateTime.Now.AddDays(30);
var token = new JwtSecurityToken(issuer,
claims: claims,
expires: jwtValidity,
signingCredentials: creds);
return new JwtSecurityTokenHandler().WriteToken(token);
}
}
+64
View File
@@ -0,0 +1,64 @@
namespace asdfasdf.APIs;
public static class BugReporting
{
private static string CurrentADOGUID;
public static void Init(WebApplication app)
{
app.MapPost("/ado/bug", async (HttpRequest request) =>
{
CurrentADOGUID = Guid.NewGuid().ToString();
await SaveFileFromHttpRequest("ServerData/BugReports/" + "ado_" + CurrentADOGUID + ".txt", request);
return API.SuccessResponse;
});
app.MapPost("/ado/file", async (HttpRequest request) =>
{
var file = request.Form.Files.FirstOrDefault();
using (var stream = new FileStream("ServerData/BugReports/ado_" + CurrentADOGUID + "_" + file.FileName, FileMode.Create))
{
await file.CopyToAsync(stream);
}
return API.SuccessResponse;
});
app.MapPut("/reports/{id}", async (string id, HttpRequest request) =>
{
await SaveFileFromHttpRequest("ServerData/BugReports/" + id + ".json", request);
return API.SuccessResponse;
});
app.MapPut("/reports/{id}/attachments/{fileName}", async (string id, string fileName, HttpRequest request) =>
{
await SaveFileFromHttpRequest("ServerData/BugReports/" + id + "_" + fileName, request);
return API.SuccessResponse;
});
app.MapPut("/reports/{id}/userinfo", async (string id, HttpRequest request) =>
{
await SaveFileFromHttpRequest("ServerData/BugReports/" + id + "_userinfo.json", request);
return API.SuccessResponse;
});
app.MapPut("/reports/{id}/Complete", (string id) =>
{
return API.SuccessResponse;
});
}
private static async Task SaveFileFromHttpRequest(string path, HttpRequest request)
{
var body = new StreamReader(request.Body);
var requestBody = await body.ReadToEndAsync();
await File.WriteAllTextAsync(path, requestBody);
}
}
+14
View File
@@ -0,0 +1,14 @@
namespace asdfasdf.APIs;
public static class CDN
{
public static void Init(WebApplication app)
{
app.MapGet("/config/1b057e6e-979d-4f30-8856-a386f77c90da", () => File.ReadAllText("wwwroot/config/1b057e6e-979d-4f30-8856-a386f77c90da"));
app.MapGet("/config/LoadingScreenTipData", () =>
{
return File.ReadAllText("LoadingScreenTipData.json");
});
}
}
+21
View File
@@ -0,0 +1,21 @@
namespace asdfasdf.APIs;
public static class Chat
{
public static void Init(WebApplication app)
{
app.MapGet("/thread", (int maxCount, int mode) =>
{
app.Logger.LogWarning("(Chat) /thread STUB");
return "[]";
});
app.MapGet("/thread/party", (int maxCount, int mode) =>
{
app.Logger.LogWarning("(Chat) /thread/party STUB");
return "[]";
});
}
}
+67
View File
@@ -0,0 +1,67 @@
namespace asdfasdf.APIs;
public static class Clubs
{
public static void Init(WebApplication app)
{
app.MapGet("/club/home/me", () =>
{
app.Logger.LogWarning("(Clubs) /club/home/me STUB");
return Results.NotFound();
// Club club = new()
// {
// Name = "A club",
// Description = "A club description",
// MainImageName = "DefaultProfileImage.png",
// State = ClubState.Active,
// PrimaryTag = "Hangout",
// Visibility = ClubVisibility.Public,
// Joinability = ClubJoinability.Open,
// AllowJuniors = true,
// MinLevel = 1,
// MemberCount = 1,
// ClubhouseRoomId = 0,
// ClubType = ClubType.Generic
// };
//
// return club;
});
app.MapGet("/announcements/v2/mine/unread", () =>
{
app.Logger.LogWarning("(Clubs) /announcements/v2/mine/unread STUB");
return "[]";
});
app.MapGet("/club/mine/member", () =>
{
app.Logger.LogWarning("(Clubs) /club/mine/member STUB");
return "[]";
});
app.MapGet("/announcements/v2/subscription/mine/unread", () =>
{
app.Logger.LogWarning("(Clubs) /announcements/v2/subscription/mine/unread STUB");
return "[]";
});
app.MapGet("/subscription/mine/member", () =>
{
app.Logger.LogWarning("(Clubs) /subscription/mine/member STUB");
return "[]";
});
app.MapGet("/subscription/details/{id}", () =>
{
app.Logger.LogWarning("(Clubs) /subscription/details/{{id}} STUB");
return "{}";
});
}
}
+22
View File
@@ -0,0 +1,22 @@
namespace asdfasdf.APIs;
public static class Commerce
{
public static void Init(WebApplication app)
{
app.Map("/purchase/v1/hasspentmoney", () =>
{
return false;
});
app.MapGet("/purchasecampaign/allcurrent/v2", () =>
{
return "[]";
});
app.MapGet("/reminder/currentTokenBundles/v2", () =>
{
return "[]";
});
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace asdfasdf.APIs;
public static class Data
{
public static void Init(WebApplication app)
{
app.MapGet("/commonQuery/rrstudio/chiprecommendations", () =>
{
return File.ReadAllText("studio_chiprecommendations.json");
});
}
}
+17
View File
@@ -0,0 +1,17 @@
namespace asdfasdf.APIs;
public static class DataCollection
{
public static void Init(WebApplication app)
{
app.MapPost("/data/event", (HttpRequest request) =>
{
return Results.Created("/data/event", "");
});
app.MapPost("/data/heartbeat", () =>
{
return Results.Created("/data/heartbeat", "");
});
}
}
+428
View File
@@ -0,0 +1,428 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
namespace asdfasdf.APIs;
public static class Econ
{
private static List<OutfitSaveRequest> outfits;
public static void Init(WebApplication app)
{
if (!File.Exists("ServerData/Accounts/2/Outfits.json"))
{
File.WriteAllText("ServerData/Accounts/2/Outfits.json", "[]");
}
outfits = JsonSerializer.Deserialize<List<OutfitSaveRequest>>(File.ReadAllText("ServerData/Accounts/2/Outfits.json"));
app.MapGet("/api/avatar/v1/defaultunlocked", () =>
{
return File.ReadAllText("avataritems.json");
});
app.MapGet("/api/timeLimitedEvents/cbe9582c-6314-4ba3-ad0e-57d220b79aff", () =>
{
app.Logger.LogWarning("(econ) /api/timeLimitedEvents/cbe9582c-6314-4ba3-ad0e-57d220b79aff STUB");
Guid ReplicationId = Guid.NewGuid();
// TimedEventXpSource xpSource = new();
// TimedEventXpMultiplier xpMultiplier = new()
// {
// XpMultiplier = 2
// };
//
// TimeLimitedEvent limitedEvent = new()
// {
// TimeLimitedEventId = 0,
// ReplicationId = ReplicationId,
// Name = "An event",
// StartTime = DateTime.UtcNow,
// EndTime = DateTime.UtcNow.AddHours(24),
// Metadata = "stub",
// Config = new()
// {
// CurrencyGrant = new()
// {
// TimedCurrencyGrantId = 0
// },
// XpSinks = [new()
// {
// XpSources = new(new []{xpSource}),
// XpMultipliers = new( new []{xpMultiplier}),
// GiftMessage = "A Gift"
// }],
// TeamConfig = new()
// {
// TimeLimitedEventTeamConfigId = 0,
// TimeLimitedEventTeamConfig = new()
// {
// TimeLimitedEventTeamConfigId = 0,
// ReplicationId = ReplicationId,
// MaxPlayersPerTeam = 4,
// TeamRegistrationStartTime = DateTime.UtcNow,
// TeamRegistrationEndTime = DateTime.UtcNow.AddHours(24),
// ActiveExperiment = "experiment"
// }
// }
// }
// };
return File.ReadAllText("event_cbe9582c-6314-4ba3-ad0e-57d220b79aff.json");
});
app.MapGet("/api/avatar/v4/items", () => File.ReadAllText("avataritems.json"));
app.MapGet("/api/avatar/v1/defaultbaseavataritems", () => File.ReadAllText("defaultbaseavataritems.json"));
app.MapGet("/api/storefronts/v4/balance/{type}", (int type) =>
{
app.Logger.LogWarning("(econ) /api/storefronts/v4/balance/500 STUB");
List<BalanceResponse> responses = new();
BalanceResponse response = new()
{
Balance = 1000,
CurrencyType = -type,
BalanceType = StorefrontBalanceType.SteamPurchased
};
responses.Add(response);
return responses;
});
app.MapGet("/api/roomkeys/v1/room", (int roomId) =>
{
app.Logger.LogWarning("(econ) /api/roomkeys/v1/room STUB");
return "[]";
});
app.MapGet("/econ/customAvatarItems/v1/owned", (int skip, int take) =>
{
app.Logger.LogWarning("(econ) /econ/customAvatarItems/v1/owned STUB");
OwnedCustomAvatarItems owned = new()
{
TotalResults = 0,
Results = Array.Empty<object>()
};
return owned;
});
app.MapGet("/api/avatar/v2", (HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
return File.ReadAllText("ServerData/Accounts/" + user.id + "/Avatar.json");
}
}
return "{}";
// return Results.NotFound();
});
app.MapGet("/api/objectives/v1/myprogress", () =>
{
app.Logger.LogWarning("(econ) /api/objectives/v1/myprogress STUB");
List<ObjectiveGroup> objectiveGroups = new();
List<Objective> objectives = new();
ObjectiveGroup group = new()
{
ClearedAt = DateTime.Now.AddYears(1),
Group = 0,
IsCompleted = false,
RequiresCompleteOnServer = false
};
Objective objective = new()
{
Group = 0,
HasClaimedReward = false,
Index = 0,
IsCompleted = false,
IsRewarded = false,
Progress = 0,
VisualProgress = 0,
};
objectiveGroups.Add(group);
objectives.Add(objective);
MyProgress myProgress = new()
{
ObjectiveGroups = objectiveGroups,
Objectives = objectives
};
return myProgress;
});
app.MapPost("/api/objectives/v1/updateobjective", () =>
{
app.Logger.LogWarning("(econ) /api/objectives/v1/updateobjective STUB");
return "";
});
app.MapGet("/api/storefronts/v3/giftdropstore/{id}", () =>
{
app.Logger.LogWarning("(econ) /api/storefronts/v3/giftdropstore/3 STUB");
return File.ReadAllText("giftdrop.json");
});
app.MapGet("/api/checklist/v1/current", () =>
{
app.Logger.LogWarning("(econ) /api/checklist/v1/current STUB");
List<ChecklistObjective> objectives = new();
ChecklistObjective objective = new()
{
Order = 0,
Objective = ObjectiveType.AddAFriend,
Count = 1
};
ChecklistObjective objective2 = new()
{
Order = 1,
Objective = ObjectiveType.CheerARoom,
Count = 5
};
objectives.Add(objective);
objectives.Add(objective2);
return objectives;
});
app.MapGet("/api/challenge/v2/getCurrent", () =>
{
app.Logger.LogWarning("(econ) /api/challenge/v2/getCurrent STUB");
return File.ReadAllText("weeklychallenge.json");
});
app.MapGet("/api/avatar/v3/saved", (HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
return Results.Ok(user.outfits);
}
}
return Results.NotFound();
});
app.MapPost("/api/avatar/v3/saved/set", ([FromBody] OutfitSaveRequest request, HttpRequest hrequest) =>
{
List<OutfitSaveRequest> outfits = null;
int id = 0;
foreach (var user in Auth.currentUsers)
{
if (user.token == hrequest.Headers.Authorization[0])
{
outfits = user.outfits;
id = user.id;
}
}
if (outfits.Exists(x => x.Slot == request.Slot))
{
outfits.Remove(outfits.Find(x => x.Slot == request.Slot));
}
outfits.Add(request);
File.WriteAllText("ServerData/Accounts/" + id + "/Outfits.json", JsonSerializer.Serialize(outfits));
return Results.Created("/api/avatar/v3/saved/set", request);
});
app.MapPost("/api/avatar/v4/saved/set", ([FromBody] OutfitSaveRequest request, HttpRequest hrequest) =>
{
List<OutfitSaveRequest> outfits = null;
int id = 0;
foreach (var user in Auth.currentUsers)
{
if (user.token == hrequest.Headers.Authorization[0])
{
outfits = user.outfits;
id = user.id;
}
}
if (outfits.Exists(x => x.Slot == request.Slot))
{
outfits.Remove(outfits.Find(x => x.Slot == request.Slot));
}
outfits.Add(request);
File.WriteAllText("ServerData/Accounts/" + id + "/Outfits.json", JsonSerializer.Serialize(outfits));
var response = new
{
Success = true,
Slot = request.Slot
};
return Results.Created("/api/avatar/v4/saved/set", response);
});
app.MapPost("/api/avatar/v2/set", async (HttpRequest request) =>
{
var body = new StreamReader(request.Body);
var requestBody = await body.ReadToEndAsync();
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
await File.WriteAllTextAsync("ServerData/Accounts/" + user.id + "/Avatar.json", requestBody);
return Results.Ok();
}
}
return Results.NotFound();
}).DisableAntiforgery();
app.MapGet("/api/equipment/v2/getUnlocked", () =>
{
app.Logger.LogWarning("(econ) /api/equipment/v2/getUnlocked STUB");
return File.ReadAllText("equipment.json");
});
app.MapGet("/api/consumables/v2/getUnlocked", () =>
{
app.Logger.LogWarning("(econ) /api/consumables/v2/getUnlocked STUB");
return File.ReadAllText("consumables.json");
});
app.MapGet("/api/avatar/v2/gifts", () =>
{
app.Logger.LogWarning("(econ) /api/avatar/v2/gifts STUB");
List<GiftRow> rows = new();
GiftRow row = new()
{
id = 0,
data = null,
created_at = DateTime.Now
};
rows.Add(row);
return rows;
});
app.MapGet("/api/gamerewards/v1/pending", () =>
{
app.Logger.LogWarning("(econ) /api/gamerewards/v1/pending STUB");
return "[]";
});
app.MapGet("/api/roomkeys/v1/mine", () =>
{
app.Logger.LogWarning("(econ) /api/roomkeys/v1/mine STUB");
return "[]";
});
app.MapGet("/api/roomcurrencies/v1/currencies", () =>
{
app.Logger.LogWarning("(econ) /api/roomcurrencies/v1/currencies STUB");
return "[]";
});
app.MapGet("/api/roomcurrencies/v1/getAllBalances", () =>
{
app.Logger.LogWarning("(econ) /api/roomcurrencies/v1/getAllBalances STUB");
return "[]";
});
app.MapGet("/api/roomconsumables/v1/roomConsumable/room/{roomId}", () =>
{
app.Logger.LogWarning("/api/roomconsumables/v1/roomConsumable/room/{{roomId}} STUB");
return "[]";
});
app.MapGet("/api/roomconsumables/v1/roomConsumable/room/{roomId}/me", () =>
{
app.Logger.LogWarning("/api/roomconsumables/v1/roomConsumable/room/{{roomId}}/me STUB");
return "[]";
});
app.MapPost("/api/CampusCard/v1/UpdateAndGetSubscription", () =>
{
CampusCardSubscription value = new()
{
canBuySubscription = true,
subscription = new()
{
CreatedAt = DateTime.Now,
ExpirationDate = DateTime.UtcNow.AddDays(30),
IsActive = true,
IsAutoRenewing = true,
Level = 0,
ModifiedAt = DateTime.Now,
Period = 0,
PlatformId = "0",
PlatformPurchaseId = "0",
PlatformType = 0,
RecNetPlayerId = 0,
SubscriptionId = 0
},
platformAccountSubscribedPlayerId = 0
};
return Results.Created("/api/CampusCard/v1/UpdateAndGetSubscription", value);
});
app.MapGet("/api/itemWishlists/v1/wishlist/me", () =>
{
app.Logger.LogWarning("(econ) /api/itemWishlists/v1/wishlist/me STUB");
return "[]";
});
// app.MapGet("/api/subscriptionseasons/v1/seasons/current", () =>
// {
// app.Logger.LogWarning("(econ) /api/subscriptionseasons/v1/seasons STUB");
//
// return "{}";
// });
app.MapPost("/api/consumables/v1/consume", () =>
{
app.Logger.LogWarning("(econ) /api/consumables/v1/consume STUB");
return Results.Ok();
});
app.MapPost("/subscription/v1/cancel", () =>
{
return Results.Ok();
});
}
}
+28
View File
@@ -0,0 +1,28 @@
namespace asdfasdf.APIs;
public static class Images
{
public static void Init(WebApplication app)
{
app.MapGet("/img/{name}", async (string name, HttpContext context) =>
{
context.Response.Headers.Append("content-signature", "key-id=KEY:RSA:p1.rec.net; data=IWwe/pZ5vWWqNSkSM/54isgDxlZkdrP0sUrppKCbNktO2yCOTjq746xWiiLsueGuVcAGQqkjeRTimxolHckS/YXSYkEJxtiCXbLlsRia2DyAqtWVkGWsfczzFhp/56U66FVzolTspPCvjScOVlGO7dDIK7sJ+ndcRauWjsQsC6g3e7rUc6uwY099a6gy7sw6xr5BFZQSz8wg+fqyHYD/Sc4nQQVOTFZNNASqbJYhpNhEMXRnafCMuLl8a3mkGwvy3t4q2D/7SM48xrGZjEV47qNx1A91KCe28XVToFh4BzwEUU8nZ0d+KwV79MGarLo1cY8igc8FcoThKcovI4ClOg==");
if (File.Exists("wwwroot/" + name))
{
string mime = "image/png";
if (Path.GetExtension(name) == ".jpg")
{
mime = "image/jpeg";
}
return Results.File(await File.ReadAllBytesAsync("wwwroot/" + name), mime);
}
else
{
return Results.File(await File.ReadAllBytesAsync("wwwroot/lemres.png"), "image/png");
}
});
}
}
+430
View File
@@ -0,0 +1,430 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
namespace asdfasdf.APIs;
public static class Matchmaking
{
public static RoomInstance currentInstance = null;
private static string region = "us";
private static int currentStatusVisibility = 0;
private static DateTime lastOnline = DateTime.UtcNow;
public static void Init(WebApplication app)
{
if (File.Exists("ServerData/LastHeartbeat.json"))
{
currentInstance = JsonSerializer.Deserialize<Heartbeat>(File.ReadAllText("ServerData/LastHeartbeat.json")).roomInstance;
}
if (File.Exists("ServerData/LastPhotonRegion"))
{
region = File.ReadAllText("ServerData/LastPhotonRegion");
}
app.MapPost("/player/login", () =>
{
return Results.Ok();
});
app.MapPost("/player/logout", (HttpRequest request) =>
{
for (int i = 0; i < Auth.currentUsers.Count; i++)
{
if (Auth.currentUsers[i].token == request.Headers.Authorization[0])
{
Auth.currentUsers.RemoveAt(i);
break;
}
}
return Results.Ok();
});
app.MapGet("/player/qos", () =>
{
app.Logger.LogWarning("(Matchmaking) /player/qos STUB");
List<QosEndpoint> qosEndpoints = new();
QosEndpoint qos = new()
{
Id = "stub",
Address = "127.0.0.1"
};
qosEndpoints.Add(qos);
return qosEndpoints;
});
app.MapPost("/player/heartbeat", (HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
return user.heartbeat;
}
}
return null;
});
app.MapPut("/player/statusvisibility", ([FromForm] string statusVisibility, HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
user.currentStatusVisibility = int.Parse(statusVisibility);
}
}
return Results.Ok();
}).DisableAntiforgery();
app.MapGet("/player", (string id) =>
{
List<Heartbeat> players = new();
foreach (var user in Auth.currentUsers)
{
if (user.id == int.Parse(id))
{
players.Add(user.heartbeat);
}
}
return players;
});
app.MapPost("/player/exclusivelogin", () =>
{
var response = new
{
errorCode = 0
};
return response;
});
// Can't get the in (India?) param because of c# being c#
app.MapPut("/player/photonregionpings", ([FromForm] int ussc, [FromForm] int us, [FromForm] int cae, [FromForm] int usw, [FromForm] int eu, [FromForm] int sa, [FromForm] int ru, [FromForm] int tr, [FromForm] int jp, [FromForm] int rue, [FromForm] int au, [FromForm] int hk, [FromForm] int asia, [FromForm] int za, [FromForm] int kr, [FromForm] int uae) =>
{
List<RegionPing> regionPings = new();
regionPings.Add(new("ussc", ussc));
regionPings.Add(new("us", us));
regionPings.Add(new("cae", cae));
regionPings.Add(new("usw", usw));
regionPings.Add(new("eu", eu));
regionPings.Add(new("sa", sa));
regionPings.Add(new("ru", ru));
regionPings.Add(new("tr", tr));
regionPings.Add(new("jp", jp));
regionPings.Add(new("rue", rue));
regionPings.Add(new("au", au));
regionPings.Add(new("hk", hk));
regionPings.Add(new("asia", asia));
regionPings.Add(new("za", za));
regionPings.Add(new("kr", kr));
regionPings.Add(new("uae", uae));
RegionPing[] regionLowestPing = regionPings.Where((x) => x.Ping == regionPings.Min(y => y.Ping)).ToArray();
region = regionLowestPing[0].Name;
return Results.Ok();
}).DisableAntiforgery();
app.MapPost("/matchmake/none", () =>
{
return Results.NotFound();
});
app.MapPost("/matchmake/dorm", (HttpRequest request) =>
{
long instanceId = Random.Shared.Next(1000, 999999999);
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
currentInstance = new()
{
isPrivate = true,
location = "76d98498-60a1-430c-ab76-b54a29b7a163",
maxCapacity = 4,
name = "@" + user.account.username + "'s" + " DormRoom",
photonRegion = region,
photonRegionId = region,
photonRoomId = "Dorm-" + instanceId + "-room",
roomId = -1,
roomInstanceId = instanceId,
subRoomId = -1
};
user.currentInstance = currentInstance;
user.UpdateHeartbeat();
return Results.Ok(user.heartbeat);
}
}
return Results.NotFound();
});
app.MapPost("/matchmake/room/{id}", (HttpRequest request, long id, [FromQuery] long? subRoomId = null) =>
{
long instanceId;
string region;
if (!string.IsNullOrEmpty(ServerConfig.config.PhotonInstanceId))
{
instanceId = long.Parse(ServerConfig.config.PhotonInstanceId);
}
else
{
instanceId = Random.Shared.Next(1000, 999999999);
}
if (!string.IsNullOrEmpty(ServerConfig.config.PhotonRegion))
{
region = ServerConfig.config.PhotonRegion;
}
else
{
region = Matchmaking.region;
}
foreach (var user in Auth.currentUsers)
{
if (user.currentInstance != null)
{
if (user.currentInstance.roomId == id)
{
instanceId = user.currentInstance.roomInstanceId;
region = user.currentInstance.photonRegion;
}
}
}
string path = "ServerData/Rooms/" + id + "/info.json";
Room room = null;
for (int i = 0; i < Rooms.roomNamesToIds.names.Count; i++)
{
if (Rooms.roomNamesToIds.names[i].id == id)
{
room = JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + Rooms.roomNamesToIds.names[i].name + "/info.json"));
}
}
if (room == null)
{
return Results.NotFound();
}
SubRooms subRoom;
if (subRoomId != null)
{
subRoom = room.SubRooms.FirstOrDefault(s => s.SubRoomId == subRoomId.Value);
}
else
{
subRoom = room.SubRooms?.FirstOrDefault();
}
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
currentInstance = new()
{
name = "^" + room.Name,
isPrivate = false,
location = subRoom.UnitySceneId,
maxCapacity = subRoom.MaxPlayers,
photonRegion = region,
photonRegionId = region,
photonRoomId = "Room-" + room.Name + "-room",
roomId = room.RoomId,
roomInstanceId = instanceId,
subRoomId = subRoom.SubRoomId
};
user.currentInstance = currentInstance;
user.UpdateHeartbeat();
return Results.Ok(user.heartbeat);
}
}
return Results.NotFound();
});
app.MapPost("/matchmake/room/{roomId}/{subRoomId}", (long roomId, long subRoomId, HttpRequest request) =>
{
long instanceId;
string region;
if (!string.IsNullOrEmpty(ServerConfig.config.PhotonInstanceId))
{
instanceId = long.Parse(ServerConfig.config.PhotonInstanceId);
}
else
{
instanceId = Random.Shared.Next(1000, 999999999);
}
if (!string.IsNullOrEmpty(ServerConfig.config.PhotonRegion))
{
region = ServerConfig.config.PhotonRegion;
}
else
{
region = Matchmaking.region;
}
foreach (var user in Auth.currentUsers)
{
if (user.currentInstance != null)
{
if (user.currentInstance.roomId == roomId)
{
instanceId = user.currentInstance.roomInstanceId;
region = user.currentInstance.photonRegion;
}
}
}
string path = "ServerData/Rooms/" + roomId + "/info.json";
Room room = null;
for (int i = 0; i < Rooms.roomNamesToIds.names.Count; i++)
{
if (Rooms.roomNamesToIds.names[i].id == roomId)
{
room = JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + Rooms.roomNamesToIds.names[i].name + "/info.json"));
}
}
if (room == null)
{
return Results.NotFound();
}
SubRooms subRoom;
if (subRoomId != null)
{
subRoom = room.SubRooms.FirstOrDefault(s => s.SubRoomId == subRoomId);
}
else
{
subRoom = room.SubRooms?.FirstOrDefault();
}
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
currentInstance = new()
{
name = "^" + room.Name,
isPrivate = false,
location = subRoom.UnitySceneId,
maxCapacity = subRoom.MaxPlayers,
photonRegion = region,
photonRegionId = region,
photonRoomId = "Room-" + room.Name + "-room",
roomId = room.RoomId,
roomInstanceId = instanceId,
subRoomId = subRoom.SubRoomId
};
user.currentInstance = currentInstance;
user.UpdateHeartbeat();
return Results.Ok(user.heartbeat);
}
}
return Results.NotFound();
});
// 2020 cv2 update
app.MapPost("/goto/room/{roomName}", (string roomName, HttpRequest request) =>
{
long instanceId = Random.Shared.Next(1000, 999999999);
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
currentInstance = new()
{
isPrivate = true,
location = "76d98498-60a1-430c-ab76-b54a29b7a163",
maxCapacity = 4,
name = "@" + user.account.username + "'s" + " DormRoom",
photonRegion = region,
photonRegionId = region,
photonRoomId = "Dorm-" + instanceId + "-room",
roomId = -1,
roomInstanceId = instanceId,
subRoomId = -1
};
user.currentInstance = currentInstance;
user.UpdateHeartbeat();
return Results.Ok(user.heartbeat);
}
}
return Results.NotFound();
});
app.MapGet("/player/avoidjuniors", () =>
{
return bool.Parse(File.ReadAllText("ServerData/Accounts/2/avoidjuniors"));
});
app.MapPut("/player/avoidjuniors", ([FromForm] bool avoidJuniors, HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
File.WriteAllText("ServerData/Accounts/" + user.id + "/avoidjuniors", avoidJuniors.ToString());
return Results.Ok();
}
}
return Results.NotFound();
}).DisableAntiforgery();
app.MapGet("/rooms/requiring/rrplus", () =>
{
return "[]";
});
app.MapGet("/rooms/requiring/developer", () =>
{
return "[]";
});
app.MapPost("/roominstance/{instance}/reportjoinresult", () =>
{
return Results.Ok();
});
}
}
+16
View File
@@ -0,0 +1,16 @@
namespace asdfasdf.APIs;
public static class Moderation
{
public static void Init(WebApplication app)
{
app.MapGet("/voice/config", () =>
{
var result = new
{
enabled = false
};
return result;
});
}
}
+58
View File
@@ -0,0 +1,58 @@
using System.Text.Json;
namespace asdfasdf.APIs;
public static class NameServer
{
public static void Init(WebApplication app)
{
if (!File.Exists("ServerData/ns.json"))
{
string url = "https://127.0.0.1";
NameServerResponse ns = new()
{
Accounts = url,
AI = url,
API = url,
Auth = url,
BugReporting = url,
Cards = url,
CDN = url,
Chat = url,
Clubs = url,
CMS = url,
Commerce = url,
Data = url,
DataCollection = url,
Discovery = url,
Econ = url,
GameLogs = url,
Geo = url,
Images = url + "/img",
Leaderboard = url,
Link = url,
Lists = url,
Matchmaking = url,
Moderation = url,
Notifications = url,
PlatformNotifications = url,
PlayerSettings = url,
RoomComments = url,
RoomieIntegrations = url,
Rooms = url,
Storage = url,
Strings = url,
StringsCDN = url,
Studio = url,
StudioCDN = url,
Thorn = url,
Videos = url,
WWW = url
};
File.WriteAllText("ServerData/ns.json", JsonSerializer.Serialize(ns));
}
app.MapGet("/", () => File.ReadAllText("ServerData/ns.json"));
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace asdfasdf.APIs;
public static class PlatformNotifications
{
public static void Init(WebApplication app)
{
app.MapGet("/crm/me/config/v3", () =>
{
return File.ReadAllText("PlatformNotificationsConfigV3.json");
});
}
}
+57
View File
@@ -0,0 +1,57 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
namespace asdfasdf.APIs;
public static class PlayerSettingsAPI
{
public static void Init(WebApplication app)
{
app.MapGet("/playersettings", (HttpRequest request) =>
{
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
return user.ps;
}
}
return null;
});
app.MapPut("/playersettings", ([FromForm] string key, [FromForm] string value, HttpRequest request) =>
{
List<PlayerSetting> ps = null;
int id = 0;
foreach (var user in Auth.currentUsers)
{
if (user.token == request.Headers.Authorization[0])
{
ps = user.ps;
id = user.id;
}
}
if (ps.Exists(x => x.Key == key))
{
app.Logger.LogInformation("Removing setting " + key);
ps.Remove(ps.Find(x => x.Key == key));
}
app.Logger.LogInformation("Adding setting " + key + " with value " + value);
ps.Add(new(){Key = key, Value = value});
File.WriteAllText("ServerData/Accounts/" + id + "/PlayerSettings.json", JsonSerializer.Serialize(ps));
ApiResponseNoValue response = new()
{
success = true
};
return response;
}).DisableAntiforgery();
}
}
+618
View File
@@ -0,0 +1,618 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
namespace asdfasdf.APIs;
public static class Rooms
{
public static NameToIds roomNamesToIds;
private static void UpdateRoomNamesToIds()
{
NameToIds newRoomNamesToIds = new();
newRoomNamesToIds.names = new();
string[] dirs = Directory.GetDirectories("ServerData/Rooms");
newRoomNamesToIds.count = dirs.Length;
foreach (var room in dirs)
{
Room roomJson = JsonSerializer.Deserialize<Room>(File.ReadAllText(room + "/info.json"));
newRoomNamesToIds.names.Add(new()
{
id = roomJson.RoomId,
name = roomJson.Name
});
}
File.WriteAllText("ServerData/RoomNamesToIds.json", JsonSerializer.Serialize(newRoomNamesToIds));
}
public static void Init(WebApplication app)
{
if (!File.Exists("ServerData/RoomNamesToIds.json"))
{
UpdateRoomNamesToIds();
}
roomNamesToIds = JsonSerializer.Deserialize<NameToIds>(File.ReadAllText("ServerData/RoomNamesToIds.json"));
if (roomNamesToIds.count != Directory.GetDirectories("ServerData/Rooms").Length)
{
UpdateRoomNamesToIds();
}
app.MapGet("/rooms/ownedby/me", () =>
{
List<RoomDTO> ownedRooms = new();
DirectoryInfo roomsDir = new("ServerData/Rooms");
foreach (DirectoryInfo roomDir in roomsDir.EnumerateDirectories())
{
RoomDTO room = JsonSerializer.Deserialize<RoomDTO>(File.ReadAllText(roomDir.FullName + "/info.json"));
ownedRooms.Add(room);
}
return ownedRooms;
});
app.MapGet("/rooms/createdby/me", () =>
{
List<RoomDTO> ownedRooms = new();
DirectoryInfo roomsDir = new("ServerData/Rooms");
foreach (DirectoryInfo roomDir in roomsDir.EnumerateDirectories())
{
RoomDTO room = JsonSerializer.Deserialize<RoomDTO>(File.ReadAllText(roomDir.FullName + "/info.json"));
ownedRooms.Add(room);
}
return ownedRooms;
});
app.MapGet("/rooms/visitedby/me", (int skip, int take) =>
{
List<RoomDTO> ownedRooms = new();
DirectoryInfo roomsDir = new("ServerData/Rooms");
foreach (DirectoryInfo roomDir in roomsDir.EnumerateDirectories())
{
RoomDTO room = JsonSerializer.Deserialize<RoomDTO>(File.ReadAllText(roomDir.FullName + "/info.json"));
ownedRooms.Add(room);
}
return ownedRooms;
});
app.MapPost("/rooms/create", async (HttpRequest request) =>
{
var a = await request.ReadFormAsync();
var name = a.ElementAt(0);
var ugcVersion = a.ElementAt(1);
app.Logger.LogWarning($"(Rooms) /rooms/create STUB\n{name}\n{ugcVersion}");
RoomDTO room = new()
{
Name = name.Value,
UgcVersion = byte.Parse(ugcVersion.Value),
CreatedAt = DateTime.Now
};
CreateFolder("ServerData/Rooms/" + name.Value);
File.WriteAllText("ServerData/Rooms/" + name.Value + "/info.json", JsonSerializer.Serialize(room));
return Results.Created("/rooms/create", room);
});
app.MapPost("/rooms/{id}/clone", (int id, [FromForm] string name, HttpRequest request) =>
{
LoggedInUser user = null;
foreach (var user2 in Auth.currentUsers)
{
if (user2.token == request.Headers.Authorization[0])
{
user = user2;
}
}
if (user == null)
{
return Results.NotFound();
}
Room room = null;
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].id == id)
{
room = JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomNamesToIds.names[i].name + "/info.json"));
}
}
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].name == name)
{
ApiResponse alreadyExistsResponse = new()
{
success = false,
error = "The room " + roomNamesToIds.names[i].name + " already exists."
};
return Results.Ok(alreadyExistsResponse);
}
}
if (room == null)
{
return Results.NotFound();
}
List<Tags> tags = new();
tags.Add(new("beta", 1));
tags.Add(new("community", 2));
tags.Add(new("screen", 2));
tags.Add(new("walkvr", 2));
tags.Add(new("teleportvr", 2));
tags.Add(new("junior", 2));
tags.Add(new("pickout", 2));
room.Name = name;
room.RoomId = roomNamesToIds.count + 5;
room.SubRooms[0].RoomId = room.RoomId;
room.SubRooms[0].SubRoomId = 0;
room.SubRooms[0].CreatorAccountId = user.id;
room.Tags = tags;
room.ImageName = "lemres.png";
room.CreatorAccountId = user.id;
room.Roles[1].AccountId = user.id;
Directory.CreateDirectory("ServerData/Rooms/" + name);
File.WriteAllText("ServerData/Rooms/" + name + "/info.json", JsonSerializer.Serialize(room));
UpdateRoomNamesToIds();
roomNamesToIds = JsonSerializer.Deserialize<NameToIds>(File.ReadAllText("ServerData/RoomNamesToIds.json"));
ApiResponse response = new()
{
success = true,
error = string.Empty,
value = room
};
return Results.Ok(response);
}).DisableAntiforgery();
app.MapGet("/rooms", (string name, int include) =>
{
if (!Directory.Exists("ServerData/Rooms/" + name))
{
// return Results.NotFound();
}
return File.ReadAllText("ServerData/Rooms/" + name + "/info.json");
});
app.MapGet("/rooms/bulk", (string name, bool? excludePrivateRooms) =>
{
if (!Directory.Exists("ServerData/Rooms/" + name))
{
return Results.NotFound();
}
List<Room> rooms = new();
rooms.Add(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + name + "/info.json")));
return Results.Ok(rooms);
});
app.MapGet("/rooms/{id}", (int id, int include) =>
{
if (Directory.Exists("ServerData/Rooms/" + id))
{
return Results.Ok(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + id + "/info.json")));
}
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].id == id)
{
return Results.Ok(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomNamesToIds.names[i].name + "/info.json")));
}
}
return Results.NotFound();
});
app.MapGet("/rooms/hot", (int skip, int take) =>
{
app.Logger.LogWarning("(Rooms) /rooms/hot STUB");
List<Room> rooms = new();
rooms.Add(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/RecCenter/info.json")));
var pagedRooms = new
{
Results = rooms,
TotalResults = 1
};
return pagedRooms;
});
app.MapGet("/rooms/{id}/interactionby/me", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{id}}/interactionby/me STUB");
var result = new
{
Cheered = true,
Favorited = true,
LastVisitedAt = DateTime.UtcNow
};
return result;
});
app.MapPut("/rooms/{id}/interactionby/me/favorite", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{id}}/interactionby/me/favorite STUB");
return new { Favorited = true };
});
app.MapDelete("/rooms/{id}/interactionby/me/favorite", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{id}}/interactionby/me/favorite STUB");
return new { Favorited = false };
});
app.MapPut("/rooms/{id}/interactionby/me/cheer", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{id}}/interactionby/me/cheer STUB");
return new { Cheered = true };
});
app.MapDelete("/rooms/{id}/interactionby/me/cheer", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{id}}/interactionby/me/cheer STUB");
return new { Cheered = false };
});
app.MapGet("/photon_access_token", () =>
{
app.Logger.LogWarning("(Rooms) /photon_access_token STUB");
List<PhotonPermission> permissions = new();
permissions.Add(new()
{
Permission = "CAN_USE_ROOM_RESET_BUTTON",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_USE_DELETE_ALL_BUTTON",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_SAVE_INVENTIONS",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_SPAWN_INVENTIONS",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_USE_PLAY_GIZMOS_TOGGLE",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_USE_MAKER_PEN",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_USE_ROOM_RESET_BUTTON",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_USE_DELETE_ALL_BUTTON",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_SAVE_INVENTIONS",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_SPAWN_INVENTIONS",
Role = 0,
Override = true
});
permissions.Add(new()
{
Permission = "CAN_USE_PLAY_GIZMOS_TOGGLE",
Role = 0,
Override = true
});
PhotonAccessTokenObject accessToken = new()
{
Permissions = permissions.ToArray(),
PhotonAccessToken = "",
RoomInstanceId = Matchmaking.currentInstance.roomInstanceId
};
return accessToken;
});
app.MapGet("/publishState/configs", () =>
{
app.Logger.LogWarning("(Rooms) /publishState/configs STUB");
RoomPublishStateConfig config = new()
{
UpdateMaxCount = 5,
UpdateRollingWindowInDays = 10,
UpdateExpirationInDays = 9,
UpdateCooldownInDays = 1
};
ApiResponse response = new()
{
success = true,
value = config
};
return response;
});
app.MapGet("/rooms/{roomId}/subrooms/{subroomId}/saves", (int roomId, int subroomId) =>
{
app.Logger.LogWarning("(Rooms) /rooms/id/subrooms/id/saves STUB");
Room room = null;
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].id == roomId)
{
room = JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomNamesToIds.names[i].name + "/info.json"));
}
}
if (room == null)
{
return Results.NotFound();
}
SubRooms subRoom = room.SubRooms[0];
List<CurrentSave> saves = new();
if (subRoom.CurrentSave == null)
{
saves.Add(new()
{
SubRoomId = (int)room.SubRooms[0].SubRoomId,
SubRoomDataSaveId = 1001,
ReferencedUnityAssetIds = Array.Empty<object>(),
PersistenceVersion = 50,
OMVersion = 0,
CreatedAt = DateTime.Now,
UgcSubVersion = 0,
});
}
else
{
saves.Add(subRoom.CurrentSave);
}
return Results.Ok(saves[0]);
});
app.MapPost("/rooms/{roomId}/subrooms/{subroomId}/data", async (int roomId, int subroomId, HttpRequest request) =>
{
Room room = null;
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].id == roomId)
{
room = JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomNamesToIds.names[i].name + "/info.json"));
}
}
if (room == null)
{
return Results.NotFound();
}
var body = new StreamReader(request.Body);
var requestBody = await body.ReadToEndAsync();
SaveRequest saveRequest = JsonSerializer.Deserialize<SaveRequest>(requestBody);
if (room.SubRooms[0].CurrentSave == null)
{
room.SubRooms[0].CurrentSave = new()
{
SubRoomId = (int)room.SubRooms[0].SubRoomId,
SubRoomDataSaveId = 1001,
ReferencedUnityAssetIds = Array.Empty<object>(),
PersistenceVersion = 50,
OMVersion = 0,
CreatedAt = DateTime.Now,
UgcSubVersion = 0,
};
}
room.SubRooms[0].CurrentSave.DataBlob = saveRequest.SubRoomData.Filename;
room.SubRooms[0].CurrentSave.PersistenceVersion = saveRequest.PersistenceVersion;
ApiResponse response = new()
{
error = string.Empty,
success = true,
value = new SubroomSaveResponse
{
room = room,
subRoomDataSave = room.SubRooms[0].CurrentSave
}
};
if (File.Exists("ServerData/Rooms/" + room.Name + "/info.json.bak"))
{
File.Delete("ServerData/Rooms/" + room.Name + "/info.json.bak");
}
File.Move("ServerData/Rooms/" + room.Name + "/info.json", "ServerData/Rooms/" + room.Name + "/info.json.bak");
await File.WriteAllTextAsync("ServerData/Rooms/" + room.Name + "/info.json", JsonSerializer.Serialize(room));
return Results.Ok(response);
}).DisableAntiforgery();
app.MapGet("/rooms/{roomId}/subrooms/{subroomId}/data", (int roomId, int subroomId) =>
{
Room room = null;
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].id == roomId)
{
room = JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomNamesToIds.names[i].name + "/info.json"));
}
}
if (room == null)
{
return Results.NotFound();
}
return Results.Ok(room.SubRooms[0]);
}).DisableAntiforgery();
app.MapPost("/rooms/regennamestoids", () =>
{
UpdateRoomNamesToIds();
roomNamesToIds = JsonSerializer.Deserialize<NameToIds>(File.ReadAllText("ServerData/RoomNamesToIds.json"));
});
app.MapGet("/rooms/{roomId}/playerdata/me", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{roomId}}/playerdata/me STUB");
RoomPlayerData playerData = new()
{
Data = string.Empty
};
return playerData;
});
app.MapGet("/room/{name}", async (string name, HttpContext context) =>
{
return Results.File(await File.ReadAllBytesAsync("wwwroot/room/" + name));
});
app.MapGet("/rooms/{roomId}/similar", (int roomId) =>
{
app.Logger.LogWarning("(Rooms) /rooms/{{roomId}}/similar STUB");
List<Room> rooms = new();
rooms.Add(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/RecCenter/info.json")));
var pagedRooms = new
{
Results = rooms,
TotalResults = 1
};
return pagedRooms;
});
app.MapGet("/rooms/base", () =>
{
app.Logger.LogWarning("(Rooms) /rooms/base STUB");
List<Room> rooms = new();
rooms.Add(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/MakerRoom/info.json")));
return rooms;
});
app.MapGet("/room/{roomId}/instances", (int roomId) =>
{
List<RoomInstance> instances = new();
foreach (var user in Auth.currentUsers)
{
if (user.currentInstance != null)
{
if (user.currentInstance.roomId == roomId)
{
instances.Add(user.currentInstance);
}
}
}
return instances;
});
// 2020
app.MapGet("/api/rooms/v4/details/{roomId}", (int roomId) =>
{
if (Directory.Exists("ServerData/Rooms/" + roomId))
{
return Results.Ok(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomId + "/info.json")));
}
for (int i = 0; i < roomNamesToIds.names.Count; i++)
{
if (roomNamesToIds.names[i].id == roomId)
{
return Results.Ok(JsonSerializer.Deserialize<Room>(File.ReadAllText("ServerData/Rooms/" + roomNamesToIds.names[i].name + "/info.json")));
}
}
return Results.NotFound();
});
}
private static void CreateFolder(string dir)
{
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
}
}
+30
View File
@@ -0,0 +1,30 @@
namespace asdfasdf.APIs;
public static class Storage
{
public static void Init(WebApplication app)
{
app.MapPost("/upload", async (HttpRequest request) =>
{
var file = request.Form.Files.FirstOrDefault();
string fileName;
if (Matchmaking.currentInstance != null)
{
fileName = Matchmaking.currentInstance.roomId + "-" + Guid.NewGuid() + ".room";
}
else
{
fileName = Guid.NewGuid() + ".room";
}
using (var stream = new FileStream("wwwroot/room/" + fileName, FileMode.Create))
{
await file.CopyToAsync(stream);
}
return Results.Ok(new {Filename = fileName});
});
}
}
+61
View File
@@ -0,0 +1,61 @@
namespace asdfasdf.APIs;
public static class Studio
{
public static void Init(WebApplication app)
{
app.MapGet("/analytics/rudderstack-api-key", () =>
{
return "23NiJHIgu3koaGNCZIiuYvIQNCu";
});
app.MapGet("/access/override/0", () =>
{
app.Logger.LogWarning("(Studio) /access/override/0 STUB");
AccessOverrideDTO access = new()
{
AccountId = Accounts.account.accountId,
AvatarStudioAccess = AvatarStudioAccessFlags.Avatars | AvatarStudioAccessFlags.Roomie | AvatarStudioAccessFlags.Badges | AvatarStudioAccessFlags.Consumables,
CreatedAt = DateTime.Now,
ModifiedAt = DateTime.Now,
StudioAccess = StudioAccessType.AlwaysAllow
};
return access;
});
app.MapGet("/collaboration/owners-in-room", (int roomId, long subRoomId) =>
{
app.Logger.LogWarning("(Studio) /collaboration/owners-in-room STUB");
StudioOwnersInRoom ownersInRoom = new()
{
success = true,
};
return ownersInRoom;
});
app.MapGet("/cloud-builds/for-room", (int roomId, int subRoomId, int skip, int take) =>
{
return new CloudBuildDTO()
{
CloudBuildId = string.Empty,
StartedAt = DateTime.MinValue,
CompletedAt = DateTime.MinValue,
Error = string.Empty,
UnityAssetId = string.Empty,
CreatedByAccountId = 3
};
});
}
}
+28
View File
@@ -0,0 +1,28 @@
namespace asdfasdf;
[Serializable]
public class AccessOverrideDTO
{
public int AccountId { get; set; }
public StudioAccessType StudioAccess { get; set; }
public AvatarStudioAccessFlags AvatarStudioAccess { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime ModifiedAt { get; set; }
}
public enum StudioAccessType : byte
{
StatBased,
AlwaysAllow,
NoStudioAccess
}
[Flags]
public enum AvatarStudioAccessFlags
{
None = 0,
Avatars = 1,
Roomie = 2,
Badges = 4,
Consumables = 8
}
+18
View File
@@ -0,0 +1,18 @@
namespace asdfasdf;
public class Account
{
public int AccountId { get; set; }
public string RawUsername { get; set; }
public string Username { get; set; }
public string DisplayName { get; set; }
public string DisplayEmoji { get; set; }
public string ProfileImage { get; set; }
public string BannerImage { get; set; }
public bool TreatAsJunior { get; set; }
public bool HasBirthday { get; set; }
public PersonalPronouns PersonalPronouns { get; set; }
public IdentityFlags IdentityFlags { get; set; }
public DateTime CreatedAt { get; set; }
public bool IsJunior { get; set; }
}
+11
View File
@@ -0,0 +1,11 @@
namespace asdfasdf;
[Serializable]
public class AccountDTO
{
public int AccountId { get; set; }
public string Username { get; set; }
public string Displayname { get; set; }
public string ProfileImage { get; set; }
public string Email { get; set; }
}
+14
View File
@@ -0,0 +1,14 @@
namespace asdfasdf;
[Serializable]
public class AccountPrivilege
{
public int AccountId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public DateTime EndDate { get; set; }
public Int32 AssociatedAccountid { get; set; }
public string AssociatedAccountUsername { get; set; }
public ReportCategory ReportCategory { get; set; }
public string DisplayReason { get; set; }
}
+12
View File
@@ -0,0 +1,12 @@
namespace asdfasdf;
[Serializable]
public class AmplitudeConfig
{
public string AmplitudeKey { get; set; }
public bool UseRudderStack { get; set; }
public string RudderStackKey { get; set; }
public bool UseStatSig { get; set; }
public string StatSigKey { get; set; }
public int StatSigEnvironment { get; set; }
}
+17
View File
@@ -0,0 +1,17 @@
namespace asdfasdf;
[Serializable]
public class ApiResponse
{
public string error { get; set; }
public bool success { get; set; }
public Object value { get; set; }
}
[Serializable]
public class ApiResponseNoValue
{
public string error { get; set; }
public string error_id { get; set; }
public bool success { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
namespace asdfasdf;
[Serializable]
public class Avatar
{
public string FaceFeatures { get; set; }
public string HairColor { get; set; }
public string OutfitSelections { get; set; }
public string SkinColor { get; set; }
}
+15
View File
@@ -0,0 +1,15 @@
namespace asdfasdf;
[Serializable]
public class BacktraceConfig
{
public int ReportBudget { get; set; }
public int FilterType { get; set; }
public int SampleRate { get; set; }
public int LogLineCount { get; set; }
public int CaptureNativeCrashes { get; set; }
public int AMRThresholdMS { get; set; }
public int MessageCount { get; set; }
public string MessageRegex { get; set; }
public string VersionRegex { get; set; }
}
+51
View File
@@ -0,0 +1,51 @@
namespace asdfasdf;
[Serializable]
public class BalanceResponse
{
public long Balance { get; set; }
public int CurrencyType { get; set; }
public StorefrontBalanceType BalanceType { get; set; }
}
public enum CurrencyType
{
Invalid = 0,
LaserTagTickets = 1,
RecCenterTokens = 2,
LostSkullsGold = 3,
DraculaSilver = 4,
RecRoyale_Season1 = 5,
RoomCurrency = 6,
RoomInventoryItem = 7,
ProgressionEvent = 8,
RoomieCredits = 9,
PaintballPaint = 10,
}
public enum StorefrontBalanceType
{
NonPurchasedNotUsableInP2P = 0,
NonPurchasedDefault = 1,
SteamPurchased = 2,
OculusPurchased = 3,
PlayStationPurchased = 4,
MicrosoftPurchased = 5,
RecNetPurchased = 6,
IOSPurchased = 7,
GooglePlayPurchased = 8,
PicoPurchased = 9,
SwitchPurchased = 10,
PlayStationNonPurchasedP2P = 11,
NonPlayStationNonPurchasedP2P = 12,
NonPurchasedEarnedByP2P = 13,
NonPurchasedEarnedByP2Pv2 = 14,
UndistributedRoomEarnings = 15,
RoomieResetEveryRRPlusMonth = 16,
RoomieEnergyPack = 17,
RoomieVideoContest = 18,
GameAIOverspend = 19,
GameAIDeveloperSpend = 20,
GameAIPromo = 21,
GameAIPromoPrivateRoom = 22,
}
+22
View File
@@ -0,0 +1,22 @@
namespace asdfasdf;
[Serializable]
public class BulkAccount
{
public int AvailableUsernameChanges { get; set; }
public string Email { get; set; }
public DateTime Birthday { get; set; }
public bool IsFakeJuniorBirthday { get; set; }
public int accountId { get; set; }
public string username { get; set; }
public string displayName { get; set; }
public string displayEmoji { get; set; }
public string profileImage { get; set; }
public string bannerImage { get; set; }
public bool isJunior { get; set; }
public PlatformType platforms { get; set; }
public PersonalPronouns personalPronouns { get; set; }
public IdentityFlags identityFlags { get; set; }
public DateTime createdAt { get; set; }
public bool isMetaPlatformBlocked { get; set; }
}
+29
View File
@@ -0,0 +1,29 @@
namespace asdfasdf;
[Serializable]
public class BulkCustomAvatarItem
{
public string CustomAvatarItemId { get; set; }
public int CreatorAccountId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public int Price { get; set; }
public int Accessibility { get; set; }
public bool ForceCannotPublish { get; set; }
public bool IsFeatured { get; set; }
public bool IsRecRoomApproved { get; set; }
public string BaseAvatarItemId { get; set; }
public string BaseAvatarItemColor { get; set; }
public string DesignFilename { get; set; }
public string ThumbnailImageFilename { get; set; }
public string CreatedAt { get; set; }
public string ModifiedAt { get; set; }
public int PreviewOrientation { get; set; }
public string RankingContext { get; set; }
public int OutfitType { get; set; }
public Array CurrentSaves { get; set; }
public string PurchaseInfo { get; set; }
public Array Tags { get; set; }
public string CustomBadgeMetadata { get; set; }
public string RankedEntityId { get; set; }
}
+16
View File
@@ -0,0 +1,16 @@
namespace asdfasdf;
[Serializable]
public class BulkPlayerReputation
{
public int AccountId { get; set; }
public int CheerCreative { get; set; }
public int CheerCredit { get; set; }
public int CheerGeneral { get; set; }
public int CheerGreatHost { get; set; }
public int CheerHelpful { get; set; }
public int CheerSportsman { get; set; }
public bool IsCheerful { get; set; }
public int Noteriety { get; set; }
public int SelectedCheer { get; set; }
}
+11
View File
@@ -0,0 +1,11 @@
namespace asdfasdf;
[Serializable]
public class CachedAccount
{
public int AccountId { get; set; }
public DateTime LastLoginTime { get; set; }
public PlatformType Platform { get; set; }
public string PlatformId { get; set; }
public bool RequirePassword { get; set; }
}
+26
View File
@@ -0,0 +1,26 @@
namespace asdfasdf;
[Serializable]
public class CampusCardSubscription
{
public bool canBuySubscription { get; set; }
public RRPlusSubscription subscription { get; set; }
public int platformAccountSubscribedPlayerId { get; set; }
}
[Serializable]
public class RRPlusSubscription
{
public DateTime CreatedAt { get; set; }
public DateTime ExpirationDate { get; set; }
public bool IsActive { get; set; }
public bool IsAutoRenewing { get; set; }
public int Level { get; set; }
public DateTime ModifiedAt { get; set; }
public int Period { get; set; }
public string PlatformId { get; set; }
public string PlatformPurchaseId { get; set; }
public int PlatformType { get; set; }
public int RecNetPlayerId { get; set; }
public int SubscriptionId { get; set; }
}
+15
View File
@@ -0,0 +1,15 @@
namespace asdfasdf;
[Serializable]
public class CharadeWords
{
public List<CharadeWord> words { get; set; }
}
[Serializable]
public class CharadeWord(int id, string text)
{
public int Id { get; set; } = id;
public int Difficulty { get; set; }
public string EN_US { get; set; } = text;
}
+143
View File
@@ -0,0 +1,143 @@
namespace asdfasdf;
[Serializable]
public class ChecklistObjective
{
public int Order { get; set; }
public ObjectiveType Objective { get; set; }
public int Count { get; set; }
}
public enum ObjectiveType
{
Default = 0,
FirstSessionOfDay = 1,
AddAFriend = 2,
PartyUp = 3,
AllOtherChallenges = 4,
LevelUp = 5,
CheerAPlayer = 6,
PointedAtPlayer = 7,
CheerARoom = 8,
SubscribeToPlayer = 9,
DailyObjective1 = 10,
DailyObjective2 = 11,
DailyObjective3 = 12,
AllDailyObjectives = 13,
CompleteAnyDaily = 14,
CompleteAnyWeekly = 15,
OOBE_GoToLockerRoom = 16,
OOBE_GoToActivity = 17,
OOBE_FinishActivity = 18,
NUX_PunchcardObjective = 19,
NUX_AllPunchcardObjectives = 20,
GoToRecCenter = 21,
FinishActivity = 22,
VisitACustomRoom = 23,
CreateACustomRoom = 24,
ScoreBasketInRecCenter = 25,
UploadPhotoToRecNet = 26,
UpdatePlayerBio = 27,
SaveOutfitSlot = 28,
PurchaseClothingItem = 29,
PurchaseNonClothingItem = 30,
TookPhotoWithPlayers = 31,
ChangeOutfitInDorm = 32,
VisitRooms = 33,
VisitRoomWith20Players = 34,
RoomieCatch = 35,
HighFivePlayer = 36,
CharadesGames = 37,
CharadesWinsPerformer = 38,
CharadesWinsGuesser = 39,
CharadesGameWithFriends = 40,
DiscGolfWins = 41,
DiscGolfGames = 42,
DiscGolfHolesUnderPar = 43,
DiscGolfGameWithFriends = 44,
DodgeballWins = 45,
DodgeballGames = 46,
DodgeballHits = 47,
DodgeballGameWithFriends = 48,
PaddleballGames = 49,
PaddleballWins = 50,
PaddleballScores = 51,
PaddleballGameWithFriends = 52,
PaintballAnyModeGames = 53,
PaintballAnyModeWins = 54,
PaintballAnyModeHits = 55,
PaintballGameWithMods = 56,
PaintballAnyModeGameWithFriends = 57,
PaintballCTFWins = 58,
PaintballCTFGames = 59,
PaintballCTFHits = 60,
PaintballFlagCaptures = 61,
PaintballTeamBattleWins = 62,
PaintballTeamBattleGames = 63,
PaintballTeamBattleHits = 64,
PaintballFreeForAllWins = 65,
PaintballFreeForAllGames = 66,
PaintballFreeForAllHits = 67,
SoccerWins = 68,
SoccerGames = 69,
SoccerGoals = 70,
SoccerGameWithFriends = 71,
BowlingGames = 72,
BowlingWins = 73,
BowlingStrike = 74,
BowlingGameWithFriends = 75,
QuestGames = 76,
QuestWins = 77,
QuestPlayerRevives = 78,
QuestEnemyKills = 79,
QuestGames_Goblin1 = 80,
QuestWins_Goblin1 = 81,
QuestPlayerRevives_Goblin1 = 82,
QuestEnemyKills_Goblin1 = 83,
QuestGameWithFriends_Goblin1 = 84,
QuestGames_Goblin2 = 85,
QuestWins_Goblin2 = 86,
QuestPlayerRevives_Goblin2 = 87,
QuestEnemyKills_Goblin2 = 88,
QuestGameWithFriends_Goblin2 = 89,
QuestGames_Scifi1 = 90,
QuestWins_Scifi1 = 91,
QuestPlayerRevives_Scifi1 = 92,
QuestEnemyKills_Scifi1 = 93,
QuestGameWithFriends_Scifi1 = 94,
QuestGames_Pirate1 = 95,
QuestWins_Pirate1 = 96,
QuestPlayerRevives_Pirate1 = 97,
QuestEnemyKills_Pirate1 = 98,
QuestGameWithFriends_Pirate1 = 99,
QuestGames_Dracula1 = 100,
QuestWins_Dracula1 = 101,
QuestPlayerRevives_Dracula1 = 102,
QuestEnemyKills_Dracula1 = 103,
QuestGameWithFriends_Dracula1 = 104,
ArenaGames = 105,
ArenaWins = 106,
ArenaPlayerRevives = 107,
ArenaHeroTags = 108,
ArenaBotTags = 109,
RecRoyaleGames = 110,
RecRoyaleWins = 111,
RecRoyaleTags = 112,
RecRoyaleGameWithFriends = 113,
StuntRunnerGames = 114,
StuntRunnerWins = 115,
StuntRunnerGameWithFriends = 116,
RecRallyGames = 117,
RecRallyWins = 118,
RecRallyGameWithFriends = 119,
BackpackGames = 120,
BackpackGameWins = 121,
PlayMinutesInHorror = 122,
PlayMinutesInObby = 123,
PlayMinutesInPVP = 124,
PlayMinutesInGame = 125,
LocomoteMetersInHorror = 126,
LocomoteMetersInObby = 127,
LocomoteMetersInPVP = 128,
LocomoteMetersInGame = 129,
}
+12
View File
@@ -0,0 +1,12 @@
namespace asdfasdf;
[Serializable]
public class CloudBuildDTO
{
public string CloudBuildId { get; set; }
public DateTime StartedAt { get; set; }
public DateTime? CompletedAt { get; set; }
public string Error { get; set; }
public string UnityAssetId { get; set; }
public int CreatedByAccountId { get; set; }
}
+46
View File
@@ -0,0 +1,46 @@
namespace asdfasdf;
[Serializable]
public class Club
{
public string Name { get; set; }
public string Description { get; set; }
public string MainImageName { get; set; }
public ClubState State { get; set; }
public string PrimaryTag { get; set; }
public ClubVisibility Visibility { get; set; }
public ClubJoinability Joinability { get; set; }
public bool AllowJuniors { get; set; }
public int MinLevel { get; set; }
public int MemberCount { get; set; }
public Int64 ClubhouseRoomId { get; set; }
public ClubType ClubType { get; set; }
}
public enum ClubState
{
Active = 0,
PendingJunior = 1,
Moderation_PendingReview = 2,
Moderation_Closed = 3,
MarkedForDelete = 4,
}
public enum ClubVisibility
{
Private = 0,
Public = 1,
}
public enum ClubJoinability
{
Open = 0,
InviteOnly = 1,
AskToJoin = 2,
}
public enum ClubType
{
Generic = 0,
Creator = 1,
}
@@ -0,0 +1,17 @@
namespace asdfasdf;
[Serializable]
public class CustomAvatarItems_CreationAllowed
{
public Error err { get; set; }
public string error { get; set; }
public string error_id { get; set; }
public bool success { get; set; }
}
[Serializable]
public class Error
{
public string id { get; set; }
public string message { get; set; }
}
+39
View File
@@ -0,0 +1,39 @@
namespace asdfasdf;
[Serializable]
public class DataCollection_event
{
public string EventType { get; set; }
public EventParams EventParams { get; set; }
}
[Serializable]
public class EventParams
{
public string event_type { get; set; }
public string app_version { get; set; }
public string ip { get; set; }
public string language { get; set; }
public DateTime event_time { get; set; }
public DateTime time { get; set; }
public string session_id { get; set; }
public int event_id { get; set; }
public int sequence_number { get; set; }
public string insert_id { get; set; }
public string stable_id { get; set; }
public EventProperties event_properties { get; set; }
public string _EventType { get; set; }
public string _Id { get; set; }
public string _GameSessionId { get; set; }
public string _AccountId { get; set; }
public string _Time { get; set; }
public string _TimenUtc { get; set; }
}
[Serializable]
public class EventProperties
{
public string game_platform { get; set; }
public string client_launcher { get; set; }
public string user_crm { get; set; }
}
+1
View File
@@ -0,0 +1 @@
{"FaceFeatures":"{\u0022ver\u0022:6,\u0022eyeId\u0022:\u0022AjGMoJhEcEehacRZjUMuDg\u0022,\u0022eyePos\u0022:{\u0022x\u0022:0.0,\u0022y\u0022:0.0},\u0022eyeScl\u0022:0.0,\u0022mouthId\u0022:\u0022FrZBRanXEEK29yKJ4jiMjg\u0022,\u0022mouthPos\u0022:{\u0022x\u0022:0.0,\u0022y\u0022:0.0},\u0022mouthScl\u0022:0.0,\u0022hairPrimaryColorId\u0022:\u0022\u0022,\u0022hairSecondaryColorId\u0022:\u0022UAT0OaWEkUG-mWDIyiX1Kg\u0022,\u0022hairPatternId\u0022:\u0022\u0022,\u0022beardColorId\u0022:\u0022UAT0OaWEkUG-mWDIyiX1Kg\u0022,\u0022beardSecondaryColorId\u0022:\u0022UAT0OaWEkUG-mWDIyiX1Kg\u0022,\u0022beardPatternId\u0022:\u0022\u0022,\u0022faceShapeId\u0022:\u0022yR4oYZr_AUSynXCgwS2lGw\u0022,\u0022bodyShapeId\u0022:\u0022bY1RGIph0kiAxbd6Shn9tQ\u0022,\u0022useHatAnchorParams\u0022:true,\u0022useHelmetHair\u0022:1,\u0022hideEars\u0022:false,\u0022hatAnchorParams\u0022:{\u0022NormalizedPosition\u0022:{\u0022x\u0022:0.5,\u0022y\u0022:0.5},\u0022HemisphereOffsets\u0022:{\u0022x\u0022:0.0,\u0022y\u0022:0.0,\u0022z\u0022:0.0},\u0022HemisphereRotations\u0022:{\u0022x\u0022:0.0,\u0022y\u0022:0.0,\u0022z\u0022:0.0}}}","HairColor":"UAT0OaWEkUG-mWDIyiX1Kg","OutfitSelections":"193a3bf9-abc0-4d78-8d63-92046908b1c5,,0;8aa79563-ace1-4ba7-ad0c-f3210a78142f,95e4cc30-cb68-473d-a395-feadf5b51512,05f0ee6e-c824-470e-9178-5ed576c6fe0c,,1","SkinColor":"4fb0fdbd-b10a-492e-8df2-b43f981b2ce6"}
+78
View File
@@ -0,0 +1,78 @@
[
{
"Key" : "SplitTestAssignedSegments",
"Value" : "1|{\"SplitTesting+RoomRecommendations_2020_05_06\":\"Off\",\"SplitTesting+RoomRecommendationsType_2020_08_14\":\"Aug14MinVisitors35000\",\"SplitTesting+Promo_Pack_2020_05_27\":\"NoPurchaseReminder\",\"SplitTesting+GottaGoFastNUX_2020_09_04\":\"Off\",\"SplitTesting+ProfileOnClick_2021_04_30\":\"Off\",\"SplitTesting+PlayHighlightCardSizes_2021_05_04\":\"On\",\"SplitTesting+IOSLowHalfResolutionTextures_2021_05_14\":\"On\",\"SplitTesting+NotificationPermissionsSkipButton_2021_06_25\":\"HideSkipButton\",\"SplitTesting+NotificationPermissionsContextualPrompts_2021_06_25\":\"Control\"}"
},
{
"Key" : "Recroom.AccountCreation.HasStarted",
"Value" : "False"
},
{
"Key" : "PlayerSessionCount",
"Value" : "0"
},
{
"Key" : "Recroom.AccountCreation.HasChosenUsername",
"Value" : "False"
},
{
"Key" : "Recroom.AccountCreation.HasCreatedPassword",
"Value" : "False"
},
{
"Key" : "Recroom.AccountCreation.HasFinished",
"Value" : "False"
},
{
"Key" : "BACKPACK_FAVORITE_TOOL",
"Value" : "-1"
},
{
"Key" : "MakerPen_SnappingMode",
"Value" : "0"
},
{
"Key" : "HAS_OPENED_WATCH_MENU_BEFORE",
"Value" : "False"
},
{
"Key" : "SCREENS_MOUSE_SENSITIVITY",
"Value" : "12"
},
{
"Key" : "QualitySettings_Desktop_VRMissing",
"Value" : "3"
},
{
"Key" : "Recroom.ChallengeMap",
"Value" : "1"
},
{
"Key" : "TUTORIAL_COMPLETE_MASK",
"Value" : "57"
},
{
"Key" : "SCREENS_HEAD_BOB",
"Value" : "0"
},
{
"Key" : "DisablePersonalBubbleForFriends",
"Value" : "True"
},
{
"Key" : "VoiceChat",
"Value" : "0"
},
{
"Key" : "IgnoreBuffer",
"Value" : "1"
},
{
"Key" : "USER_TRACKING",
"Value" : "1"
},
{
"Key" : "HasCheckedForPlatformReferrers",
"Value" : "True"
}
]
+12
View File
@@ -0,0 +1,12 @@
namespace asdfasdf;
[Serializable]
public class DeviceAuthorizationResponse
{
public string device_code { get; set; }
public string user_code { get; set; }
public string verification_uri { get; set; }
public string verification_uri_complete { get; set; }
public int expires_in { get; set; }
public int interval { get; set; }
}
+9
View File
@@ -0,0 +1,9 @@
namespace asdfasdf;
[Serializable]
public class GiftRow
{
public int id { get; set; }
public string data { get; set; }
public DateTime created_at { get; set; }
}
+18
View File
@@ -0,0 +1,18 @@
namespace asdfasdf;
[Serializable]
public class Heartbeat
{
public string appVersion { get; set; }
// public string clientJoinData { get; set; }
public int deviceClass { get; set; }
public int errorCode { get; set; }
public bool isOnline { get; set; }
// public DateTime lastOnline { get; set; }
// public PlatformType platform { get; set; }
public int playerId { get; set; }
public RoomInstance roomInstance { get; set; }
// public long serverTime { get; set; }
public int statusVisibility { get; set; }
public int vrMovementMode { get; set; }
}
+17
View File
@@ -0,0 +1,17 @@
namespace asdfasdf;
[Serializable]
public class HubNego
{
public string negotiateVersion { get; set; }
public string connectionId { get; set; }
public string connectionToken { get; set; }
public AvailableTransports[] availableTransports { get; set; }
}
public class AvailableTransports
{
public string transport { get; set; }
public string[] transferFormats { get; set; }
}
+17
View File
@@ -0,0 +1,17 @@
namespace asdfasdf;
[Flags]
public enum IdentityFlags
{
None = 0,
LGBTQIA = 1,
Transgender = 2,
Bisexual = 3,
Lesbian = 4,
Pansexual = 5,
Asexual = 6,
Intersex = 7,
Genderqueer = 8,
Nonbinary = 9,
Aromantic = 10,
}
+15
View File
@@ -0,0 +1,15 @@
namespace asdfasdf;
public class Invocation
{
public int type { get; set; }
public string invocationId { get; set; }
public bool nonblocking { get; set; }
public string target { get; set; }
public Arguments[] arguments { get; set; }
}
public class Arguments
{
public int[] PlayerIds { get; set; }
}
+16
View File
@@ -0,0 +1,16 @@
namespace asdfasdf;
public class KeepsakesConfig
{
}
public class KeepsakesOptions
{
}
public class KeepsakeTheme
{
}
+18
View File
@@ -0,0 +1,18 @@
namespace asdfasdf;
[Serializable]
public class LoadingScreenTip
{
public string Name { get; set; }
public string Title { get; set; }
public string Message { get; set; }
public object[] RoomNames { get; set; }
public int Context { get; set; }
public int InputType { get; set; }
public int Visibility { get; set; }
public bool AllowCycling { get; set; }
public bool RestrictToNewUsers { get; set; }
public string ImageName { get; set; }
public int PlatformMask { get; set; }
public DateTime CreatedAt { get; set; }
}
+142
View File
@@ -0,0 +1,142 @@
[
{
"Name": "bf5d8d41a7184e779399ff45a9e8785a",
"Title": "Rec Room Tokens",
"Message": "Redeem your Rec Room Tokens for all kinds of fun rewards! You can shop at the Rec Center Merch Booth or the Store section of your Watch Menu.",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 175,
"CreatedAt": "2019-02-28T18:27:25Z"
},
{
"Name": "3801fdd940334b85a7460ffdda73f9de",
"Title": "Become a Star!",
"Message": "Use #RecRoom on your Instagram and Twitter posts for a chance to make it onto our Community Board!",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 167,
"CreatedAt": "2019-02-28T18:15:33Z"
},
{
"Name": "d517b46a3f734db39d77f2a15b105495",
"Title": "Find Your Style",
"Message": "Personalize your outfit and appearance in your Dorm Room.",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 175,
"CreatedAt": "2019-03-02T00:12:59Z"
},
{
"Name": "bc8569de432a4cc4b0e69d1b619921cb",
"Title": "Room Cheers",
"Message": "Cheer and Favorite any room in the This Room section of your Watch Menu.",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 175,
"CreatedAt": "2019-02-28T18:08:56Z"
},
{
"Name": "4a9bec133a26457280eb30887e9442d9",
"Title": "Daily Challenges",
"Message": "Check out the Challenges section in your watch for fun ways to earn in-game rewards.",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 175,
"CreatedAt": "2019-02-28T18:22:44Z"
},
{
"Name": "511adb340964437cbbe4ad382a658b52",
"Title": "Welcome to Rec Room",
"Message": "Rec Room is a virtual social club where you create and play games with friends. It's a fun and welcoming environment for people from all walks of life!",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 175,
"CreatedAt": "2019-02-28T18:28:32Z"
},
{
"Name": "0ec7868f309843158bfb7fd94fd2a80a",
"Title": "Join the Rec Room Community!",
"Message": "See recroom.com/community for links to Rec Room's YouTube, Instagram, Discord, and MORE!",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 167,
"CreatedAt": "2019-02-28T18:24:33Z"
},
{
"Name": "f0c49e1d5ce146638f1cb53f5d4f0bb2",
"Title": "Play on the go!",
"Message": "Download Rec Room on your iOS device and play anywhere!",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 131,
"CreatedAt": "2019-12-21T01:24:23Z"
},
{
"Name": "ae71ae948ce041bba799ee8d6ee9a0ba",
"Title": "Laser Tag Merch",
"Message": "You earn tickets for every game of Laser Tag. Redeem them for awesome Laser Tag gear!",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 175,
"CreatedAt": "2019-02-28T18:07:50Z"
},
{
"Name": "169b34a66ed046ba84cb2dbf43562a26",
"Title": "We're all on Rec.Net!",
"Message": "Log into your Rec.Net profile to stay in touch with your friends any time!",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 1,
"AllowCycling": true,
"RestrictToNewUsers": false,
"ImageName": "lemres.png",
"PlatformMask": 239,
"CreatedAt": "2019-02-28T18:21:25Z"
}
]
+40
View File
@@ -0,0 +1,40 @@
using System.Text.Json;
using asdfasdf.APIs;
namespace asdfasdf;
[Serializable]
public class LoggedInUser
{
public string token { get; set; }
public int id { get; set; }
public List<OutfitSaveRequest> outfits { get; set; }
public BulkAccount account { get; set; }
public int currentStatusVisibility { get; set; }
public int deviceClass { get; set; }
public Heartbeat heartbeat { get; set; }
public RoomInstance currentInstance { get; set; }
public List<PlayerSetting> ps { get; set; }
public void UpdateHeartbeat()
{
heartbeat = new()
{
appVersion = "20230302",
deviceClass = deviceClass,
errorCode = 0,
isOnline = true,
playerId = id,
roomInstance = null,
statusVisibility = currentStatusVisibility,
vrMovementMode = 0
};
if (currentInstance != null)
{
heartbeat.roomInstance = currentInstance;
}
File.WriteAllText("ServerData/LoggedInUsers.json", JsonSerializer.Serialize(Auth.currentUsers));
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace asdfasdf;
[Serializable]
public class LoginInfo
{
}
+22
View File
@@ -0,0 +1,22 @@
namespace asdfasdf;
[Serializable]
public class LoginResponse
{
public string Error { get; set; }
public string ErrorDescription { get; set; }
public string AccessToken { get; set; }
public string RefreshToken { get; set; }
public string Key { get; set; }
public SecurityCodeHint CodeHint { get; set; }
public string LoginContext { get; set; }
public string Challenge { get; set; }
}
[Serializable]
public class SecurityCodeHint
{
public string Text { get; set; }
public int Length { get; set; }
public bool AllowAlpha { get; set; }
}
+50
View File
@@ -0,0 +1,50 @@
namespace asdfasdf;
[Serializable]
public class ModerationBlockDetail
{
public ReportCategory ReportCategory { get; set; }
public int Duration { get; set; }
public long GameSessionId { get; set; }
public bool IsHostKick { get; set; }
public string Message { get; set; }
public Int32 PlayerIdReporter { get; set; }
public bool IsBan { get; set; }
public bool IsVoiceModAutoban { get; set; }
public bool IsDeviceBan { get; set; }
public bool IsWarning { get; set; }
public string VoteKickReason { get; set; }
public DateTime TimeoutStartedAt { get; set; }
public string AssociatedAccountUsername { get; set; }
public bool ShowCreatorCodeOfConduct { get; set; }
public string TopMessageOverride { get; set; }
public string BottomMessageOverride { get; set; }
public float BlockStartTime { get; set; }
}
public enum ReportCategory
{
Moderator = 0,
Unknown = 1,
DEPRECATED_MicrophoneAbuse = 2,
Harassment = 3,
Cheating = 4,
DEPRECATED_ImmatureBehavior = 5,
AFK = 6,
Misc = 7,
Underage = 8,
VoteKick = 9,
MisleadingPurchases = 10,
CoC_Underage = 11,
CoC_Sexual = 12,
CoC_Discrimination = 13,
CoC_Trolling = 14,
CoC_NameOrProfile = 15,
InappropriateClothing = 16,
IssuingInaccurateReports = 17,
RoomInventoryItems = 18,
InappropriateRooms = 19,
InappropriateInventions = 20,
RoomOffers = 21,
Spam = 22
}
+29
View File
@@ -0,0 +1,29 @@
namespace asdfasdf;
[Serializable]
public class MyProgress
{
public List<ObjectiveGroup> ObjectiveGroups { get; set; }
public List<Objective> Objectives { get; set; }
}
[Serializable]
public class ObjectiveGroup
{
public DateTime ClearedAt { get; set; }
public int Group { get; set; }
public bool IsCompleted { get; set; }
public bool RequiresCompleteOnServer { get; set; }
}
[Serializable]
public class Objective
{
public int Group { get; set; }
public bool HasClaimedReward { get; set; }
public int Index { get; set; }
public bool IsCompleted { get; set; }
public bool IsRewarded { get; set; }
public int Progress { get; set; }
public int VisualProgress { get; set; }
}
+43
View File
@@ -0,0 +1,43 @@
namespace asdfasdf;
[Serializable]
public class NameServerResponse
{
public string Accounts { get; set; }
public string AI { get; set; }
public string API { get; set; }
public string Auth { get; set; }
public string BugReporting { get; set; }
public string Cards { get; set; }
public string CDN { get; set; }
public string Chat { get; set; }
public string Clubs { get; set; }
public string CMS { get; set; }
public string Commerce { get; set; }
public string Data { get; set; }
public string DataCollection { get; set; }
public string Discovery { get; set; }
public string Econ { get; set; }
public string GameLogs { get; set; }
public string Geo { get; set; }
public string Images { get; set; }
public string Leaderboard { get; set; }
public string Link { get; set; }
public string Lists { get; set; }
public string Matchmaking { get; set; }
public string Moderation { get; set; }
public string Notifications { get; set; }
public string PlatformNotifications { get; set; }
public string PlayerSettings { get; set; }
public string RoomComments { get; set; }
public string RoomieIntegrations { get; set; }
public string Rooms { get; set; }
public string Storage { get; set; }
public string Strings { get; set; }
public string StringsCDN { get; set; }
public string Studio { get; set; }
public string StudioCDN { get; set; }
public string Thorn { get; set; }
public string Videos { get; set; }
public string WWW { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class NameToId
{
public int id { get; set; }
public string name { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class NameToIds
{
public int count { get; set; }
public List<NameToId> names { get; set; }
}
+118
View File
@@ -0,0 +1,118 @@
using System.Net.WebSockets;
using System.Text;
using System.Text.Json;
namespace asdfasdf;
public static class Notify
{
private static WebSocket ws;
private static WebApplication app;
private static HttpContext httpContext;
private static CancellationToken cancellationToken;
private const string json = "{}\x1e";
public static void Init(WebApplication app)
{
app.MapPost("/hub/v1/negotiate", (HttpRequest request) =>
{
Guid guid = Guid.NewGuid();
AvailableTransports transport = new()
{
transport = "WebSockets",
transferFormats = ["Text"]
};
HubNego nego = new()
{
negotiateVersion = "0",
connectionId = guid.ToString(),
connectionToken = guid.ToString(),
availableTransports = [transport]
};
return Results.Created("/hub/v1/negotiate", nego);
});
app.Map("/hub/v1", async (HttpContext context, CancellationToken cancellationToken) =>
{
if (context.WebSockets.IsWebSocketRequest)
{
await InitNotify(context, cancellationToken, app);
}
});
}
public static async Task InitNotify(HttpContext context, CancellationToken token, WebApplication wapp)
{
app = wapp;
httpContext = context;
cancellationToken = token;
ws = await context.WebSockets.AcceptWebSocketAsync();
await HandleConnection();
}
public static async Task HandleConnection()
{
while (!cancellationToken.IsCancellationRequested && ws.State == WebSocketState.Open)
{
await Task.Delay(TimeSpan.FromSeconds(0.25f));
var buffer = new byte[8];
using var memoryStream = new MemoryStream();
WebSocketReceiveResult result;
do
{
result = await ws.ReceiveAsync(buffer, CancellationToken.None);
memoryStream.Write(buffer, 0, result.Count);
} while (!result.EndOfMessage);
buffer = memoryStream.ToArray();
string receive = Encoding.UTF8.GetString(buffer).TrimEnd('\x1e');
app.Logger.LogInformation(receive);
app.Logger.LogInformation(receive.Length.ToString());
if (receive.Length == 33)
{
app.Logger.LogInformation("sending");
await ws.SendAsync(Encoding.UTF8.GetBytes(json), WebSocketMessageType.Text, true, CancellationToken.None);
}
else if (receive.Contains("SubscribeToPlayers"))
{
var response = new
{
type = 3,
invocationId = "fuckyuo",
result = (object?)null
};
app.Logger.LogInformation("SubscribeToPlayers");
// app.Logger.LogInformation(File.ReadAllText("websocket1.json") + "␞");
// await ws.SendAsync(Encoding.UTF8.GetBytes(File.ReadAllText("websocket1.json") + "␞"), WebSocketMessageType.Text, true, CancellationToken.None);
await ws.SendAsync(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(response) + "\x1e"), WebSocketMessageType.Text, true, CancellationToken.None);
}
else if (receive.Length == 10)
{
app.Logger.LogInformation("type 6 ping or something idfk");
await ws.SendAsync(Encoding.UTF8.GetBytes(json), WebSocketMessageType.Text, true, CancellationToken.None);
}
}
if (ws.State == WebSocketState.CloseReceived)
{
await ws.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closed", CancellationToken.None);
}
app.Logger.LogInformation("WebSocket closed");
}
}
+37
View File
@@ -0,0 +1,37 @@
namespace asdfasdf;
[Serializable]
public class Outfit
{
public int Accessibility { get; set; }
public string CustomizationSettings { get; set; }
public int DataVersion { get; set; }
public OutfitLegacyData LegacyData { get; set; }
public string Name { get; set; }
public Array Selections { get; set; }
public int Slot { get; set; }
public string ThumbnailFileName { get; set; }
}
[Serializable]
public class OutfitLegacyData
{
public string FaceFeatures { get; set; }
public string HairColor { get; set; }
public string SelectionsV1 { get; set; }
public string SelectionsV2 { get; set; }
public string SkinColor { get; set; }
}
[Serializable]
public class OutfitSaveRequest
{
public int Slot { get; set; }
public string PreviewImageName { get; set; }
public string OutfitSelections { get; set; }
public string OutfitSelectionsV2 { get; set; }
public string FaceFeatures { get; set; }
public string SkinColor { get; set; }
public string HairColor { get; set; }
public object[] CustomAvatarItems { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class OwnedCustomAvatarItems
{
public Array Results { get; set; }
public int TotalResults { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class ParentalControl
{
public int accountId { get; set; }
public bool disallowInAppPurchases { get; set; }
}
+13
View File
@@ -0,0 +1,13 @@
namespace asdfasdf;
[Flags]
public enum PersonalPronouns
{
None = 0,
SheHer = 1,
HeHim = 2,
TheyThem = 3,
ZeHir = 4,
ZeZir = 5,
XeXem = 6,
}
+9
View File
@@ -0,0 +1,9 @@
namespace asdfasdf;
[Serializable]
public class PhotonAccessTokenObject
{
public PhotonPermission[] Permissions { get; set; }
public string PhotonAccessToken { get; set; }
public long RoomInstanceId { get; set; }
}
+9
View File
@@ -0,0 +1,9 @@
namespace asdfasdf;
[Serializable]
public class PhotonPermission
{
public string Permission { get; set; }
public int Role { get; set; }
public bool Override { get; set; }
}
@@ -0,0 +1 @@
{"success":true,"value":{"userConfig":{"accountId":0,"allowPush":true,"assignedCrmType":0,"assignedPushNotificationService":null}}}
+16
View File
@@ -0,0 +1,16 @@
namespace asdfasdf;
public enum PlatformType
{
All = 0,
Steam = 1,
Oculus = 2,
PlayStation = 3,
Xbox = 4,
RecNet = 5,
IOS = 6,
GooglePlay = 7,
Standalone = 8,
Pico = 9,
Switch = 10,
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class PlayerEvents
{
public object[] Created { get; set; }
public object[] Responses { get; set; }
}
+14
View File
@@ -0,0 +1,14 @@
namespace asdfasdf;
[Serializable]
public class PlayerSettings
{
public List<PlayerSetting> settings { get; set; }
}
[Serializable]
public class PlayerSetting
{
public string Key { get; set; }
public string Value { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class PrivacySettings
{
public int accountId { get; set; }
public bool isRecentHistoryVisible { get; set; }
}
+197
View File
@@ -0,0 +1,197 @@
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text.Json;
using asdfasdf;
using asdfasdf.APIs;
using Microsoft.AspNetCore.Authentication.Certificate;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Https;
using JsonOptions = Microsoft.AspNetCore.Http.Json.JsonOptions;
var builder = WebApplication.CreateBuilder(args);
builder.Services.Configure<JsonOptions>(options =>
{
options.SerializerOptions.PropertyNamingPolicy = null;
});
// Add services to the container.
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
builder.Services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme).AddCertificate("x509", options =>
{
options.RevocationMode = X509RevocationMode.NoCheck;
});
builder.WebHost.ConfigureKestrel((context, options) =>
{
options.ListenAnyIP(443, listenOptions =>
{
listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
listenOptions.UseHttps();
});
options.ConfigureHttpsDefaults(h =>
{
h.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
h.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13;
});
});
builder.Services.AddAuthorization();
builder.Services.AddHttpLogging();
builder.Services.AddLogging();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSignalR();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
app.UseSwagger();
app.UseSwaggerUI();
// app.UseRequestResponseLogging();
}
WebSocketOptions wsOptions = new()
{
KeepAliveInterval = TimeSpan.FromMinutes(1)
};
app.UseHttpLogging();
app.UseStaticFiles();
app.UseAuthentication();
app.UseAuthorization();
app.UseWebSockets(wsOptions);
CreateFolder("ServerData");
CreateFolder("ServerData/Accounts");
CreateFolder("ServerData/CachedAccounts");
CreateFolder("ServerData/BugReports");
CreateFolder("ServerData/Rooms");
CreateFolder("ServerData/Accounts/1");
CreateFolder("ServerData/Accounts/2");
if (!File.Exists("ServerData/Accounts/1/user.json"))
{
BulkAccount tAccount = new()
{
AvailableUsernameChanges = 1,
Email = "coach@coach.com",
Birthday = DateTime.MinValue,
IsFakeJuniorBirthday = false,
accountId = 1,
username = "Coach",
displayName = "Coach",
displayEmoji = "",
profileImage = "DefaultProfileImage.png",
bannerImage = "DefaultProfileImage.png",
isJunior = false,
platforms = PlatformType.All,
personalPronouns = PersonalPronouns.None,
identityFlags = IdentityFlags.None,
createdAt = DateTime.UtcNow,
isMetaPlatformBlocked = false
};
File.WriteAllText("ServerData/Accounts/1/user.json", JsonSerializer.Serialize(tAccount));
}
if (!File.Exists("ServerData/Accounts/2/user.json"))
{
BulkAccount tAccount = new()
{
AvailableUsernameChanges = 1,
Email = "email@email.com",
Birthday = DateTime.MinValue,
IsFakeJuniorBirthday = false,
accountId = 0,
username = Environment.UserName,
displayName = Environment.UserName,
displayEmoji = "",
profileImage = "DefaultProfileImage.png",
bannerImage = "DefaultProfileImage.png",
isJunior = false,
platforms = PlatformType.All,
personalPronouns = PersonalPronouns.None,
identityFlags = IdentityFlags.None,
createdAt = DateTime.UtcNow,
isMetaPlatformBlocked = false
};
File.WriteAllText("ServerData/Accounts/2/user.json", JsonSerializer.Serialize(tAccount));
}
if (!File.Exists("ServerData/Accounts/2/PlayerSettings.json"))
{
File.Copy("DefaultPlayerSettings.json", "ServerData/Accounts/2/PlayerSettings.json");
}
if (!File.Exists("ServerData/Accounts/2/avoidjuniors"))
{
File.WriteAllText("ServerData/Accounts/2/avoidjuniors", "false");
}
if (!File.Exists("ServerData/Accounts/2/Avatar.json"))
{
File.Copy("DefaultAvatar.json", "ServerData/Accounts/2/Avatar.json");
}
if (!File.Exists("ServerData/Config.json"))
{
ServerConfig.config = new()
{
PhotonRegion = string.Empty,
PhotonInstanceId = string.Empty
};
File.WriteAllText("ServerData/Config.json", JsonSerializer.Serialize(ServerConfig.config));
}
else
{
ServerConfig.config = JsonSerializer.Deserialize<ServerConfig>(File.ReadAllText("ServerData/Config.json"));
}
NameServer.Init(app);
API.Init(app);
Auth.Init(app);
Accounts.Init(app);
Matchmaking.Init(app);
Commerce.Init(app);
Moderation.Init(app);
Studio.Init(app);
Notify.Init(app);
Rooms.Init(app);
Data.Init(app);
CDN.Init(app);
DataCollection.Init(app);
Econ.Init(app);
PlayerSettingsAPI.Init(app);
Clubs.Init(app);
AI.Init(app);
PlatformNotifications.Init(app);
Chat.Init(app);
BugReporting.Init(app);
Storage.Init(app);
Images.Init(app);
Amplitude.Init(app);
app.MapGet("/generate_204", Results.NoContent);
app.Run();
static void CreateFolder(string dir)
{
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace asdfasdf;
[Serializable]
public class Progression
{
public int Level { get; set; }
public int PlayerId { get; set; }
public int XP { get; set; }
}
+23
View File
@@ -0,0 +1,23 @@
namespace asdfasdf;
public class ProgressionEvent
{
public string ActiveExperiment { get; set; }
public int BoostDailyGameplayMinutesLimit { get; set; }
public int BoosXpMultiplier { get; set; }
public string ChallengesIconImageName { get; set; }
public DateTime CollectionEndTime { get; set; }
public DateTime EndTime { get; set; }
public string EventInfoImageName { get; set; }
public int EventLeaderboardId { get; set; }
public int InitialCurrencyGrant { get; set; }
public bool IsEnabled { get; set; }
public Array KeepsakeRoomLists { get; set; }
public string Name { get; set; }
public int ProgressionEventId { get; set; }
public string PurchasableXpBoostId { get; set; }
public Array Rewards { get; set; }
public string RewardsPipImageName { get; set; }
public DateTime StartTime { get; set; }
public bool UsesBoost { get; set; }
}
+23
View File
@@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:80",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:81;http://localhost:80",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
+8
View File
@@ -0,0 +1,8 @@
namespace asdfasdf;
[Serializable]
public class QosEndpoint
{
public string Id { get; set; }
public string Address { get; set; }
}
+7
View File
@@ -0,0 +1,7 @@
namespace asdfasdf;
public class RegionPing(string name, int ping)
{
public string Name = name;
public int Ping = ping;
}
@@ -0,0 +1,120 @@
using System.Text;
namespace asdfasdf;
public class RequestResponseLoggingMiddleware
{
private readonly RequestDelegate _next;
private readonly ILogger<RequestResponseLoggingMiddleware> _logger;
public RequestResponseLoggingMiddleware(RequestDelegate next, ILogger<RequestResponseLoggingMiddleware> logger)
{
_next = next;
_logger = logger;
}
public async Task InvokeAsync(HttpContext context)
{
// First, store the original body stream
var originalRequestBody = context.Request.Body;
var originalResponseBody = context.Response.Body;
try
{
// Read and log the request body
string requestBody = await ReadRequestBodyAsync(context);
LogRequest(context, requestBody);
// Create a new memory stream for the response
using var responseBodyStream = new MemoryStream();
context.Response.Body = responseBodyStream;
// Continue the pipeline
await _next(context);
// Read and log the response body
string responseBody = await ReadResponseBodyAsync(context.Response);
LogResponse(context, responseBody);
// Copy the response to the original stream and restore it
await responseBodyStream.CopyToAsync(originalResponseBody);
}
finally
{
// Always restore the original streams
context.Request.Body = originalRequestBody;
context.Response.Body = originalResponseBody;
}
}
private async Task<string> ReadRequestBodyAsync(HttpContext context)
{
// We need to read the request body and then rewind it
context.Request.EnableBuffering();
using var streamReader = new StreamReader(
context.Request.Body,
encoding: Encoding.UTF8,
detectEncodingFromByteOrderMarks: false,
leaveOpen: true);
var requestBody = await streamReader.ReadToEndAsync();
// IMPORTANT: Reset the position to 0 to allow other middleware to read it
context.Request.Body.Position = 0;
return requestBody;
}
private async Task<string> ReadResponseBodyAsync(HttpResponse response)
{
response.Body.Seek(0, SeekOrigin.Begin);
var responseBody = await new StreamReader(response.Body).ReadToEndAsync();
response.Body.Seek(0, SeekOrigin.Begin);
return responseBody;
}
private void LogRequest(HttpContext context, string requestBody)
{
_logger.LogInformation(
"HTTP {Method} {Path} received at {Time}\n" +
"Request Headers: {Headers}\n" +
"Request Body: {Body}",
context.Request.Method,
context.Request.Path,
DateTime.UtcNow,
FormatHeaders(context.Request.Headers),
requestBody);
}
private void LogResponse(HttpContext context, string responseBody)
{
_logger.LogInformation(
"HTTP {StatusCode} returned for {Method} {Path}\n" +
"Response Headers: {Headers}\n" +
"Response Body: {Body}",
context.Response.StatusCode,
context.Request.Method,
context.Request.Path,
FormatHeaders(context.Response.Headers),
responseBody);
}
private string FormatHeaders(IHeaderDictionary headers)
{
var sb = new StringBuilder();
foreach (var (key, value) in headers)
{
sb.AppendLine($"{key}: {string.Join(", ", value)}");
}
return sb.ToString();
}
}
public static class RequestResponseLoggingMiddlewareExtensions
{
public static IApplicationBuilder UseRequestResponseLogging(this IApplicationBuilder builder)
{
return builder.UseMiddleware<RequestResponseLoggingMiddleware>();
}
}
+157
View File
@@ -0,0 +1,157 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace asdfasdf;
public class Room
{
public int RoomId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ImageName { get; set; }
public WarningMask WarningMask { get; set; }
public string CustomWarning { get; set; }
public int CreatorAccountId { get; set; }
public int State { get; set; }
public Accessibility Accessibility { get; set; }
public int PublishState { get; set; }
public bool SupportsLevelVoting { get; set; }
public bool IsRRO { get; set; }
public bool IsRecRoomApproved { get; set; }
public bool ExcludeFromLists { get; set; }
public bool ExcludeFromSearch { get; set; }
public bool SupportsScreens { get; set; }
public bool SupportsWalkVR { get; set; }
public bool SupportsTeleportVR { get; set; }
public bool SupportsVRLow { get; set; }
public bool SupportsQuest2 { get; set; }
public bool SupportsMobile { get; set; }
public bool SupportsJuniors { get; set; }
public int MinLevel { get; set; }
public AgeRating AgeRating { get; set; }
public string CreatedAt { get; set; }
public string PublishedAt { get; set; }
public object BecameRRStudioRoomAt { get; set; }
public Stats Stats { get; set; }
public object RankingContext { get; set; }
public bool IsDorm { get; set; }
public bool IsPlacePlay { get; set; }
public int MaxPlayerCalculationMode { get; set; }
public int MaxPlayers { get; set; }
public bool CloningAllowed { get; set; }
public bool DisableMicAutoMute { get; set; }
public bool DisableRoomComments { get; set; }
public bool EncryptVoiceChat { get; set; }
public bool ToxmodEnabled { get; set; }
public bool LoadScreenLocked { get; set; }
public int UgcVersion { get; set; }
public int PersistenceVersion { get; set; }
public object UgcSubVersion { get; set; }
public object MinUgcSubVersion { get; set; }
public bool AutoLocalizeRoom { get; set; }
public LocalizationContext LocalizationContext { get; set; }
public bool IsDeveloperOwned { get; set; }
public string RankedEntityId { get; set; }
public SubRooms[] SubRooms { get; set; }
public Roles[] Roles { get; set; }
public bool IsJuniorCreated { get; set; }
public List<Tags> Tags { get; set; }
public object[] PromoImages { get; set; }
public object[] PromoExternalContent { get; set; }
public LoadScreen[] LoadScreens { get; set; }
public object[] RestrictedCircuitsAllowListNames { get; set; }
}
public class Stats
{
public int CheerCount { get; set; }
public int FavoriteCount { get; set; }
public int VisitorCount { get; set; }
public int VisitCount { get; set; }
}
public class LocalizationContext
{
public object TargetLocale { get; set; }
public object Scope { get; set; }
public string[] LocalizedFields { get; set; }
}
public class SubRooms
{
public long SubRoomId { get; set; }
public int RoomId { get; set; }
public int CreatorAccountId { get; set; }
public string UnitySceneId { get; set; }
public string Name { get; set; }
public CurrentSave CurrentSave { get; set; }
public int LastModeratedSaveModerationState { get; set; }
public bool IsSandbox { get; set; }
public int MaxPlayers { get; set; }
public int Accessibility { get; set; }
public bool ShouldAutoStageSaves { get; set; }
public object StagedSubRoomDataSaveId { get; set; }
}
public class Roles
{
public int AccountId { get; set; }
public int Role { get; set; }
public object LastChangedByAccountId { get; set; }
public int InvitedRole { get; set; }
}
public class Tags(string tag, int type)
{
public string Tag { get; set; } = tag;
public int Type { get; set; } = type;
}
public class RootObject
{
public CurrentSave CurrentSave { get; set; }
}
public class CurrentSave
{
public int SubRoomDataSaveId { get; set; }
public int SubRoomId { get; set; }
public object UnityAssetId { get; set; }
public object[] ReferencedUnityAssetIds { get; set; }
public string DataBlob { get; set; }
public object DataBlobHash { get; set; }
public int PersistenceVersion { get; set; }
public int OMVersion { get; set; }
public object SavedByAccountId { get; set; }
public object SavedOnPlatform { get; set; }
public object SavedOnDeviceClass { get; set; }
public object Description { get; set; }
public int ModerationState { get; set; }
public DateTime CreatedAt { get; set; }
public int UgcSubVersion { get; set; }
}
public class SaveRequest
{
public object UnityAssetId { get; set; }
public RoomData RoomData { get; set; }
public RoomData SubRoomData { get; set; }
public string InventionUsage { get; set; }
public int PersistenceVersion { get; set; }
public string Description { get; set; }
public bool AutoPublish { get; set; }
}
public class RoomData
{
public string Filename { get; set; }
public string Hash { get; set; }
public object OwnershipProof { get; set; }
}
public class LoadScreen
{
public string ImageName { get; set; }
public string Title { get; set; }
public string Subtitle { get; set; }
}
+104
View File
@@ -0,0 +1,104 @@
using System.Text.Json.Serialization;
namespace asdfasdf;
[Serializable]
public class RoomDTO
{
public long RoomId { get; set; }
[JsonIgnore]
public string Name
{
get { return this.RawFriendlyName ?? this.RawName; }
set
{
if (this.RawFriendlyName == null)
{
this.RawName = value;
return;
}
// QDCQCKQKNNM.YHFRKBSTWMR.XYVJTJVQPCA(this.RawName == this.RawFriendlyName, "Only expecting RawFriendlyName to be used when RawName acts as a non-user-visible, non-user-editable string that's different than the room's friendly display name. Therefore, this setter only writes name modifications back to RawFriendlyName. If this is firing, that assumption must be being broken or this setter is being used in the wrong use case. Please investigate.");
this.RawFriendlyName = value;
}
}
[JsonPropertyName("Name")]
public string RawName
{
get;
set;
}
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("FriendlyName")]
public string RawFriendlyName { get; set; }
public string Description { get; set; }
public string ImageName
{
get;
set;
}
public Accessibility Accessibility { get; set; }
public bool IsPublished
{
get
{
return this.Accessibility == Accessibility.Public;
}
}
public bool SupportsScreens { get; set; }
public bool SupportsWalkVR { get; set; }
public bool SupportsTeleportVR { get; set; }
public AgeRating AgeRating { get; set; }
public WarningMask WarningMask { get; set; }
public string CustomWarning { get; set; }
public MaxPlayerCalculationMode MaxPlayerCalculationMode { get; set; }
public DateTime CreatedAt { get; set; }
public bool CloningAllowed { get; set; }
public byte UgcVersion { get; set; }
public bool IsRoomV2
{
get
{
return this.UgcVersion == 2;
}
}
public bool IsDeveloperOwned { get; set; }
public bool IsDorm { get; set; }
public int BadgeVouchersRemaining { get; set; }
}
public enum Accessibility : byte
{
Private,
Public,
Unlisted
}
public enum AgeRating : byte
{
None,
AllAges,
Age13Plus
}
[Flags]
public enum WarningMask
{
None = 0,
Scary = 1,
Mature = 2,
FlashingLights = 4,
IntenseMotion = 8,
Violence = 16,
Custom = 32,
Reports = 64
}
public enum MaxPlayerCalculationMode : byte
{
AllSubrooms,
OnlyEntrySubrooms
}
+9
View File
@@ -0,0 +1,9 @@
namespace asdfasdf;
[Serializable]
public class RoomFilters
{
public List<string> PinnedFilters { get; set; }
public List<string> PopularFilters { get; set; }
public List<string> TrendingFilters { get; set; }
}
+25
View File
@@ -0,0 +1,25 @@
namespace asdfasdf;
[Serializable]
public class RoomInstance
{
public bool EncryptVoiceChat { get; set; }
public int clubId { get; set; }
public int eventId { get; set; }
public bool isFull { get; set; }
public bool isInProgress { get; set; }
public bool isPrivate { get; set; }
public string location { get; set; }
public int matchmakingPolicy { get; set; }
public int maxCapacity { get; set; }
public string name { get; set; }
public string photonRegion { get; set; }
public string photonRegionId { get; set; }
public string photonRoomId { get; set; }
public string roomCode { get; set; }
public int roomId { get; set; }
public long roomInstanceId { get; set; }
public int roomInstanceType { get; set; }
public long subRoomId { get; set; }
}
+7
View File
@@ -0,0 +1,7 @@
namespace asdfasdf;
[Serializable]
public class RoomInstancesObject
{
}
+7
View File
@@ -0,0 +1,7 @@
namespace asdfasdf;
[Serializable]
public class RoomPlayerData
{
public string Data { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
namespace asdfasdf;
[Serializable]
public class RoomPublishStateConfig
{
public int UpdateMaxCount { get; set; }
public int UpdateRollingWindowInDays { get; set; }
public int UpdateExpirationInDays { get; set; }
public int UpdateCooldownInDays { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
namespace asdfasdf;
[Serializable]
public class RoomieUserAccess
{
public string error { get; set; }
public string error_id { get; set; }
public bool success { get; set; }
public string value { get; set; }
}
+7
View File
@@ -0,0 +1,7 @@
namespace asdfasdf;
[Serializable]
public class SanitizeRequest
{
public string Value { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
namespace asdfasdf;
[Serializable]
public class ServerConfig
{
public static ServerConfig config;
public string PhotonRegion { get; set; }
public string PhotonInstanceId { get; set; }
}
+98
View File
@@ -0,0 +1,98 @@
{
"RoomId": 1,
"Name": "DormRoom",
"Description": "Your private room",
"ImageName": "lemres.png",
"WarningMask": 0,
"CustomWarning": null,
"CreatorAccountId": 0,
"State": 0,
"Accessibility": 2,
"PublishState": 0,
"SupportsLevelVoting": false,
"IsRRO": true,
"IsRecRoomApproved": false,
"ExcludeFromLists": false,
"ExcludeFromSearch": false,
"SupportsScreens": true,
"SupportsWalkVR": true,
"SupportsTeleportVR": true,
"SupportsVRLow": true,
"SupportsQuest2": true,
"SupportsMobile": true,
"SupportsJuniors": true,
"MinLevel": 0,
"AgeRating": 2,
"CreatedAt": "2026-03-11T06:48:51.317921Z",
"PublishedAt": "2026-03-11T06:48:51.317921Z",
"BecameRRStudioRoomAt": null,
"Stats": {
"CheerCount": 0,
"FavoriteCount": 0,
"VisitorCount": 0,
"VisitCount": 0
},
"RankingContext": null,
"IsDorm": true,
"IsPlacePlay": false,
"MaxPlayerCalculationMode": 0,
"MaxPlayers": 4,
"CloningAllowed": false,
"DisableMicAutoMute": false,
"DisableRoomComments": false,
"EncryptVoiceChat": false,
"ToxmodEnabled": true,
"LoadScreenLocked": false,
"UgcVersion": 1,
"PersistenceVersion": 0,
"UgcSubVersion": null,
"MinUgcSubVersion": null,
"AutoLocalizeRoom": false,
"LocalizationContext": {
"TargetLocale": null,
"Scope": null,
"LocalizedFields": ["Description", "CustomWarning"]
},
"IsDeveloperOwned": true,
"RankedEntityId": "1",
"SubRooms": [
{
"SubRoomId": 1,
"RoomId": 1,
"CreatorAccountId": 0,
"UnitySceneId": "76d98498-60a1-430c-ab76-b54a29b7a163",
"Name": "Home",
"LastModeratedSaveModerationState": 0,
"IsSandbox": true,
"MaxPlayers": 4,
"Accessibility": 2,
"ShouldAutoStageSaves": true,
"StagedSubRoomDataSaveId": null
}
],
"Roles": [
{
"AccountId": 0,
"Role": 255,
"LastChangedByAccountId": null,
"InvitedRole": 0
},
{
"AccountId": 2,
"Role": 30,
"LastChangedByAccountId": null,
"InvitedRole": 0
}
],
"IsJuniorCreated": false,
"Tags": [
{
"Tag": "rro",
"Type": 2
}
],
"PromoImages": [],
"PromoExternalContent": [],
"LoadScreens": [],
"RestrictedCircuitsAllowListNames": []
}

Some files were not shown because too many files have changed in this diff Show More