remove demo

This commit is contained in:
ntr
2019-12-20 12:03:13 +10:00
parent 883e3c551d
commit 86b0ba7f17
9 changed files with 1 additions and 378 deletions
-20
View File
@@ -804,26 +804,6 @@ pub fn bot_instance() -> Instance {
return instance;
}
pub fn demo() -> Result<Vec<Player>, Error> {
let bot = bot_player();
// generate bot imgs for the client to see
for c in bot.constructs.iter() {
img::shapes_write(c.img)?;
};
let bot2 = bot_player();
// generate bot imgs for the client to see
for c in bot2.constructs.iter() {
img::shapes_write(c.img)?;
};
Ok(vec![bot, bot2])
}
pub fn vbox_refill(tx: &mut Transaction, account: &Account, instance_id: Uuid) -> Result<Instance, Error> {
let instance = instance_get(tx, instance_id)?
.vbox_refill(account.id)?;
-4
View File
@@ -73,8 +73,6 @@ pub enum RpcMessage {
AccountInstances(Vec<Instance>),
AccountShop(mtx::Shop),
Demo(Vec<Player>),
ConstructSpawn(Construct),
GameState(Game),
ItemInfo(ItemInfoCtr),
@@ -391,8 +389,6 @@ impl Handler for Connection {
// tx should do nothing
tx.commit().unwrap();
} else {
self.send(RpcMessage::Demo(demo().unwrap())).unwrap();
}
Ok(())