Merge branch 'master' of ssh://cryps.gg:40022/~/cryps
This commit is contained in:
@@ -52,10 +52,16 @@ class StatSheet extends Phaser.Scene {
|
||||
|
||||
create(cryp) {
|
||||
this.registry.events.on('changedata', this.updateData, this);
|
||||
const ws = this.registry.get('ws');
|
||||
|
||||
const player = this.registry.get('player');
|
||||
if (!player) return false;
|
||||
const { vbox } = player;
|
||||
|
||||
this.cryp = cryp;
|
||||
|
||||
const del = this.add.existing(new DeleteHitBox(this, X + WIDTH * 0.7, Y + HEIGHT * 0.6));
|
||||
this.add.text(del.getCenter().x, del.getCenter().y, 'Unlearn', TEXT.HEADER)
|
||||
this.add.text(del.getCenter().x, del.getCenter().y, 'unequip', TEXT.HEADER)
|
||||
.setOrigin(0.5, 0.5);
|
||||
|
||||
this.add.text(X, Y, cryp.name, TEXT.HEADER);
|
||||
@@ -116,7 +122,7 @@ class StatSheet extends Phaser.Scene {
|
||||
if (hitBox) {
|
||||
hitBox.itemDeselect();
|
||||
// add socket function for unlearn here
|
||||
console.log(`delete: ${item.item}`);
|
||||
ws.sendVboxUnequip(vbox.instance, cryp.id, item.item);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -101,6 +101,10 @@ function createSocket(events) {
|
||||
send({ method: 'player_vbox_apply', params: { instance_id: instanceId, cryp_id: crypId, index } });
|
||||
}
|
||||
|
||||
function sendVboxUnequip(instanceId, crypId, target) {
|
||||
send({ method: 'player_vbox_unequip', params: { instance_id: instanceId, cryp_id: crypId, target } });
|
||||
}
|
||||
|
||||
function sendVboxDiscard(instanceId) {
|
||||
send({ method: 'player_vbox_discard', params: { instance_id: instanceId } });
|
||||
}
|
||||
@@ -311,6 +315,7 @@ function createSocket(events) {
|
||||
sendVboxReclaim,
|
||||
sendVboxCombine,
|
||||
sendVboxDiscard,
|
||||
sendVboxUnequip,
|
||||
connect,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user