|
|
@ -59,10 +59,6 @@ pub async fn tp_material<EG: EntityGateway>(entity_gateway: &mut EG, character: |
|
|
|
entity_gateway.save_character(character).await;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async fn mag_cell<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory, mag_cell_type: MagCell) -> Result<(), UseItemError> {
|
|
|
|
let mut mag_handle = inventory.get_equipped_mag_handle().ok_or(UseItemError::ItemNotEquipped)?;
|
|
|
|
let mag_item = mag_handle.item_mut()
|
|
|
@ -82,8 +78,98 @@ async fn mag_cell<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &Consum |
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub async fn cell_of_mag_502<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
println!("used a 502!");
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::CellOfMag502).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn cell_of_mag_213<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::CellOfMag213).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn parts_of_robochao<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::PartsOfRobochao).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn heart_of_opaopa<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::HeartOfOpaOpa).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn heart_of_pian<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::HeartOfPian).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn heart_of_chao<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::HeartOfChao).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn heart_of_angel<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::HeartOfAngel).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn kit_of_hamburger<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::KitOfHamburger).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn panthers_spirit<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::PanthersSpirit).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn kit_of_mark3<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::KitOfMark3).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn kit_of_master_system<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::KitOfMasterSystem).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn kit_of_genesis<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::KitOfGenesis).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn kit_of_sega_saturn<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::KitOfSegaSaturn).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn kit_of_dreamcast<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::KitOfDreamcast).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn tablet<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::Tablet).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn dragon_scale<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::DragonScale).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn heaven_striker_coat<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::HeavenStrikerCoat).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn pioneer_parts<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::PioneerParts).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn amities_memo<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::AmitiesMemo).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn heart_of_morolian<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::HeartOfMorolian).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn rappys_beak<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::RappysBeak).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn yahoos_engine<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::YahoosEngine).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn d_photon_core<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::DPhotonCore).await
|
|
|
|
}
|
|
|
|
|
|
|
|
pub async fn liberta_kit<EG: EntityGateway>(entity_gateway: &mut EG, used_cell: &ConsumedItem, inventory: &mut CharacterInventory) -> Result<(), UseItemError> {
|
|
|
|
mag_cell(entity_gateway, used_cell, inventory, MagCell::LibertaKit).await
|
|
|
|
}
|