various pax things

This commit is contained in:
ntr 2019-10-10 15:00:45 +11:00
parent a3d5c3a29b
commit 43a53e5651
5 changed files with 23 additions and 6 deletions

View File

@ -123,4 +123,8 @@
padding: 0; padding: 0;
} }
} }
.play-p {
display: none;
}
} }

View File

@ -38,6 +38,15 @@ function InstanceCtrlBtns(args) {
const finished = instance && instance.phase === 'Finished'; const finished = instance && instance.phase === 'Finished';
// cheeky to make sure nubs don't just abandon their first game
const beingNub = instance.phase_end
&& instance.phase === 'Lobby'
&& Date.parse(instance.phase_end) - Date.now() < 2000;
if (beingNub) {
sendReady();
}
return ( return (
<div class="instance-ctrl-btns"> <div class="instance-ctrl-btns">
<button disabled={true} >Chat</button> <button disabled={true} >Chat</button>

View File

@ -94,7 +94,7 @@ function Play(args) {
<section class="top"> <section class="top">
<div class="news"> <div class="news">
<h1>v{VERSION}</h1> <h1>v{VERSION}</h1>
<p>Use the buttons on the right to join an instance.</p> <p class="play-p">Use the buttons on the right to join an instance.</p>
<p> <p>
Select <b>PVP</b> to play against other players.<br /> Select <b>PVP</b> to play against other players.<br />
Select <b>INVITE</b> then click <b>COPY LINK</b> to generate an instance invitation for a friend.<br /> Select <b>INVITE</b> then click <b>COPY LINK</b> to generate an instance invitation for a friend.<br />

View File

@ -530,13 +530,13 @@ pub fn instance_create(tx: &mut Transaction, instance: Instance) -> Result<Insta
let instance_bytes = to_vec(&instance)?; let instance_bytes = to_vec(&instance)?;
let query = " let query = "
INSERT INTO instances (id, data) INSERT INTO instances (id, data, upkeep)
VALUES ($1, $2) VALUES ($1, $2, $3)
RETURNING id; RETURNING id;
"; ";
let result = tx let result = tx
.query(query, &[&instance.id, &instance_bytes])?; .query(query, &[&instance.id, &instance_bytes, &instance.phase_end])?;
result.iter().next().ok_or(format_err!("no instances written"))?; result.iter().next().ok_or(format_err!("no instances written"))?;

View File

@ -1,7 +1,7 @@
use rand::prelude::*; use rand::prelude::*;
use rand::{thread_rng}; use rand::{thread_rng};
const FIRSTS: [&'static str; 51] = [ const FIRSTS: [&'static str; 52] = [
"artificial", "artificial",
"ambient", "ambient",
"borean", "borean",
@ -46,6 +46,7 @@ const FIRSTS: [&'static str; 51] = [
"purified", "purified",
"recalcitrant", "recalcitrant",
"rogue", "rogue",
"sealed",
"subversive", "subversive",
"subterranean", "subterranean",
"supercooled", "supercooled",
@ -55,10 +56,12 @@ const FIRSTS: [&'static str; 51] = [
"weary", "weary",
]; ];
const LASTS: [&'static str; 56] = [ const LASTS: [&'static str; 58] = [
"artifact", "artifact",
"assembly", "assembly",
"antenna",
"alloy", "alloy",
"carrier",
"carbon", "carbon",
"console", "console",
"construct", "construct",
@ -88,6 +91,7 @@ const LASTS: [&'static str; 56] = [
"mechanism", "mechanism",
"mountain", "mountain",
"nectar", "nectar",
"nebula",
"oak", "oak",
"oxide", "oxide",
"orbit", "orbit",