From: Ian Jackson Date: Sun, 14 Jun 2020 13:00:38 +0000 (+0100) Subject: reorganise X-Git-Tag: otter-0.2.0~1587 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=389138d8494c27e6fdc260541f9a1d41bdbe315e;p=otter.git reorganise --- diff --git a/Cargo.toml b/Cargo.toml index 9460ba08..9131c9c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "game" version = "0.0.1" +edition = "2018" [dependencies] #lazy_static = "1.0.0" diff --git a/src/bin/ssetest.rs b/src/bin/server.rs similarity index 90% rename from src/bin/ssetest.rs rename to src/bin/server.rs index 6caaca9e..c592d5c2 100644 --- a/src/bin/ssetest.rs +++ b/src/bin/server.rs @@ -1,16 +1,10 @@ #![feature(proc_macro_hygiene, decl_macro)] -#[macro_use] extern crate rocket; +use rocket::{get,routes}; +//use rocket::{post}; -extern crate rocket_contrib; // why do we need this ? -extern crate serde; -extern crate thiserror; -extern crate anyhow; - -#[path="../imports.rs"] -mod imports; -use imports::*; +use game::imports::*; type RE = E; diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 00000000..4202e992 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,2 @@ + +pub mod imports; diff --git a/templates/script.js b/templates/script.js index 09721052..030a59a5 100644 --- a/templates/script.js +++ b/templates/script.js @@ -16,7 +16,7 @@ function drag_mousedown(e) { drag_cancel(); console.log('mousedown', e); delt = e.target; - if (!delt.dataset.p) { return; } + if (!qdelt.dataset.p) { return; } dcx = e.clientX; dcy = e.clientY; dox = parseFloat(delt.getAttributeNS(null,"x"));