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:
2025-04-02 23:56:18 -04:00
parent bcee414004
commit 1cfd0426dd
35 changed files with 758 additions and 64 deletions

View File

@@ -21,6 +21,7 @@ import {
CompletionMessage,
Message,
MessageKind,
PushNotificationId,
SignalMessageType,
SignalRMessage,
SignalRMessageSchema,
@@ -32,6 +33,7 @@ import {
} from "./types.ts";
import { SocketTarget } from "./targets/targetbase.ts";
import { PlayerSocketSubscriptionTarget } from "./targets/SubscribeToPlayers.ts";
import Presence from "../data/live/presence.ts";
export class SignalRSocketHandler {
@@ -42,6 +44,8 @@ export class SignalRSocketHandler {
#Targets: Map<string, SocketTarget> = new Map();
#PresenceUpdateId: number;
constructor(socket: WebSocket, player: Profile) {
this.#socket = socket;
@@ -53,6 +57,11 @@ export class SignalRSocketHandler {
this.#Targets.set('SubscribeToPlayers', new PlayerSocketSubscriptionTarget());
this.#PresenceUpdateId = setInterval(async () => {
const pres = await Presence.get(this.#profile);
this.sendNotification("PresenceUpdate", await pres.export());
}, 8000);
}
async #dispatchTarget<T = unknown>(target: string, args: unknown): Promise<TargetResult> {
@@ -136,6 +145,7 @@ export class SignalRSocketHandler {
destroy(sock: SignalRSocketHandler) {
return () => {
clearInterval(sock.#PresenceUpdateId);
sock.sendRaw({ type: 7, error: "Socket closed" });
sock.#socket.close();
sock.#log.i(`Closed hub socket`);
@@ -149,4 +159,16 @@ export class SignalRSocketHandler {
this.#log.d(`SERVER MESSAGE\n ${type}\n ${JSON.stringify(data as SignalRMessage)}`);
}
sendNotification(id: PushNotificationId | string, args: object) {
const msg: SignalRMessage = {
type: SignalMessageType.Invocation,
target: "Notification",
arguments: [JSON.stringify({
Id: id,
Msg: args
})]
}
this.sendRaw(msg);
}
}