1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Friends functionality (#90)

### Description

Implements and closes #86

### Game

Robocraft

### Please confirm

- [x] I am the legal owner or represent the owner of all work submitted
- [x] I consent to my submission being added to this FOSS project
- [ ] This PR used LLMs to generate some or all of the code changes

Reviewed-on: https://git.ngram.ca/OpenJam/rc-servers/pulls/90
Co-authored-by: NG (Graham) <ngniusness@gmail.com>
Co-committed-by: NG (Graham) <ngniusness@gmail.com>
This commit is contained in:
NG (Graham)
2026-02-16 04:28:14 +00:00
committed by NGnius
parent 872f224af6
commit 9502522ac4
30 changed files with 1108 additions and 35 deletions

View File

@@ -10,15 +10,20 @@ mod platoon_data;
mod calculate_mmr;
mod previous_battle_rewards_get;
mod previous_battle_rewards_claim;
mod friend_invite;
mod friend_accept;
mod friend_decline;
mod friend_cancel;
mod friend_remove;
use polariton_server::operations::OperationsHandler;
pub fn handler() -> OperationsHandler<crate::UserTy, crate::data::custom::CustomType> {
pub fn handler(init_ctx: &crate::InitConfig) -> OperationsHandler<crate::UserTy, crate::data::custom::CustomType> {
OperationsHandler::<crate::UserTy, crate::data::custom::CustomType>::new()
.modify(oj_rc_core::polariton::RcOpModifier)
.add(more_auth::MoreLobbyAuth)
.add(more_auth::more_lobby_auth(init_ctx))
//.add(polariton_server::operations::Ack::<33, _>::default()) // get user clan info (this is equivalent to not being in a clan)
.add(friend_list::friends_provider()) // TODO friend object parsing Token: 0x0200169C RID: 5788
.add(friend_list::friends_provider(init_ctx)) // TODO friend object parsing Token: 0x0200169C RID: 5788
.add(settings::settings_provider()) // TODO save settings persistently
.add(polariton_server::operations::Ack::<43, _>::default()) // get my clan info (this is equivalent to not being in a clan)
.add(clan_invite::clan_invites_provider())
@@ -32,7 +37,11 @@ pub fn handler() -> OperationsHandler<crate::UserTy, crate::data::custom::Custom
.add(polariton_server::operations::Ack::<6, _>::default()) // AvatarUpdatedRequest, sent on services_room avatar_set success (just needs to be ack-ed; no params)
.add(calculate_mmr::mmr_provider())
.add(polariton_server::operations::Ack::<25, _>::default()) // save social settings, sent on escape menu settings save (should probably be saved someday...)
.add(polariton_server::operations::Ack::<0, _>::default()) // send friend request, can be sent from match leaderboard
.add(friend_invite::friend_invite_provider(init_ctx)) // send friend request, can be sent from match leaderboard
.add(previous_battle_rewards_get::get_battle_rewards_provider())
.add(previous_battle_rewards_claim::claim_battle_rewards_provider())
.add(friend_accept::friend_accept_provider(init_ctx))
.add(friend_decline::friend_decline_provider(init_ctx))
.add(friend_cancel::friend_cancel_provider(init_ctx))
.add(friend_remove::friend_remove_provider(init_ctx))
}