galvanic corrosion rewrite

commit this before something goes horribly wrong
This commit is contained in:
2025-08-12 21:04:52 -04:00
parent 941c8400c0
commit f19552929e
40 changed files with 28149 additions and 73212 deletions

View File

@@ -72,7 +72,7 @@ export class SignalRSocketHandler {
this.sendRaw({});
return;
} else {
if (logmessages) this.#log.d(`CLIENT MESSAGE\n Type: ${message.data.type} (${SignalMessageType[message.data.type]})\n ${JSON.stringify(message.data)}`);
if (logmessages) this.#log.d(`CLIENT MESSAGE\n Type: ${message.data.type} (${SignalMessageType[message.data.type]})\n Content: ${JSON.stringify(message.data)}`);
if (message.data.type == SignalMessageType.Invocation && message.data.invocationId) { // don't send completion messages for nonblocking invocations
const res = await this.#dispatchTarget(message.data.target, message.data.arguments[0]); // rec room only uses the first index
if (res.type == TargetResultType.Success) {

View File

@@ -5,7 +5,9 @@ export class PlayerSocketSubscriptionTarget extends SocketTarget {
#ids: number[] = [];
override zod = z.tuple([]).rest(z.number());
override zod = z.object({
PlayerIds: z.array(z.number().nonnegative().max(2_147_483_647))
});
override exec(...ids: number[]) {
this.#ids = ids;

View File

@@ -5,7 +5,7 @@ export class SocketTarget {
socket: SignalRSocketHandler;
zod: z.ZodTuple = z.tuple([]);
zod: z.ZodObject = z.object({});
constructor(socket: SignalRSocketHandler) {
this.socket = socket;

View File

@@ -150,14 +150,13 @@ export enum PushNotificationId {
RelationshipChanged = 1,
MessageReceived,
MessageDeleted,
PresenceHeartbeatResponse,
PresenceHeartbeatResponse, // unused by the game
RefreshLogin,
Logout,
SubscriptionUpdateProfile = 11,
SubscriptionUpdatePresence,
SubscriptionUpdateGameSession,
SubscriptionUpdateRoom = 15,
SubscriptionUpdateRoomPlaylist,
ModerationQuitGame = 20,
ModerationUpdateRequired,
ModerationKick,
@@ -166,7 +165,6 @@ export enum PushNotificationId {
ServerMaintenance,
GiftPackageReceived = 30,
GiftPackageReceivedImmediate,
GiftPackageRewardSelectionReceived,
ProfileJuniorStatusUpdate = 40,
RelationshipsInvalid = 50,
StorefrontBalanceAdd = 60,
@@ -184,7 +182,4 @@ export enum PushNotificationId {
CommunityBoardUpdate = 95,
CommunityBoardAnnouncementUpdate,
InventionModerationStateChanged = 100,
FreeGiftButtonItemsAdded = 110,
LocalRoomKeyCreated = 120,
LocalRoomKeyDeleted
}