This commit is contained in:
ntr
2019-04-25 14:20:04 +10:00
parent e908ed9a35
commit fcb224f341
9 changed files with 159 additions and 159 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ function GamePanel(props) {
setActiveSkill,
setActiveCryp,
selectSkillTarget,
sendPlayerState,
sendInstanceState,
activeCryp,
account,
showLog,
@@ -50,7 +50,7 @@ function GamePanel(props) {
function backClick() {
quit();
return sendPlayerState(game.instance);
return sendInstanceState(game.instance);
}
const header = (
+3 -3
View File
@@ -23,9 +23,9 @@ const addState = connect(
return false;
}
function sendPlayerState(instanceId) {
function sendInstanceState(instanceId) {
if (!instanceId) return false;
return ws.sendPlayerState(instanceId);
return ws.sendInstanceState(instanceId);
}
// intercept self casting skills
@@ -41,7 +41,7 @@ const addState = connect(
activeSkill,
activeCryp,
selectSkillTarget,
sendPlayerState,
sendInstanceState,
};
},
+2 -2
View File
@@ -20,7 +20,7 @@ function Menu(args) {
cryps,
selectedCryps,
setSelectedCryps,
sendPlayerState,
sendInstanceState,
sendPlayerMmCrypsSet,
sendInstanceJoin,
sendCrypSpawn,
@@ -40,7 +40,7 @@ function Menu(args) {
<button
className={`menu-instance-btn right ${globalInstance ? 'full' : ''}`}
key={instance.id}
onClick={() => sendPlayerState(instance)}>
onClick={() => sendInstanceState(instance)}>
{name}
</button>
);
+3 -3
View File
@@ -25,15 +25,15 @@ const addState = connect(
return ws.sendCrypSpawn(name);
}
function sendPlayerState(instance) {
return ws.sendPlayerState(instance.instance);
function sendInstanceState(instance) {
return ws.sendInstanceState(instance.instance);
}
return {
cryps,
selectedCryps,
sendInstanceJoin,
sendPlayerState,
sendInstanceState,
sendCrypSpawn,
sendPlayerMmCrypsSet,
instances,
+5 -5
View File
@@ -86,8 +86,8 @@ function createSocket(events) {
send({ method: 'player_mm_cryps_set', params: { cryp_ids: crypIds } });
}
function sendPlayerState(instanceId) {
send({ method: 'player_state', params: { instance_id: instanceId } });
function sendInstanceState(instanceId) {
send({ method: 'instanceState', params: { instance_id: instanceId } });
}
function sendVboxAccept(instanceId, group, index) {
@@ -205,7 +205,7 @@ function createSocket(events) {
events.setZone(zone);
}
function playerState(response) {
function instanceState(response) {
const [structName, player] = response;
events.setPlayer(player);
}
@@ -234,7 +234,7 @@ function createSocket(events) {
zone_create: res => console.log(res),
zone_state: zoneState,
zone_close: res => console.log(res),
player_state: playerState,
instanceState: instanceState,
};
function logout() {
@@ -337,7 +337,7 @@ function createSocket(events) {
sendInstanceLobby,
sendInstanceScores,
sendPlayerMmCrypsSet,
sendPlayerState,
sendInstanceState,
sendVboxAccept,
sendVboxApply,
sendVboxReclaim,