FLINT AND STEEL!!!! THE NETHER!!!!!! RELEASE!!!!!!!!!
* Account bio support (fetch only route right now)
* Room cloning fixes
- Dorm Room cloning is still broken
* Instance changing fixes
* Presence: VRMovementMode and StatusVisibility updates automatically
* Routes for the above two properties
* Settings can take numbers, too (enums)
* No microtransations in my game (parental controls)
* A whole lotta routes for various unfinished but planned features
- Equipment
- Consumables
- Objectives
- Checklist (orientation rewards)
- Objectives (three daily tasks)
- Image metadata
- Community Board
- Player Events
- Storefronts
* Matchmaking instance querying
- Empty instances are not yet cleared
* Avatar items, saved avatars, save current avatar routes
* No loading screen tips for now
* Send presence at an interval over the socket
- Error FROSTBITE is reported in the game logs during bootup sometimes. Maybe due to the lack of ping messages?
* Socket push notifications
Note to self: Set up deno compilation in runners on gitea
This commit is contained in:
@@ -15,8 +15,11 @@ GNU Affero General Public License for more details.
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { z } from "zod";
|
||||
import { APIUtils, NoBody } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
import express from "express";
|
||||
import { AvatarSettings } from "../../data/profile/avatar.ts";
|
||||
|
||||
export const route = APIUtils.createRouter("/avatar");
|
||||
|
||||
@@ -31,13 +34,49 @@ route.router.get('/v2',
|
||||
|
||||
);
|
||||
|
||||
const AvatarSettingsSchema = z.object({
|
||||
OutfitSelections: z.string(),
|
||||
HairColor: z.string(),
|
||||
SkinColor: z.string(),
|
||||
FaceFeatures: z.string()
|
||||
});
|
||||
route.router.post('/v2/set',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
express.json(),
|
||||
APIUtils.validateRequestBody(AvatarSettingsSchema),
|
||||
|
||||
(rq: express.Request<NoBody, NoBody, AvatarSettings>, rs: express.Response) => {
|
||||
rs.locals.profile.Avatar.setAvatar(rq.body);
|
||||
rs.sendStatus(200);
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
route.router.get('/v4/items',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json([]);
|
||||
}
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
|
||||
route.router.get('/v3/saved',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
|
||||
route.router.get('/v2/gifts',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
30
src/routes/api/checklist.ts
Normal file
30
src/routes/api/checklist.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter('/checklist');
|
||||
|
||||
route.router.get('/v1/current',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
51
src/routes/api/communityboard.ts
Normal file
51
src/routes/api/communityboard.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { Config } from "../../config.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
const config = Config.getConfig();
|
||||
|
||||
export const route = APIUtils.createRouter('/communityboard');
|
||||
|
||||
route.router.get('/v1/current',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json({
|
||||
FeaturedPlayer: {
|
||||
Id: 1,
|
||||
TitleOverride: "",
|
||||
UrlOverride: ""
|
||||
},
|
||||
FeaturedRoomGroup: {
|
||||
Name: "",
|
||||
FeaturedRooms: []
|
||||
},
|
||||
CurrentAnnouncement: {
|
||||
Message: config.public.motd,
|
||||
MoreInfoUrl: ""
|
||||
},
|
||||
InstagramImages: [],
|
||||
Videos: []
|
||||
});
|
||||
},
|
||||
|
||||
);
|
||||
30
src/routes/api/consumables.ts
Normal file
30
src/routes/api/consumables.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter('/consumables');
|
||||
|
||||
route.router.get('/v1/getUnlocked',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
30
src/routes/api/equipment.ts
Normal file
30
src/routes/api/equipment.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter('/equipment');
|
||||
|
||||
route.router.get('/v2/getUnlocked',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
)
|
||||
@@ -19,6 +19,4 @@ import { APIUtils } from "../../apiutils.ts";
|
||||
|
||||
export const route = APIUtils.createRouter("/gameconfigs");
|
||||
|
||||
route.router.get("/v1/all", (_rq, rs) => {
|
||||
rs.json([]);
|
||||
});
|
||||
route.router.get("/v1/all", APIUtils.emptyArrayResponse);
|
||||
30
src/routes/api/images.ts
Normal file
30
src/routes/api/images.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter('/images');
|
||||
|
||||
route.router.get('/v2/named',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
@@ -23,8 +23,6 @@ route.router.get('/v2/get',
|
||||
|
||||
APIUtils.Authentication,
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json([]); // temporary
|
||||
}
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
)
|
||||
35
src/routes/api/objectives.ts
Normal file
35
src/routes/api/objectives.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter('/objectives');
|
||||
|
||||
route.router.get('/v1/myprogress',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json({
|
||||
Objectives: [],
|
||||
ObjectiveGroups: []
|
||||
});
|
||||
},
|
||||
|
||||
);
|
||||
44
src/routes/api/playerevents.ts
Normal file
44
src/routes/api/playerevents.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter('/playerevents');
|
||||
|
||||
route.router.get('/v1/all',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json({
|
||||
Created: [],
|
||||
Responses: []
|
||||
});
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
route.router.get('/v1',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
@@ -21,8 +21,6 @@ export const route = APIUtils.createRouter("/playersubscriptions");
|
||||
|
||||
route.router.get('/v1/my',
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json([]); // temporary: todo
|
||||
}
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import Rooms from "../../data/content/rooms.ts";
|
||||
import { RoomAccessibility } from "../../data/content/roomtypes.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
import express from "express";
|
||||
|
||||
@@ -46,4 +47,75 @@ route.router.get('/v4/details/:roomId',
|
||||
else rs.json(room);
|
||||
},
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
route.router.get('/v2/myrooms',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
APIUtils.emptyArrayResponse
|
||||
|
||||
);
|
||||
|
||||
route.router.get('/v1/hot',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
async (_rq, rs) => {
|
||||
// temporary: return all public AG rooms for testing
|
||||
const rooms = await Rooms.getAllBuiltinRoomGenerations();
|
||||
rs.json(rooms.map(room => room.Room).filter(room => room.Accessibility !== RoomAccessibility.Private));
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
route.router.get('/v2/baserooms',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
async (_rq, rs) => {
|
||||
const rooms = await Rooms.getAllBuiltinRoomGenerations();
|
||||
rs.json(rooms.map(room => room.Room).filter(room => room.CloningAllowed));
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
interface GetRoomByNameParams {
|
||||
name?: string
|
||||
}
|
||||
route.router.get('/v2/name/:name',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
async (rq: express.Request<GetRoomByNameParams>, rs: express.Response) => {
|
||||
if (!rq.params.name) {
|
||||
rs.sendStatus(400);
|
||||
return;
|
||||
}
|
||||
|
||||
const room = await Rooms.getByName(rq.params.name.trim());
|
||||
if (!room || rq.params.name == 'DormRoom') {
|
||||
rs.sendStatus(404);
|
||||
return;
|
||||
} else {
|
||||
rs.json(room.Room);
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
route.router.post('/v1/roomRolePermissions',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(rq, rs) => {
|
||||
rs.sendStatus(200);
|
||||
},
|
||||
|
||||
);
|
||||
42
src/routes/api/storefronts.ts
Normal file
42
src/routes/api/storefronts.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Galvanic Corrosion - Rec Room custom server for communities.
|
||||
<https://gitea.proxnet.dev/zombieb-galvanic-corrosion>
|
||||
Copyright (C) 2025 @zombieb (Discord / proxnet Gitea)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import express from "express";
|
||||
|
||||
export const route = APIUtils.createRouter('/storefronts');
|
||||
|
||||
interface StorefrontFetchParams {
|
||||
id?: string
|
||||
}
|
||||
route.router.get('/v3/giftdropstore/:id',
|
||||
|
||||
APIUtils.Authentication,
|
||||
|
||||
(rq: express.Request<StorefrontFetchParams>, rs: express.Response) => {
|
||||
if (!rq.params.id) {
|
||||
rs.sendStatus(400);
|
||||
return;
|
||||
}
|
||||
rs.json({
|
||||
StorefrontType: parseInt(rq.params.id),
|
||||
NextUpdate: new Date(Date.now() + 604_800_000).toISOString(),
|
||||
StoreItems: []
|
||||
});
|
||||
},
|
||||
|
||||
);
|
||||
Reference in New Issue
Block a user