Initial scaffold: Rust server workspace (sb-api, sb-core, sb-db, sb-auth, sb-shared) + sb-common dependency + systemd
This commit is contained in:
commit
7a75a523f0
39 changed files with 183 additions and 0 deletions
13
crates/sb-core/src/items.rs
Normal file
13
crates/sb-core/src/items.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
pub mod mod;
|
||||
|
||||
use sb_common::PROJECT_NAME;
|
||||
|
||||
const WEAPONS: &str = include_str!("../../../../skara-brae-common/data/items/weapons.json");
|
||||
|
||||
pub fn game_name() -> &'static str {
|
||||
PROJECT_NAME
|
||||
}
|
||||
|
||||
pub fn load_weapons() -> Vec<serde_json::Value> {
|
||||
serde_json::from_str(WEAPONS).expect("failed to parse weapons data")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue