a tiny bit closer

This commit is contained in:
Lapis
2026-04-01 17:32:46 -04:00
parent cf132988a5
commit 86cfb4a51d
11 changed files with 107 additions and 73 deletions
@@ -0,0 +1,6 @@
{
"Hosting": {
"Url": "http://*:5007"
}
}
@@ -0,0 +1,6 @@
{
"Hosting": {
"Url": "http://*:5008"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

+1 -1
View File
@@ -3,7 +3,7 @@
"API": "https://api.lapis.codes",
"WWW": "https://www.lapis.codes",
"Notifications": "https://notify.lapis.codes",
"Images": "https://img.lapis.codes",
"Images": "http://localhost:5008",
"CDN": "https://cdn.lapis.codes",
"Commerce": "https://commerce.lapis.codes",
"Matchmaking": "https://match.lapis.codes",
+16
View File
@@ -0,0 +1,16 @@
[
{
"Name": "bf5d8d41a7184e779399ff45a9e8785a",
"Title": "CannedNet",
"Message": "dude why am i even doing this, this is hell",
"RoomNames": [],
"Context": 0,
"InputType": 0,
"Visibility": 0,
"AllowCycling": false,
"RestrictToNewUsers": false,
"ImageName": "gay",
"PlatformMask": 175,
"CreatedAt": "2019-02-28T18:27:25Z"
}
]
+1 -64
View File
@@ -1,64 +1 @@
{
"ChallengeMapId": 17,
"CompletedRequired": false,
"StartAt": "2026-03-25T21:00:00",
"EndAt": "2026-04-01T21:00:00",
"ServerTime": "2026-03-31T14:42:54.2754728Z",
"Challenges": [
{
"ChallengeId": 37,
"Name": "CompleteJT",
"Config": "{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":9,\"vs\":[true],\"v\":\"won\"},{\"ct\":7,\"vs\":[{\"l\":\"acc06e66-c2d0-4361-b0cd-46246a4c455c\"}]}]}",
"Description": "Complete ^TheRiseOfJumbotron quest",
"Tooltip": "Vanquish Jumbotron in the Rise of Jumbotron quest!",
"Complete": false
},
{
"ChallengeId": 38,
"Name": "CompleteBloodMoon",
"Config": "{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":9,\"vs\":[true],\"v\":\"won\"},{\"ct\":7,\"vs\":[{\"l\":\"49cb8993-a956-43e2-86f4-1318f279b22a\"}]}]}",
"Description": "Complete the ^Crescendo quest",
"Tooltip": "Vanquish Dracula in the Crescendo of the Blood Moon quest!",
"Complete": false
},
{
"ChallengeId": 44,
"Name": "Complete10PaintballGames",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"e122fe98-e7db-49e8-a1b1-105424b6e1f0\"},{\"l\":\"a785267d-c579-42ea-be43-fec1992d1ca7\"},{\"l\":\"ff4c6427-7079-4f59-b22a-69b089420827\"},{\"l\":\"380d18b5-de9c-49f3-80f7-f4a95c1de161\"},{\"l\":\"58763055-2dfb-4814-80b8-16fac5c85709\"},{\"l\":\"65ddbb48-5a01-4e3e-972d-e5c7419e2bc3\"}]}]}],\"t\":10}",
"Description": "Complete 10 games in ^Paintball",
"Tooltip": "Go to ^Paintball and finish 10 games across any maps.",
"Complete": false
},
{
"ChallengeId": 49,
"Name": "Complete5Charades",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"a673712c-877f-4749-b69a-4a4c6310d545\"},{\"l\":\"4078dfed-24bb-4db7-863f-578ba48d726b\"}]}]}],\"t\":5}",
"Description": "Complete 5 Charades games",
"Tooltip": "Finish 5 games in ^3DCharades.",
"Complete": false
},
{
"ChallengeId": 63,
"Name": "Complete3SpillwayGames",
"Config": "{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"380d18b5-de9c-49f3-80f7-f4a95c1de161\"}]}]}],\"t\":3}",
"Description": "Complete 3 games of Paintball: Clear Cut",
"Tooltip": "Go to ^Paintball.Clearcut and finish 3 games.",
"Complete": false
}
],
"Gift": {
"GiftDropId": 3994,
"AvatarItemDesc": "",
"AvatarItemType": 0,
"ConsumableItemDesc": "",
"EquipmentPrefabName": "[ShareCamera]",
"EquipmentModificationGuid": "g5u0weNLmkCLeUXFUVn74Q",
"StorefrontType": 0,
"Xp": 0,
"Level": 0,
"GiftContext": 0,
"GiftRarity": 0
},
"FallbackGiftName": "4-Star Box",
"ChallengeThemeString": "\"do like \"kapow\"-like its a punch to the face that we're doing weekly challenges\" - fexlar"
}
{"ChallengeMapId":17,"CompletedRequired":false,"StartAt":"2026-03-25T21:00:00","EndAt":"2026-04-01T21:00:00","ServerTime":"2026-03-31T14:42:54.2754728Z","Challenges":[{"ChallengeId":37,"Name":"CompleteJT","Config":"{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":9,\"vs\":[true],\"v\":\"won\"},{\"ct\":7,\"vs\":[{\"l\":\"acc06e66-c2d0-4361-b0cd-46246a4c455c\"}]}]}","Description":"Complete ^TheRiseOfJumbotron quest","Tooltip":"Vanquish Jumbotron in the Rise of Jumbotron quest!","Complete":false},{"ChallengeId":38,"Name":"CompleteBloodMoon","Config":"{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":9,\"vs\":[true],\"v\":\"won\"},{\"ct\":7,\"vs\":[{\"l\":\"49cb8993-a956-43e2-86f4-1318f279b22a\"}]}]}","Description":"Complete the ^Crescendo quest","Tooltip":"Vanquish Dracula in the Crescendo of the Blood Moon quest!","Complete":false},{"ChallengeId":44,"Name":"Complete10PaintballGames","Config":"{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"e122fe98-e7db-49e8-a1b1-105424b6e1f0\"},{\"l\":\"a785267d-c579-42ea-be43-fec1992d1ca7\"},{\"l\":\"ff4c6427-7079-4f59-b22a-69b089420827\"},{\"l\":\"380d18b5-de9c-49f3-80f7-f4a95c1de161\"},{\"l\":\"58763055-2dfb-4814-80b8-16fac5c85709\"},{\"l\":\"65ddbb48-5a01-4e3e-972d-e5c7419e2bc3\"}]}]}],\"t\":10}","Description":"Complete 10 games in ^Paintball","Tooltip":"Go to ^Paintball and finish 10 games across any maps.","Complete":false},{"ChallengeId":49,"Name":"Complete5Charades","Config":"{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"a673712c-877f-4749-b69a-4a4c6310d545\"},{\"l\":\"4078dfed-24bb-4db7-863f-578ba48d726b\"}]}]}],\"t\":5}","Description":"Complete 5 Charades games","Tooltip":"Finish 5 games in ^3DCharades.","Complete":false},{"ChallengeId":63,"Name":"Complete3SpillwayGames","Config":"{\"ct\":1,\"ipc\":false,\"ctc\":[{\"ct\":0,\"ipc\":false,\"wc\":[{\"ct\":6,\"vs\":[2]},{\"ct\":7,\"vs\":[{\"l\":\"380d18b5-de9c-49f3-80f7-f4a95c1de161\"}]}]}],\"t\":3}","Description":"Complete 3 games of Paintball: Clear Cut","Tooltip":"Go to ^Paintball.Clearcut and finish 3 games.","Complete":false}],"Gift":{"GiftDropId":3994,"AvatarItemDesc":"","AvatarItemType":0,"ConsumableItemDesc":"","EquipmentPrefabName":"[ShareCamera]","EquipmentModificationGuid":"g5u0weNLmkCLeUXFUVn74Q","StorefrontType":0,"Xp":0,"Level":0,"GiftContext":0,"GiftRarity":0},"FallbackGiftName":"4-Star Box","ChallengeThemeString":"\"do like \"kapow\"-like its a punch to the face that we're doing weekly challenges\" - fexlar"}
+10 -3
View File
@@ -374,17 +374,24 @@ public class APIService
app.MapGet("/api/challenge/v2/getCurrent", async (HttpRequest request, AppDbContext db) =>
{
var json = File.ReadAllText("JSON/weeklychallenge.json");
return Results.Content(json, "application/json");
//return Results.Content(json, "application/json");
return "{}";
});
app.MapGet("/roomserver/rooms/createdby/me", async (HttpRequest request, AppDbContext db) =>
{
// TODO ADD FUNCTIONALITY
var json = File.ReadAllText("JSON/weeklychallenge.json");
var json = File.ReadAllText("JSON/ownedrooms.json");
return Results.Content(json, "application/json");
});
app.MapGet("/roomserver/rooms/{id}", async (HttpRequest request, AppDbContext db, string id) =>
{
// TODO ADD FUNCTIONALITY
var json = File.ReadAllText("JSON/ownedrooms.json");
return Results.Content(json, "application/json");
});
app.MapGet("/api/images/v2/named", async (HttpRequest request, AppDbContext db) =>
{
var json = File.ReadAllText("JSON/weeklychallenge.json");
var json = File.ReadAllText("JSON/namedimages.json");
return Results.Content(json, "application/json");
});
}
+15
View File
@@ -0,0 +1,15 @@
namespace CannedNet.Services;
public class CDNService
{
public WebApplicationBuilder Initialize(string[]? args = null) => ServiceExtensions.CreateRecNetBuilder(args);
public void MapEndpoints(WebApplication app)
{
app.MapGet("/config/LoadingScreenTipData", (HttpRequest request) =>
{
var json = File.ReadAllText("JSON/loadingscreentipdata.json");
return Results.Content(json, "application/json");
});
}
}
+43
View File
@@ -0,0 +1,43 @@
namespace CannedNet.Services;
public class ImageService
{
public WebApplicationBuilder Initialize(string[]? args = null) => ServiceExtensions.CreateRecNetBuilder(args);
public void MapEndpoints(WebApplication app)
{
app.MapGet("/{imageId}", (string imageId, HttpContext context) =>
{
var imagesDir = "Images";
if (!Directory.Exists(imagesDir))
{
context.Response.StatusCode = 404;
return Task.CompletedTask;
}
var files = Directory.GetFiles(imagesDir, $"{imageId}.*");
var filePath = files.FirstOrDefault();
if (filePath == null)
{
context.Response.StatusCode = 404;
return Task.CompletedTask;
}
var extension = Path.GetExtension(filePath).ToLowerInvariant();
var contentType = extension switch
{
".png" => "image/png",
".jpg" or ".jpeg" => "image/jpeg",
".gif" => "image/gif",
".webp" => "image/webp",
".bmp" => "image/bmp",
_ => "application/octet-stream"
};
context.Response.ContentType = contentType;
return File.OpenRead(filePath).CopyToAsync(context.Response.Body);
});
}
}
+4 -4
View File
@@ -52,15 +52,15 @@ public class MatchmakingService
location = "76d98498-60a1-430c-ab76-b54a29b7a163",
dataBlob = "",
eventId = 0,
clubId=0,
clubId = 0,
photonRegionId = "us",
photonRoomId = "CannedNet_"+Guid.NewGuid(),
name = "DormRoom",
photonRoomId = Guid.NewGuid(),
name = room,
maxCapacity = 4,
isFull = false,
isPrivate = true,
isInProgress = false,
EncryptVoiceChat=false
EncryptVoiceChat = false
}
});
});
+5 -1
View File
@@ -1,3 +1,5 @@
using System.Net.Mime;
namespace CannedNet.Services;
public class ServiceRegistry
@@ -19,6 +21,8 @@ public static class Services
new() { Name = "Chat", Port = 5003, ServiceType = typeof(ChatService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new ChatService().MapEndpoints(app) },
new() { Name = "Match", Port = 5004, ServiceType = typeof(MatchmakingService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new MatchmakingService().MapEndpoints(app) },
new() { Name = "Accounts", Port = 5005, ServiceType = typeof(AccountsService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, jwt) => new AccountsService().MapEndpoints(app, jwt) },
new() { Name = "Notify", Port = 5006, ServiceType = typeof(NotifyService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new NotifyService().MapEndpoints(app) }
new() { Name = "Notify", Port = 5006, ServiceType = typeof(NotifyService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new NotifyService().MapEndpoints(app) },
new() { Name = "CDN", Port = 5007, ServiceType = typeof(CDNService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new CDNService().MapEndpoints(app) },
new() { Name = "Image", Port = 5008, ServiceType = typeof(ImageService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new ImageService().MapEndpoints(app) }
];
}