fix team
This commit is contained in:
parent
cfc3261c01
commit
6fffddd15c
@ -49,6 +49,8 @@
|
|||||||
* warden
|
* warden
|
||||||
* set upkeep_at timestamp for games and instances
|
* set upkeep_at timestamp for games and instances
|
||||||
|
|
||||||
|
* log game results for analysis
|
||||||
|
|
||||||
## SOON
|
## SOON
|
||||||
|
|
||||||
* push events
|
* push events
|
||||||
|
|||||||
@ -352,7 +352,7 @@ header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MENU
|
TEAM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.menu-constructs {
|
.menu-constructs {
|
||||||
@ -365,19 +365,37 @@ header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.menu-constructs .list {
|
.menu-constructs .list {
|
||||||
|
margin-top: 0.5em;
|
||||||
grid-area: list;
|
grid-area: list;
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-auto-rows: 1fr;
|
||||||
|
grid-gap: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-construct-ctr {
|
.menu-construct {
|
||||||
/*flex: 0 0 30%;*/
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
transition-property: border;
|
||||||
|
transition-duration: 0.5s;
|
||||||
|
transition-delay: 0;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-construct:nth-child(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-construct:first-child, .menu-construct:nth-child(4n) {
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spawn-btn.menu-construct {
|
.spawn-btn.menu-construct {
|
||||||
@ -405,17 +423,7 @@ header {
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-construct {
|
/* INSTANCE LIST */
|
||||||
height: 100%;
|
|
||||||
margin: 0.5em;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 1px solid black;
|
|
||||||
|
|
||||||
transition-property: border;
|
|
||||||
transition-duration: 0.5s;
|
|
||||||
transition-delay: 0;
|
|
||||||
transition-timing-function: ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-instance-list {
|
.menu-instance-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@ -17,9 +17,7 @@ function SpawnButton({ spawn }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="menu-construct-ctr spawn-btn">
|
className="menu-construct spawn-btn"
|
||||||
<div
|
|
||||||
className="menu-construct"
|
|
||||||
onClick={e => enabledToggle(e)} >
|
onClick={e => enabledToggle(e)} >
|
||||||
<h2>+</h2>
|
<h2>+</h2>
|
||||||
<input
|
<input
|
||||||
@ -38,7 +36,6 @@ function SpawnButton({ spawn }) {
|
|||||||
spawn
|
spawn
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,15 +89,12 @@ function Team(args) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={construct.id}
|
key={construct.id}
|
||||||
className="menu-construct-ctr">
|
|
||||||
<div
|
|
||||||
className="menu-construct"
|
className="menu-construct"
|
||||||
style={ { 'border-color': borderColour || 'whitesmoke' } }
|
style={ { 'border-color': borderColour || 'whitesmoke' } }
|
||||||
onClick={() => selectConstruct(construct.id)} >
|
onClick={() => selectConstruct(construct.id)} >
|
||||||
{constructAvatar(construct.name, construct.id)}
|
{constructAvatar(construct.name, construct.id)}
|
||||||
<h2>{construct.name}</h2>
|
<h2>{construct.name}</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -166,8 +166,11 @@ impl Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn skill_phase_start(mut self, num_resolutions: usize) -> Game {
|
fn skill_phase_start(mut self, num_resolutions: usize) -> Game {
|
||||||
let phase_add_time_ms = 60000 + num_resolutions * 2500;
|
let resolution_animation_ms = num_resolutions * 2500;
|
||||||
self.phase_start = Utc::now();
|
let phase_add_time_ms = 60000 + resolution_animation_ms;
|
||||||
|
self.phase_start = Utc::now()
|
||||||
|
.checked_add_signed(Duration::milliseconds(resolution_animation_ms as i64))
|
||||||
|
.expect("could not set phase start");
|
||||||
self.phase_end = Utc::now()
|
self.phase_end = Utc::now()
|
||||||
.checked_add_signed(Duration::milliseconds(phase_add_time_ms as i64))
|
.checked_add_signed(Duration::milliseconds(phase_add_time_ms as i64))
|
||||||
.expect("could not set phase end");
|
.expect("could not set phase end");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user