Skip to content

Commit 0ff0fe9

Browse files
committed
Prototype feather-definitions
This does a bunch of stuff I'm too tired to explain right now. Will write about this tomorrow. Prototype implementation. Not clean. Has bugs. warned
1 parent 07372c8 commit 0ff0fe9

File tree

19 files changed

+8632
-0
lines changed

19 files changed

+8632
-0
lines changed

Cargo.lock

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ members = [
1717
"core/network",
1818
"core/util",
1919

20+
"definitions",
21+
"definitions/generator",
22+
2023
"server",
2124
"server/template",
2225
"server/chat",

definitions/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "feather-definitions"
3+
version = "0.1.0"
4+
authors = ["caelunshun <caelunshun@gmail.com>"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
num-traits = "0.2"
9+
num-derive = "0.3"
10+
11+
[build-dependencies]
12+
feather-definitions-generator = { path = "generator" }

definitions/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
`feather-definitions` provides a clean
2+
way to define gameplay information, such
3+
as block tags, item tags, and block/item associated
4+
values.

definitions/build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fn main() {
2+
let data_path = concat!(env!("CARGO_MANIFEST_DIR"), "/data");
3+
let target_path = concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated");
4+
5+
if let Err(e) = feather_definitions_generator::load_directory(data_path, target_path) {
6+
panic!("{:?}", e);
7+
}
8+
9+
println!("cargo:rerun-if-changed={}", data_path);
10+
}

0 commit comments

Comments
 (0)