Merge branch 'develop' of ssh://mnml.gg:40022/~/mnml into develop

This commit is contained in:
Mashy 2019-07-22 15:31:53 +10:00
commit 10dc04b73d
2 changed files with 21 additions and 20 deletions

View File

@ -36,26 +36,26 @@ module.exports = {
// Speed, // Speed,
// Lifes Upgrades // Lifes Upgrades
LifeGGI: () => square(['green']), LifeGG: () => square(['green']),
LifeRRI: () => square(['red']), LifeRR: () => square(['red']),
LifeBBI: () => square(['blue']), LifeBB: () => square(['blue']),
LifeRGI: () => square(['red', 'green']), LifeRG: () => square(['red', 'green']),
LifeGBI: () => square(['green', 'blue']), LifeGB: () => square(['green', 'blue']),
LifeRBI: () => square(['red', 'blue']), LifeRB: () => square(['red', 'blue']),
// Power Upgrades // Power Upgrades
PowerGGI: () => circle(['green']), PowerGG: () => circle(['green']),
PowerRRI: () => circle(['red']), PowerRR: () => circle(['red']),
PowerBBI: () => circle(['blue']), PowerBB: () => circle(['blue']),
PowerRGI: () => circle(['red', 'green']), PowerRG: () => circle(['red', 'green']),
PowerGBI: () => circle(['green', 'blue']), PowerGB: () => circle(['green', 'blue']),
PowerRBI: () => circle(['red', 'blue']), PowerRB: () => circle(['red', 'blue']),
// Speed Upgrades // Speed Upgrades
SpeedGGI: () => triangle(['green']), SpeedGG: () => triangle(['green']),
SpeedRRI: () => triangle(['red']), SpeedRR: () => triangle(['red']),
SpeedBBI: () => triangle(['blue']), SpeedBB: () => triangle(['blue']),
SpeedRGI: () => triangle(['red', 'green']), SpeedRG: () => triangle(['red', 'green']),
SpeedGBI: () => triangle(['green', 'blue']), SpeedGB: () => triangle(['green', 'blue']),
SpeedRBI: () => triangle(['red', 'blue']), SpeedRB: () => triangle(['red', 'blue']),
}; };

View File

@ -53,11 +53,12 @@ fn handle_notification(n: Notification, db: &Db, pss: &Sender<Message>) -> Resul
let msg = match n.action { let msg = match n.action {
Action::Delete => return Err(format_err!("unimplemented delete notification {:?}", n)), Action::Delete => return Err(format_err!("unimplemented delete notification {:?}", n)),
_ => match n.table { Action::Insert => return Err(format_err!("unimplemented insert notification {:?}", n)),
Action::Update => match n.table {
Table::Accounts => Message::Account(account::select(db, n.id)?), Table::Accounts => Message::Account(account::select(db, n.id)?),
Table::Instances => Message::Instance(instance::instance_get(&mut tx, n.id)?), Table::Instances => Message::Instance(instance::instance_get(&mut tx, n.id)?),
Table::Games => Message::Game(game::game_get(&mut tx, n.id)?), Table::Games => Message::Game(game::game_get(&mut tx, n.id)?),
_ => return Err(format_err!("unimplemented notification {:?}", n)), _ => return Err(format_err!("unimplemented update notification {:?}", n)),
}, },
}; };