Merge branch 'release/1.6.5'
This commit is contained in:
commit
03263b2491
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-client",
|
||||
"version": "1.6.4",
|
||||
"version": "1.6.5",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="2100mm"
|
||||
height="1100mm"
|
||||
viewBox="0 0 2100 1100"
|
||||
height="2100mm"
|
||||
viewBox="0 0 2100 2100"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
@ -2008,15 +2008,15 @@
|
||||
id="g4989">
|
||||
<polygon
|
||||
style="fill:none;stroke:#f5f5f5;stroke-width:5.92435312;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
points="100,10 190,190 10,190 "
|
||||
points="190,190 10,190 100,10 "
|
||||
id="polygon4983" />
|
||||
<polygon
|
||||
style="fill:none;stroke:#f5f5f5;stroke-width:5.92435312;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
points="100,50 160,170 40,170 "
|
||||
points="160,170 40,170 100,50 "
|
||||
id="polygon4985" />
|
||||
<polygon
|
||||
style="fill:none;stroke:#f5f5f5;stroke-width:5.92435312;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
points="100,90 130,150 70,150 "
|
||||
points="130,150 70,150 100,90 "
|
||||
id="polygon4987" />
|
||||
</g>
|
||||
</mask>
|
||||
@ -2459,9 +2459,9 @@
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.079573438"
|
||||
inkscape:cx="3528.1874"
|
||||
inkscape:cy="583.63933"
|
||||
inkscape:cy="3097.0409"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer2"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:window-width="1920"
|
||||
@ -2515,7 +2515,7 @@
|
||||
id="layer2"
|
||||
inkscape:label="boxes"
|
||||
style="display:none"
|
||||
transform="translate(0,100)">
|
||||
transform="translate(0,1100)">
|
||||
<path
|
||||
style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#f5f5f5;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="M 50,200.00004 V -49.999959 H 550 V 200.00004 H 50"
|
||||
@ -2536,21 +2536,21 @@
|
||||
inkscape:label="face"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-472.60042,1435.1467)"
|
||||
transform="translate(-472.60042,2435.1467)"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#f5f5f5;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 522.60042,-1135.1467 250,-250 249.99998,250"
|
||||
d="m 522.60043,-1635.1467 250,-250 249.99997,250"
|
||||
id="path4950"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#f5f5f5;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 2022.6004,-1135.1467 250,-250 250,250"
|
||||
d="m 2022.6004,-1635.1467 250,-250 250,250"
|
||||
id="path4957"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#f5f5f5;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-variant-east_asian:normal;opacity:1;vector-effect:none;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
d="m 1022.6004,-385.14667 h 1000"
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#f5f5f5;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 1022.6004,-885.14671 h 1000"
|
||||
id="path7471"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
@ -151,3 +151,21 @@ button {
|
||||
border-color: @green;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rgb {
|
||||
0% {
|
||||
color: @red;
|
||||
}
|
||||
25% {
|
||||
color: @white;
|
||||
}
|
||||
50% {
|
||||
color: @blue;
|
||||
}
|
||||
75% {
|
||||
color: @white;
|
||||
}
|
||||
100% {
|
||||
color: @green;
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,6 +85,17 @@ aside {
|
||||
transition-property: color, background;
|
||||
transition-duration: 0.25s;
|
||||
transition-timing-function: ease;
|
||||
|
||||
&:enabled {
|
||||
color: forestgreen;
|
||||
border-color: forestgreen;
|
||||
|
||||
&:hover {
|
||||
background: forestgreen;
|
||||
color: black;
|
||||
border-color: forestgreen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.team-page-ctrl {
|
||||
@ -117,6 +128,10 @@ aside {
|
||||
font-size: 200%;
|
||||
animation: co 0.75s cubic-bezier(0, 0, 1, 1) 0s infinite alternate;
|
||||
}
|
||||
|
||||
.flex {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.abandon:not([disabled]) {
|
||||
|
||||
@ -437,11 +437,12 @@
|
||||
#targeting, .resolving-skill {
|
||||
width: calc(100% - 1em);
|
||||
}
|
||||
}
|
||||
|
||||
.player {
|
||||
width: calc(100% - 1em);
|
||||
bottom: 3em;
|
||||
height: calc(50% - 3em);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -90,6 +90,11 @@
|
||||
.login {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
.terms {
|
||||
display: inline;
|
||||
margin: 0 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,11 @@
|
||||
color: @yellow;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.name.subscriber {
|
||||
// animation: rgb 4s cubic-bezier(0.5, 0, 0.5, 1) 0s infinite alternate;
|
||||
// font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.chat {
|
||||
|
||||
@ -143,7 +143,7 @@ button, input {
|
||||
|
||||
a {
|
||||
color: whitesmoke;
|
||||
text-decoration: none;
|
||||
// text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: whitesmoke;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<meta name="application-name" content="mnml">
|
||||
<meta name="description" content="mnml pvp tbs">
|
||||
<meta name="author" content="ntr@smokestack.io">
|
||||
<title>mnml - abstract strategy</title>
|
||||
<title>MNML - abstract strategy</title>
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<link rel="stylesheet" href="./node_modules/izitoast/dist/css/iziToast.min.css"></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=Jura" rel="stylesheet">
|
||||
@ -19,7 +19,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<p>js is required to run mnml.</p>
|
||||
<p>js is required to run MNML.</p>
|
||||
<p>this site has no ads. free to play forever.</p>
|
||||
</noscript>
|
||||
</body>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-client",
|
||||
"version": "1.6.4",
|
||||
"version": "1.6.5",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -15,10 +15,6 @@ const registerEvents = require('./events');
|
||||
|
||||
const Mnml = require('./components/mnml');
|
||||
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
LogRocket.init('yh0dy3/mnml');
|
||||
}
|
||||
|
||||
function stripeKey() {
|
||||
if (window.location.host === 'mnml.gg') return 'pk_live_fQGrL1uWww2ot8W1G7vTySAv004ygmnMXq';
|
||||
return 'pk_test_Cb49tTqTXpzk7nEmlGzRrNJg00AU0aNZDj';
|
||||
@ -40,9 +36,12 @@ events.setWs(ws);
|
||||
|
||||
const App = () => (
|
||||
<Provider store={store}>
|
||||
<StripeProvider apiKey={stripeKey()}>
|
||||
{window.Stripe
|
||||
? <StripeProvider apiKey={stripeKey()}>
|
||||
<Mnml />
|
||||
</StripeProvider>
|
||||
: <Mnml />
|
||||
}
|
||||
</Provider>
|
||||
);
|
||||
|
||||
|
||||
@ -101,11 +101,13 @@ function AccountBox(args) {
|
||||
// );
|
||||
// }
|
||||
|
||||
const nameClass = `name ${account.subscribed ? 'subscriber' : ''}`;
|
||||
|
||||
return (
|
||||
<div class='player-box bottom'>
|
||||
<div class="msg"> </div>
|
||||
<StateAccountAvatar />
|
||||
<div class="name">{account.name}</div>
|
||||
<div class={nameClass}>{account.name}</div>
|
||||
<div class="score"> </div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -6,17 +6,18 @@ function wiggle(id, idle) {
|
||||
const x = window.innerWidth * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
|
||||
const y = window.innerHeight * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
|
||||
|
||||
const originalX = parseFloat(idle.animations[0].currentValue);
|
||||
const originalY = parseFloat(idle.animations[1].currentValue);
|
||||
// console.log(x, y);
|
||||
return anime({
|
||||
targets: target,
|
||||
rotate: 0,
|
||||
translateX: [x, -x, 0],
|
||||
translateY: [y, -y, 0],
|
||||
translateX: [originalX + x, originalX - x, originalX],
|
||||
translateY: [originalY + y, originalY - y, originalY],
|
||||
duration,
|
||||
easing: 'easeInOutSine',
|
||||
// direction: 'alternate',
|
||||
begin: idle.pause,
|
||||
complete: idle.restart,
|
||||
complete: idle.play,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ function JoinButtons(args) {
|
||||
<AccountBox />
|
||||
<div class="instance-ctrl-btns">
|
||||
<button disabled={true} >Chat</button>
|
||||
<button disabled={true}>-</button>
|
||||
<button class="flex" disabled={true}>-</button>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
@ -3,8 +3,6 @@ const { connect } = require('preact-redux');
|
||||
|
||||
const { errorToast, infoToast } = require('../utils');
|
||||
|
||||
const AccountBox = require('./account.box');
|
||||
|
||||
const addState = connect(
|
||||
function receiveState(state) {
|
||||
const {
|
||||
|
||||
@ -120,7 +120,7 @@ function Play(args) {
|
||||
type="submit">
|
||||
Copy 🔗
|
||||
</button>
|
||||
<figcaption>Invite Generated</figcaption>
|
||||
<figcaption>Click to Copy</figcaption>
|
||||
</figure>
|
||||
);
|
||||
};
|
||||
@ -203,6 +203,7 @@ function Play(args) {
|
||||
<div>
|
||||
Join our Discord server to find opponents and talk to the devs. <br />
|
||||
Message <b>@ntr</b> or <b>@mashy</b> for some credits to get started.<br />
|
||||
<a href='https://www.youtube.com/watch?v=VtZLlkpJuS8'>Tutorial Playthrough on YouTube</a>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
|
||||
@ -70,22 +70,26 @@ function Scoreboard(args) {
|
||||
const winner = player.score === 'Win';
|
||||
|
||||
if (!isPlayer) {
|
||||
const nameClass = `name ${player.img ? 'subscriber' : ''}`;
|
||||
return (
|
||||
<div class={`player-box top ${winner ? 'winner' : player.ready ? 'ready' : ''}`}>
|
||||
<div></div>
|
||||
<div class="score">{scoreText()}</div>
|
||||
<div class="name">{player.name}</div>
|
||||
<div class={nameClass}>{player.name}</div>
|
||||
<Img img={player.img} id={player.id} />
|
||||
<div class="msg">{chat || '\u00A0'}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const boxClass = `player-box bottom ${winner ? 'winner': player.ready ? 'ready' : ''}`;
|
||||
const nameClass = `name ${player.img ? 'subscriber' : ''}`;
|
||||
|
||||
return (
|
||||
<div class={`player-box bottom ${winner ? 'winner': player.ready ? 'ready' : ''}`}>
|
||||
<div class={boxClass}>
|
||||
<div class="msg">{chat || '\u00A0'}</div>
|
||||
<div class="score">{scoreText()}</div>
|
||||
<div class="name">{player.name}</div>
|
||||
<div class={nameClass}>{player.name}</div>
|
||||
<Img img={player.img} id={player.id} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -48,9 +48,12 @@ function Shop(args) {
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="credits">¤ {account.balance}</h1>
|
||||
<Elements>
|
||||
{window.Stripe
|
||||
? <Elements>
|
||||
<StripeBtns account={account} />
|
||||
</Elements>
|
||||
: <div>Please unblock Stripe to use the store</div>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ const Help = require('./welcome.help');
|
||||
const Demo = require('./demo');
|
||||
|
||||
function Welcome() {
|
||||
const page = this.state.page || 'login';
|
||||
const page = this.state.page || 'register';
|
||||
|
||||
const navRegister = () => this.setState({ page: 'register' });
|
||||
const pageEl = () => {
|
||||
@ -53,7 +53,7 @@ function Welcome() {
|
||||
<p>
|
||||
Welcome to mnml.
|
||||
</p>
|
||||
<p> Turn-based 1v1 strategy game in an abstract setting. </p>
|
||||
<p> MNML is a turn-based 1v1 strategy game in an abstract setting. </p>
|
||||
<p>
|
||||
Build a unique team of 3 constructs from a range of skills and specialisations.<br />
|
||||
Outplay your opponent in multiple rounds by adapting to an always shifting meta. <br />
|
||||
@ -62,6 +62,7 @@ function Welcome() {
|
||||
<p>
|
||||
Free to play, no pay to win. Register to start playing.<br />
|
||||
</p>
|
||||
<a href='https://www.youtube.com/watch?v=VtZLlkpJuS8'>Tutorial Playthrough on YouTube</a>
|
||||
</div>
|
||||
{pageEl()}
|
||||
</section>
|
||||
|
||||
@ -58,7 +58,7 @@ function Register(args) {
|
||||
value={this.state.name}
|
||||
onInput={linkState(this, 'name')}
|
||||
/>
|
||||
<label for="password">Password - min 12 chars</label>
|
||||
<label for="password">Password - min 4 chars</label>
|
||||
<input
|
||||
class="login-input"
|
||||
type="password"
|
||||
@ -79,9 +79,11 @@ function Register(args) {
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="terms"
|
||||
id="register-terms"
|
||||
onInput={linkState(this, 'terms')
|
||||
}/>
|
||||
Confirm agreement to terms of service
|
||||
<label class="terms" for="register-terms">Confirm agreement to terms of service.</label>
|
||||
<button onClick={() => window.open('/tos.html')}>VIEW</button>
|
||||
</div>
|
||||
<button
|
||||
|
||||
@ -66,7 +66,7 @@ function registerEvents(store) {
|
||||
// stop fetching the game state til animations are done
|
||||
const newRes = game.resolved.slice(currentGame.resolved.length);
|
||||
return eachSeries(newRes, (r, cb) => {
|
||||
if (!r.event || r.stages === '') return cb;
|
||||
if (!r.event || r.stages === '') return cb();
|
||||
const timeout = animations.getTime(r.stages);
|
||||
const anims = animations.getObjects(r, game, account);
|
||||
const text = animations.getText(r);
|
||||
@ -127,6 +127,7 @@ function registerEvents(store) {
|
||||
|
||||
function setAccount(account) {
|
||||
if (account) {
|
||||
LogRocket.init('yh0dy3/mnml');
|
||||
LogRocket.identify(account.id, account);
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
const toast = require('izitoast');
|
||||
const cbor = require('borc');
|
||||
|
||||
const throttle = require('lodash/throttle');
|
||||
|
||||
const SOCKET_URL =
|
||||
`${window.location.protocol === 'https:' ? 'wss://' : 'ws://'}${window.location.host}/api/ws`;
|
||||
|
||||
@ -363,7 +365,8 @@ function createSocket(events) {
|
||||
sendGameTarget,
|
||||
|
||||
sendInstanceAbandon,
|
||||
sendInstanceReady,
|
||||
// some weird shit happening in face off
|
||||
sendInstanceReady: throttle(sendInstanceReady, 500),
|
||||
sendInstancePractice,
|
||||
sendInstanceQueue,
|
||||
sendInstanceState,
|
||||
|
||||
@ -63,24 +63,6 @@ server {
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
}
|
||||
|
||||
server {
|
||||
server_name minimalstudios.com.au;
|
||||
|
||||
location / {
|
||||
root /var/lib/mnml/public/press/;
|
||||
index index.html;
|
||||
try_files $uri $uri/ index.html;
|
||||
}
|
||||
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/minimalstudios.com.au/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/minimalstudios.com.au/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
}
|
||||
|
||||
|
||||
|
||||
# http -> https
|
||||
server {
|
||||
server_name mnml.gg;
|
||||
@ -91,8 +73,3 @@ server {
|
||||
server_name minimal.gg;
|
||||
return 301 https://mnml.gg$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name minimalstudios.com.au;
|
||||
return 301 https://minimalstudios.com.au$request_uri;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-ops",
|
||||
"version": "1.6.4",
|
||||
"version": "1.6.5",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mnml"
|
||||
version = "1.6.4"
|
||||
version = "1.6.5"
|
||||
authors = ["ntr <ntr@smokestack.io>"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -20,7 +20,7 @@ use img;
|
||||
use failure::Error;
|
||||
use failure::{err_msg, format_err};
|
||||
|
||||
static PASSWORD_MIN_LEN: usize = 11;
|
||||
static PASSWORD_MIN_LEN: usize = 3;
|
||||
|
||||
#[derive(Debug,Clone,Serialize,Deserialize)]
|
||||
pub struct Account {
|
||||
@ -189,7 +189,7 @@ pub fn new_img(tx: &mut Transaction, id: Uuid) -> Result<Account, Error> {
|
||||
}
|
||||
|
||||
pub fn set_password(tx: &mut Transaction, id: Uuid, current: &String, password: &String) -> Result<String, MnmlHttpError> {
|
||||
if password.len() < PASSWORD_MIN_LEN {
|
||||
if password.len() < PASSWORD_MIN_LEN || password.len() > 100 {
|
||||
return Err(MnmlHttpError::PasswordUnacceptable);
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ pub fn set_subscribed(tx: &mut Transaction, id: Uuid, subscribed: bool) -> Resul
|
||||
}
|
||||
|
||||
pub fn create(name: &String, password: &String, tx: &mut Transaction) -> Result<String, MnmlHttpError> {
|
||||
if password.len() < PASSWORD_MIN_LEN {
|
||||
if password.len() < PASSWORD_MIN_LEN || password.len() > 100 {
|
||||
return Err(MnmlHttpError::PasswordUnacceptable);
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ pub fn create(name: &String, password: &String, tx: &mut Transaction) -> Result<
|
||||
|
||||
let id = Uuid::new_v4();
|
||||
let img = Uuid::new_v4();
|
||||
let rounds = 8;
|
||||
let rounds = 12;
|
||||
let password = hash(&password, rounds)?;
|
||||
|
||||
let mut rng = thread_rng();
|
||||
|
||||
@ -450,6 +450,7 @@ pub fn start(pool: PgPool, events_tx: CbSender<Event>, stripe: StripeClient) {
|
||||
}
|
||||
// we done
|
||||
Err(_e) => {
|
||||
// info!("{:?}", e);
|
||||
break;
|
||||
},
|
||||
};
|
||||
|
||||
@ -1264,6 +1264,9 @@ impl Skill {
|
||||
Skill::Invert|
|
||||
Skill::InvertPlus |
|
||||
Skill::InvertPlusPlus |
|
||||
Skill::Intercept|
|
||||
Skill::InterceptPlus |
|
||||
Skill::InterceptPlusPlus |
|
||||
Skill::Counter|
|
||||
Skill::CounterPlus |
|
||||
Skill::CounterPlusPlus |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user