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;
}
}
.play-p {
display: none;
}
}

View File

@ -38,6 +38,15 @@ function InstanceCtrlBtns(args) {
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 (
<div class="instance-ctrl-btns">
<button disabled={true} >Chat</button>

View File

@ -94,7 +94,7 @@ function Play(args) {
<section class="top">
<div class="news">
<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>
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 />

View File

@ -530,13 +530,13 @@ pub fn instance_create(tx: &mut Transaction, instance: Instance) -> Result<Insta
let instance_bytes = to_vec(&instance)?;
let query = "
INSERT INTO instances (id, data)
VALUES ($1, $2)
INSERT INTO instances (id, data, upkeep)
VALUES ($1, $2, $3)
RETURNING id;
";
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"))?;

View File

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