instance form and pve

This commit is contained in:
ntr
2019-04-25 22:21:13 +10:00
parent b5b2e95f34
commit 621676732d
7 changed files with 28 additions and 24 deletions
+5
View File
@@ -15,6 +15,11 @@ const addState = connect(
ws.clearGameStateTimeout();
}
if (!instance) {
ws.clearInstanceStateTimeout();
}
return { game, instance, account };
}
);
+3 -10
View File
@@ -7,6 +7,8 @@ const { stringSort } = require('./../utils');
const molecule = require('./molecule');
const SpawnButton = require('./spawn.button');
const InstanceCreateForm = require('./instance.create.form');
const idSort = stringSort('id');
const COLOURS = [
@@ -24,7 +26,6 @@ function Menu(args) {
sendInstanceState,
sendPlayerMmCrypsSet,
sendInstanceJoin,
sendInstanceNew,
sendCrypSpawn,
instances,
} = args;
@@ -64,20 +65,12 @@ function Menu(args) {
Set Matchmaking Team
</button>
);
const instanceJoin = (
<button
className={`menu-instance-btn right ${instanceJoinHidden ? 'hidden' : ''}`}
disabled={instanceJoinHidden}
onClick={() => sendInstanceNew()}>
Create New Instance
</button>
);
return (
<section className="menu-instance-list" >
{instancePanels}
{mmSet}
{instanceJoin}
<InstanceCreateForm />
</section>
);
}
-8
View File
@@ -14,13 +14,6 @@ const addState = connect(
return false;
}
function sendInstanceNew() {
if (selectedCryps.length) {
return ws.sendInstanceNew(selectedCryps);
}
return false;
}
function sendPlayerMmCrypsSet() {
if (selectedCryps.length) {
return ws.sendPlayerMmCrypsSet(selectedCryps);
@@ -41,7 +34,6 @@ const addState = connect(
cryps,
selectedCryps,
sendInstanceJoin,
sendInstanceNew,
sendInstanceState,
sendCrypSpawn,
sendPlayerMmCrypsSet,