mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Platoons social functionality (#91)
### Description This implements and completes #87 (to the best of my knowledge) ### 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/91 Co-authored-by: NG (Graham) <ngniusness@gmail.com> Co-committed-by: NG (Graham) <ngniusness@gmail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ impl PlayerRankStaticInfo {
|
||||
(Typed::Str("subRankCount".into()), Typed::Int(self.sub_rank_count)),
|
||||
(Typed::Str("subRankThresholds".into()), Typed::Arr(Arr {
|
||||
ty: TypePrefix::Int, // int
|
||||
custom_ty: None,
|
||||
items: self.sub_rank_thresholds.iter().map(|x| Typed::Int(*x)).collect(),
|
||||
})),
|
||||
],
|
||||
|
||||
@@ -192,14 +192,17 @@ pub(super) fn all_customisations_provider() -> SimpleFunc<216, crate::UserTy, im
|
||||
let mut params = params.to_dict();
|
||||
params.insert(SKINS_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::HashMap, // hashtable
|
||||
custom_ty: None,
|
||||
items: all_skins().into_iter().map(|x| x.as_transmissible()).collect(),
|
||||
}));
|
||||
params.insert(SPAWNS_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::HashMap, // hashtable
|
||||
custom_ty: None,
|
||||
items: all_spawns().into_iter().map(|x| x.as_transmissible()).collect(),
|
||||
}));
|
||||
params.insert(DEATHS_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::HashMap, // hashtable
|
||||
custom_ty: None,
|
||||
items: all_deaths().into_iter().map(|x| x.as_transmissible()).collect(),
|
||||
}));
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ pub(super) fn cube_awards_provider() -> SimpleFunc<206, crate::UserTy, impl (Fn(
|
||||
let mut params = params.to_dict();
|
||||
params.insert(PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Str, // str
|
||||
custom_ty: None,
|
||||
items: Vec::default(),
|
||||
}));
|
||||
Ok(params.into())
|
||||
|
||||
@@ -30,6 +30,7 @@ impl SimpleOperation<()> for ItemBundleBuyer {
|
||||
let purchase_result = user_info.apply_purchase(transaction).await?;
|
||||
let new_cubes = polariton::operation::Typed::Arr(polariton::operation::Arr {
|
||||
ty: polariton::serdes::TypePrefix::Str,
|
||||
custom_ty: None,
|
||||
items: purchase_result.cube_awards.into_keys()
|
||||
.map(|k| polariton::operation::Typed::Str(k.into()))
|
||||
.collect(),
|
||||
|
||||
@@ -8,6 +8,7 @@ pub(super) fn owned_cosmetics_provider() -> SimpleFunc<23, crate::UserTy, impl (
|
||||
let mut params = params.to_dict();
|
||||
params.insert(PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Str, // str
|
||||
custom_ty: None,
|
||||
items: vec![Typed::Str("1".into())],
|
||||
}));
|
||||
Ok(params.into())
|
||||
@@ -19,6 +20,7 @@ pub(super) fn selected_cosmetics_provider() -> SimpleFunc<21, crate::UserTy, imp
|
||||
let mut params = params.to_dict();
|
||||
params.insert(PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Str, // str
|
||||
custom_ty: None,
|
||||
items: vec![Typed::Str("1".into())],
|
||||
}));
|
||||
Ok(params.into())
|
||||
|
||||
@@ -23,12 +23,14 @@ pub(super) fn player_data_provider() -> SimpleFunc<61, crate::UserTy, impl (Fn(P
|
||||
params.insert(CONTROL_OPTIONS_KEY, ControlOptions { vertical_strafing: false, sideways_driving: false, tracks_turn_on_spot: false, }.as_transmissible());
|
||||
params.insert(WEAPON_ORDER_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Int, // int
|
||||
custom_ty: None,
|
||||
items: vec![
|
||||
Typed::Int(0),
|
||||
],
|
||||
}));
|
||||
params.insert(ITEM_CATEGORY_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Int, // int
|
||||
custom_ty: None,
|
||||
items: vec![
|
||||
Typed::Int(ItemCategory::Wheel.but_bigger()),
|
||||
],
|
||||
|
||||
@@ -12,6 +12,7 @@ pub(super) fn robot_sanction_provider() -> SimpleFunc<174, crate::UserTy, impl (
|
||||
}
|
||||
params.insert(SANCTION_JSONS_PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Str, // str
|
||||
custom_ty: None,
|
||||
items: Vec::default(),
|
||||
}));
|
||||
Ok(params.into())
|
||||
@@ -23,6 +24,7 @@ pub(super) fn all_robot_sanctions_provider() -> SimpleFunc<176, crate::UserTy, i
|
||||
let mut params = params.to_dict();
|
||||
params.insert(SANCTION_JSONS_PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: TypePrefix::Str, // str
|
||||
custom_ty: None,
|
||||
items: Vec::default(),
|
||||
}));
|
||||
Ok(params.into())
|
||||
|
||||
@@ -12,6 +12,7 @@ pub(super) fn steam_promos_provider() -> Immediate<CODE, crate::UserTy> {
|
||||
let mut params = std::collections::HashMap::with_capacity(4);
|
||||
params.insert(PROMO_LIST_PARAM_KEY, Typed::Arr(polariton::operation::Arr {
|
||||
ty: polariton::serdes::TypePrefix::Str,
|
||||
custom_ty: None,
|
||||
items: Vec::default(),
|
||||
}));
|
||||
params.insert(STEAM_PROMOS_PARAM_KEY, Typed::Str("{}".into()));
|
||||
|
||||
Reference in New Issue
Block a user