2025-03-09 16:28:03 -04:00
|
|
|
use polariton_server::operations::Immediate;
|
2025-03-15 11:03:35 -04:00
|
|
|
use crate::persist::config::ConfigProvider;
|
2025-02-12 18:46:27 -05:00
|
|
|
|
|
|
|
|
const PARAM_KEY: u8 = 1;
|
2025-03-09 16:28:03 -04:00
|
|
|
//const DEFAULT_CUBE_ID: u32 = 227205318;
|
2025-02-12 18:46:27 -05:00
|
|
|
|
2025-03-15 11:03:35 -04:00
|
|
|
pub(super) fn cube_list_provider(cubes: &crate::persist::config::ConfigImpl) -> Immediate<2, crate::UserTy> {
|
2025-03-09 16:28:03 -04:00
|
|
|
Immediate::new(|| {
|
|
|
|
|
let mut params = std::collections::HashMap::with_capacity(2);
|
|
|
|
|
params.insert(PARAM_KEY, cubes.cube_list());
|
|
|
|
|
/*params.insert(PARAM_KEY, Typed::Dict(Dict {
|
2025-03-08 17:16:02 -05:00
|
|
|
key_ty: TypePrefix::Str, // str
|
|
|
|
|
val_ty: TypePrefix::HashMap, // hashtable
|
2025-02-12 18:46:27 -05:00
|
|
|
items: vec![
|
|
|
|
|
//(u32 in base16 aka hex, hashtable)
|
2025-03-01 16:22:57 -05:00
|
|
|
CubeInfo {
|
2025-02-12 18:46:27 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
2025-02-23 20:17:46 -05:00
|
|
|
category: crate::data::weapon_list::ItemCategory::NoFunction,
|
2025-02-12 18:46:27 -05:00
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
|
|
|
|
description: "This is a very descriptive description".to_string(),
|
|
|
|
|
size: ItemTier::NoTier,
|
|
|
|
|
type_: ItemType::NoFunction,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-03-01 16:22:57 -05:00
|
|
|
}.as_transmissible_key_val(DEFAULT_CUBE_ID),
|
2025-02-25 21:44:41 -05:00
|
|
|
CubeInfo {
|
2025-02-23 20:17:46 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
|
|
|
|
category: crate::data::weapon_list::ItemCategory::Laser,
|
|
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
2025-02-25 21:44:41 -05:00
|
|
|
description: "Top_Laser_Tiny This is a very descriptive description".to_string(),
|
2025-02-23 20:17:46 -05:00
|
|
|
size: ItemTier::T0,
|
|
|
|
|
type_: ItemType::Weapon,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-02-25 21:44:41 -05:00
|
|
|
}.as_transmissible_key_val(3809895395),
|
|
|
|
|
CubeInfo {
|
2025-02-23 20:17:46 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
|
|
|
|
category: crate::data::weapon_list::ItemCategory::Laser,
|
|
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
2025-02-25 21:44:41 -05:00
|
|
|
description: "Top_Laser_Small This is a very descriptive description".to_string(),
|
2025-02-23 20:17:46 -05:00
|
|
|
size: ItemTier::T1,
|
|
|
|
|
type_: ItemType::Weapon,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-02-25 21:44:41 -05:00
|
|
|
}.as_transmissible_key_val(3178463503),
|
|
|
|
|
CubeInfo {
|
2025-02-23 20:17:46 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
|
|
|
|
category: crate::data::weapon_list::ItemCategory::Laser,
|
|
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
2025-02-25 21:44:41 -05:00
|
|
|
description: "Top_Laser_Medium This is a very descriptive description".to_string(),
|
2025-02-23 20:17:46 -05:00
|
|
|
size: ItemTier::T2,
|
|
|
|
|
type_: ItemType::Weapon,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-02-25 21:44:41 -05:00
|
|
|
}.as_transmissible_key_val(2007965780),
|
|
|
|
|
CubeInfo {
|
2025-02-23 20:17:46 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
|
|
|
|
category: crate::data::weapon_list::ItemCategory::Laser,
|
|
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
2025-02-25 21:44:41 -05:00
|
|
|
description: "Top_Laser_Large This is a very descriptive description".to_string(),
|
2025-02-23 20:17:46 -05:00
|
|
|
size: ItemTier::T3,
|
|
|
|
|
type_: ItemType::Weapon,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-02-25 21:44:41 -05:00
|
|
|
}.as_transmissible_key_val(3064235218),
|
|
|
|
|
CubeInfo {
|
2025-02-23 20:17:46 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
|
|
|
|
category: crate::data::weapon_list::ItemCategory::Laser,
|
|
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
2025-02-25 21:44:41 -05:00
|
|
|
description: "Top_Laser_Huge This is a very descriptive description".to_string(),
|
2025-02-23 20:17:46 -05:00
|
|
|
size: ItemTier::T4,
|
|
|
|
|
type_: ItemType::Weapon,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-02-25 21:44:41 -05:00
|
|
|
}.as_transmissible_key_val(2088248713),
|
|
|
|
|
CubeInfo {
|
2025-02-23 20:17:46 -05:00
|
|
|
cpu: 1,
|
|
|
|
|
health: 1,
|
|
|
|
|
health_boost: 1.0,
|
|
|
|
|
grey_out_in_tutorial: false,
|
|
|
|
|
visibility: VisibilityMode::All,
|
|
|
|
|
indestructible: true,
|
|
|
|
|
category: crate::data::weapon_list::ItemCategory::Laser,
|
|
|
|
|
placements: 63,
|
|
|
|
|
protonium: false,
|
|
|
|
|
unlocked_by_league: false,
|
|
|
|
|
league_unlock_index: 1,
|
|
|
|
|
stats: HashMap::default(),
|
2025-02-25 21:44:41 -05:00
|
|
|
description: "Mega_Laser This is a very descriptive description".to_string(),
|
2025-02-23 20:17:46 -05:00
|
|
|
size: ItemTier::T5,
|
|
|
|
|
type_: ItemType::Weapon,
|
|
|
|
|
ranking: 1,
|
|
|
|
|
cosmetic: false,
|
|
|
|
|
variant_of: "0".to_string(),
|
|
|
|
|
ignore_in_weapon_list: true,
|
2025-02-25 21:44:41 -05:00
|
|
|
}.as_transmissible_key_val(3209000021),
|
2025-02-12 18:46:27 -05:00
|
|
|
].into(),
|
2025-03-09 16:28:03 -04:00
|
|
|
}));*/
|
|
|
|
|
params.into()
|
2025-02-12 18:46:27 -05:00
|
|
|
})
|
|
|
|
|
}
|