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

Fix logged error due to missing laser variants

This commit is contained in:
NGnius (Graham)
2025-02-25 21:44:41 -05:00
parent 2106613f62
commit 1df3e31bb6
3 changed files with 23 additions and 19 deletions

View File

@@ -51,6 +51,10 @@ impl CubeInfo {
(Typed::Str("ignoreInWeaponsList".into()), Typed::Bool(self.ignore_in_weapon_list.into())), // optional (Typed::Str("ignoreInWeaponsList".into()), Typed::Bool(self.ignore_in_weapon_list.into())), // optional
].into()) ].into())
} }
pub fn as_transmissible_key_val(&self, cube_id: u32) -> (Typed, Typed) {
(Typed::Str(hex::encode(cube_id.to_be_bytes()).into()), self.as_transmissible())
}
} }
#[derive(Clone, Copy)] #[derive(Clone, Copy)]

View File

@@ -37,7 +37,7 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible()),
(Typed::Str("0".into()), CubeInfo { CubeInfo {
cpu: 1, cpu: 1,
health: 1, health: 1,
health_boost: 1.0, health_boost: 1.0,
@@ -50,15 +50,15 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
unlocked_by_league: false, unlocked_by_league: false,
league_unlock_index: 1, league_unlock_index: 1,
stats: HashMap::default(), stats: HashMap::default(),
description: "This is a very descriptive description".to_string(), description: "Top_Laser_Tiny This is a very descriptive description".to_string(),
size: ItemTier::T0, size: ItemTier::T0,
type_: ItemType::Weapon, type_: ItemType::Weapon,
ranking: 1, ranking: 1,
cosmetic: false, cosmetic: false,
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible_key_val(3809895395),
(Typed::Str("1".into()), CubeInfo { CubeInfo {
cpu: 1, cpu: 1,
health: 1, health: 1,
health_boost: 1.0, health_boost: 1.0,
@@ -71,15 +71,15 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
unlocked_by_league: false, unlocked_by_league: false,
league_unlock_index: 1, league_unlock_index: 1,
stats: HashMap::default(), stats: HashMap::default(),
description: "This is a very descriptive description".to_string(), description: "Top_Laser_Small This is a very descriptive description".to_string(),
size: ItemTier::T1, size: ItemTier::T1,
type_: ItemType::Weapon, type_: ItemType::Weapon,
ranking: 1, ranking: 1,
cosmetic: false, cosmetic: false,
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible_key_val(3178463503),
(Typed::Str("2".into()), CubeInfo { CubeInfo {
cpu: 1, cpu: 1,
health: 1, health: 1,
health_boost: 1.0, health_boost: 1.0,
@@ -92,15 +92,15 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
unlocked_by_league: false, unlocked_by_league: false,
league_unlock_index: 1, league_unlock_index: 1,
stats: HashMap::default(), stats: HashMap::default(),
description: "This is a very descriptive description".to_string(), description: "Top_Laser_Medium This is a very descriptive description".to_string(),
size: ItemTier::T2, size: ItemTier::T2,
type_: ItemType::Weapon, type_: ItemType::Weapon,
ranking: 1, ranking: 1,
cosmetic: false, cosmetic: false,
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible_key_val(2007965780),
(Typed::Str("3".into()), CubeInfo { CubeInfo {
cpu: 1, cpu: 1,
health: 1, health: 1,
health_boost: 1.0, health_boost: 1.0,
@@ -113,15 +113,15 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
unlocked_by_league: false, unlocked_by_league: false,
league_unlock_index: 1, league_unlock_index: 1,
stats: HashMap::default(), stats: HashMap::default(),
description: "This is a very descriptive description".to_string(), description: "Top_Laser_Large This is a very descriptive description".to_string(),
size: ItemTier::T3, size: ItemTier::T3,
type_: ItemType::Weapon, type_: ItemType::Weapon,
ranking: 1, ranking: 1,
cosmetic: false, cosmetic: false,
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible_key_val(3064235218),
(Typed::Str("4".into()), CubeInfo { CubeInfo {
cpu: 1, cpu: 1,
health: 1, health: 1,
health_boost: 1.0, health_boost: 1.0,
@@ -134,15 +134,15 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
unlocked_by_league: false, unlocked_by_league: false,
league_unlock_index: 1, league_unlock_index: 1,
stats: HashMap::default(), stats: HashMap::default(),
description: "This is a very descriptive description".to_string(), description: "Top_Laser_Huge This is a very descriptive description".to_string(),
size: ItemTier::T4, size: ItemTier::T4,
type_: ItemType::Weapon, type_: ItemType::Weapon,
ranking: 1, ranking: 1,
cosmetic: false, cosmetic: false,
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible_key_val(2088248713),
(Typed::Str("5".into()), CubeInfo { CubeInfo {
cpu: 1, cpu: 1,
health: 1, health: 1,
health_boost: 1.0, health_boost: 1.0,
@@ -155,14 +155,14 @@ pub(super) fn cube_list_provider() -> SimpleFunc<2, crate::UserTy, impl (Fn(Para
unlocked_by_league: false, unlocked_by_league: false,
league_unlock_index: 1, league_unlock_index: 1,
stats: HashMap::default(), stats: HashMap::default(),
description: "This is a very descriptive description".to_string(), description: "Mega_Laser This is a very descriptive description".to_string(),
size: ItemTier::T5, size: ItemTier::T5,
type_: ItemType::Weapon, type_: ItemType::Weapon,
ranking: 1, ranking: 1,
cosmetic: false, cosmetic: false,
variant_of: "0".to_string(), variant_of: "0".to_string(),
ignore_in_weapon_list: true, ignore_in_weapon_list: true,
}.as_transmissible()), }.as_transmissible_key_val(3209000021),
].into(), ].into(),
})); }));
Ok(params.into()) Ok(params.into())

View File

@@ -31,7 +31,7 @@ pub(super) fn garage_slot_provider() -> SimpleFunc<40, crate::UserTy, impl (Fn(P
control_type: ControlType::Camera, control_type: ControlType::Camera,
control_options: ControlOptions { vertical_strafing: false, sideways_driving: false, tracks_turn_on_spot: false, }, control_options: ControlOptions { vertical_strafing: false, sideways_driving: false, tracks_turn_on_spot: false, },
mastery_level: 1, mastery_level: 1,
bay_skin_id: "".to_owned(), // TODO bay_skin_id: "RC_MothershipSkin_Neptune_01".to_owned(), // TODO get the rest of the names
weapon_order: vec![0], weapon_order: vec![0],
}.as_transmissible()) }.as_transmissible())
], ],