Merge branch 'master' of ssh://cryps.gg:40022/~/cryps

This commit is contained in:
Mashy 2018-12-21 19:32:23 +10:00
commit 7eceeaf759
5 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,45 @@
const Phaser = require('phaser');
const {
TEXT,
// COLOURS,
POSITIONS: { GAME_LIST },
} = require('./constants');
class ItemList extends Phaser.GameObjects.Group {
constructor(args) {
super(args.list);
const { list, ws, itemList } = args;
const X = GAME_LIST.x() + GAME_LIST.x();
const WIDTH = Math.floor(GAME_LIST.width());
const HEIGHT = GAME_LIST.height();
const itemRow = (item, i) => {
const ITEM_X = X;
const ITEM_Y = GAME_LIST.rowY(i);
const itemBox = list.add
.rectangle(ITEM_X, ITEM_Y, WIDTH * 2, HEIGHT, 0x111111)
.setInteractive()
.setOrigin(0);
this.add(list.add.text(ITEM_X, ITEM_Y, item.action, TEXT.HEADER));
itemBox.on('pointerdown', () => {
ws.sendItemUse(item.id);
});
};
itemList.forEach(itemRow);
return true;
}
cleanup() {
return true;
}
}
module.exports = ItemList;

View File

@ -29,6 +29,7 @@ server {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 600s;
} }
} }

View File

@ -8,6 +8,7 @@ exports.up = async knex => {
.onDelete('CASCADE'); .onDelete('CASCADE');
table.binary('data').notNullable(); table.binary('data').notNullable();
table.index('id'); table.index('id');
table.index('account');
}); });
}; };

View File

@ -6,7 +6,6 @@
# WORK WORK # WORK WORK
broken skills broken skills
parry
strangle strangle
@ -16,6 +15,12 @@ strangle
## SOON ## SOON
* tutorial * tutorial
* aoe skills * aoe skills
* keep track of games joined
* concede game on leave
* ko all cryps on team, check status
should correctly assign the winner and drop items
* cryp speed * cryp speed
* modifies skill base speed * modifies skill base speed

View File

@ -799,7 +799,7 @@ pub fn game_pve(params: GamePveParams, tx: &mut Transaction, account: &Account)
.set_team_size(cryps.len()); .set_team_size(cryps.len());
// create the mob team // create the mob team
let mut mob_team = generate_mob_team(params.mode, &cryps); let mob_team = generate_mob_team(params.mode, &cryps);
// add the players // add the players
let mut plr_team = Team::new(account.id); let mut plr_team = Team::new(account.id);