Compare commits

...

6 Commits

Author SHA1 Message Date
6794672c97 update for new version (doesn't really matter though) 2021-11-06 15:20:27 +00:00
d2c3269eba bump wasm-bindgen 2021-07-08 18:40:55 +01:00
215af194c8 remove unnecessary comment 2021-07-08 18:38:28 +01:00
0b82495451 separate build and deploy stages 2021-07-08 11:07:24 +01:00
c1d39023f8 add itch cover 2021-07-08 11:06:33 +01:00
ecd117afea 7.5 update 2021-07-08 11:06:07 +01:00
6 changed files with 13 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
[package]
name = "mixsy"
description = "combine Bitsy games"
version = "0.72.0"
version = "0.710.0"
authors = ["Max Bradbury <max@tinybird.info>"]
edition = "2018"
license = "MIT"
@@ -13,6 +13,6 @@ repository = "https://tinybird.dev/max/mixsy"
crate-type = ["cdylib"]
[dependencies]
"bitsy-parser" = "^0.72.0"
"bitsy-parser" = "^0.710.0"
"lazy_static" = "^1.4.0"
"wasm-bindgen" = "^0.2.64"
"wasm-bindgen" = "^0.2.78"

View File

@@ -2,5 +2,4 @@
cargo build
pug index.pug
set -ex
wasm-pack build --target web

View File

@@ -1,6 +1,4 @@
#!/bin/sh
./build.sh
zip -r mixsy.zip README.md index.html merge.png pkg
butler push mixsy.zip ruin/mixsy:html

View File

@@ -27,6 +27,5 @@ html(lang="en-gb")
.square.centre
h2 output
textarea#c
//- Note the usage of `type=module` here as this is an ES6 module -->
script(type="module")
include index.js

BIN
mixsy-cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -16,10 +16,11 @@ lazy_static! {
#[wasm_bindgen]
pub fn load_main(game_data: String) -> String {
let game = Game::from(game_data);
let result = Game::from(game_data);
if game.is_ok() {
STATE.lock().unwrap().main = Some(game.unwrap());
if result.is_ok() {
let (game, _errors) = result.unwrap();
STATE.lock().unwrap().main = Some(game);
"OK!"
} else {
"Could not parse game data"
@@ -28,10 +29,11 @@ pub fn load_main(game_data: String) -> String {
#[wasm_bindgen]
pub fn load_additional(game_data: String) -> String {
let game = Game::from(game_data);
let result = Game::from(game_data);
if game.is_ok() {
STATE.lock().unwrap().additional = Some(game.unwrap());
if result.is_ok() {
let (game, _errors) = result.unwrap();
STATE.lock().unwrap().additional = Some(game);
"OK!"
} else {
"Could not parse game data"
@@ -47,7 +49,8 @@ pub fn merge() -> String {
}
let mut main = state.main.clone().unwrap();
let additional = state.additional.clone().unwrap();
let additional = state.additional.as_ref().unwrap();
main.merge(additional);
main.dedupe_tiles();
main.to_string()