Merge branch 'master' of ssh://cryps.gg:40022/~/cryps
This commit is contained in:
commit
7eceeaf759
45
client/src/scenes/item.list.js
Normal file
45
client/src/scenes/item.list.js
Normal 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;
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user