Browse Source

remove comments

pbs
andy 4 years ago
parent
commit
7157074419
  1. 1
      src/ship/items/bank.rs
  2. 1
      src/ship/items/inventory.rs
  3. 7
      src/ship/packet/handler/direct_message.rs

1
src/ship/items/bank.rs

@ -5,7 +5,6 @@ use crate::entity::item::tool::Tool;
use crate::ship::items::inventory::{InventoryItemHandle, InventoryItem};
const BANK_CAPACITY: usize = 200;
// const BANK_MESETA_CAPACITY: u32 = 999999; compiler error: private module
#[derive(Debug, Clone)]
pub struct IndividualBankItem {

1
src/ship/items/inventory.rs

@ -8,7 +8,6 @@ use crate::ship::items::{ClientItemId, BankItem, BankItemHandle};
use crate::ship::items::floor::{IndividualFloorItem, StackedFloorItem};
const INVENTORY_CAPACITY: usize = 30;
// const INVENTORY_MESETA_CAPACITY: u32 = 999999; // compiler error: private module
#[derive(Debug, Clone)]

7
src/ship/packet/handler/direct_message.rs

@ -7,8 +7,6 @@ use crate::ship::ship::{SendShipPacket, ShipError, Clients, Rooms, ItemShops};
use crate::ship::location::{ClientLocation, ClientLocationError};
use crate::ship::drops::ItemDrop;
use crate::ship::items::{ItemManager, ClientItemId, TriggerCreateItem, FloorItem};
// use crate::ship::items::bank::{BANK_MESETA_CAPACITY}; // compiler error: private module
// use crate::ship::items::inventory::{INVENTORY_MESETA_CAPACITY}; // compiler error: private module
use crate::entity::gateway::EntityGateway;
use libpso::utf8_to_utf16_array;
use crate::ship::packet::builder;
@ -222,7 +220,6 @@ pub async fn send_bank_list(id: ClientId,
Ok(Box::new(vec![(id, SendShipPacket::BankItemList(bank_items_pkt))].into_iter()))
}
// TODO: error if too much money is deposited/withdrawn
pub async fn bank_interaction<EG>(id: ClientId,
bank_interaction: &BankInteraction,
entity_gateway: &mut EG,
@ -243,7 +240,7 @@ where
client.character.meseta -= bank_interaction.meseta_amount;
client.character.bank_meseta += bank_interaction.meseta_amount;
entity_gateway.save_character(&client.character).await?;
} /* else {error deposited too much money} */
}
Vec::new()
}
else {
@ -258,7 +255,7 @@ where
client.character.meseta += bank_interaction.meseta_amount;
client.character.bank_meseta -= bank_interaction.meseta_amount;
entity_gateway.save_character(&client.character).await?;
} /* else {error withdrew too much money} */
}
Vec::new()
}
else {

Loading…
Cancel
Save