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:
@@ -23,6 +23,8 @@ import Presence, { PresenceExport } from "../../data/live/presence.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
import Logging from "@proxnet/undead-logging";
|
||||
import UnifiedProfile from "../../data/profiles.ts";
|
||||
import { PlayerStatusVisibility, VRMovementMode } from "../../data/live/types.ts";
|
||||
import { SettingKey } from "../../data/content/settings.ts";
|
||||
|
||||
const log = new Logging("MatchPlayerRoute");
|
||||
|
||||
@@ -51,7 +53,6 @@ route.router.get('/',
|
||||
const presExport: PresenceExport[] = [];
|
||||
for (const id of ids) {
|
||||
const pres = await Presence.get(UnifiedProfile.get(id));
|
||||
await pres.update();
|
||||
presExport.push(await pres.export());
|
||||
}
|
||||
|
||||
@@ -100,8 +101,51 @@ route.router.post('/heartbeat',
|
||||
|
||||
async (_rq, rs) => {
|
||||
const pres = await Presence.get(rs.locals.profile);
|
||||
await pres.update();
|
||||
rs.json(await pres.export());
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
interface StatusVisibilityBody {
|
||||
statusVisibility: PlayerStatusVisibility
|
||||
}
|
||||
const StatusVisibilitySchema = z.object({
|
||||
statusVisibility: z.nativeEnum(PlayerStatusVisibility)
|
||||
});
|
||||
|
||||
route.router.put('/statusvisibility',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
express.urlencoded({ extended: true }),
|
||||
APIUtils.validateRequestBody(StatusVisibilitySchema),
|
||||
|
||||
async (rq: express.Request<NoBody, NoBody, StatusVisibilityBody>, rs: express.Response) => {
|
||||
rs.locals.profile.Settings.setSetting(SettingKey.PlayerStatusVisibility, rq.body.statusVisibility.toString());
|
||||
(await Presence.get(rs.locals.profile)).updateStatusVisibility();
|
||||
rs.sendStatus(200);
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
interface VRMovementModeBody {
|
||||
vrMovementMode: PlayerStatusVisibility
|
||||
}
|
||||
const VRMovementModeSchema = z.object({
|
||||
vrMovementMode: z.nativeEnum(VRMovementMode)
|
||||
});
|
||||
|
||||
route.router.put('/vrmovementmode',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
express.urlencoded({ extended: true }),
|
||||
APIUtils.validateRequestBody(VRMovementModeSchema),
|
||||
|
||||
async (rq: express.Request<NoBody, NoBody, VRMovementModeBody>, rs: express.Response) => {
|
||||
rs.locals.profile.Settings.setSetting(SettingKey.VRMovementMode, rq.body.vrMovementMode.toString());
|
||||
(await Presence.get(rs.locals.profile)).updateVRMovementMode();
|
||||
rs.sendStatus(200);
|
||||
},
|
||||
|
||||
);
|
||||
Reference in New Issue
Block a user