feat: Added API for web map in discord bot
- Bump version to 0.11.0 - Added data table to quests, accounts and rooms - Discord bot now adds "avatar" and "name" data to accounts on init - Added CLI "map data" command
This commit is contained in:
parent
0ab777d898
commit
c22787792d
18 changed files with 1161 additions and 224 deletions
|
|
@ -38,7 +38,8 @@ fn quest_one() {
|
|||
answer: "Accept the answer if it has no attachments and an empty comment".to_owned(),
|
||||
public: false,
|
||||
available_on: None,
|
||||
deadline: None
|
||||
deadline: None,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
assert_eq!(*quest, expected);
|
||||
|
|
@ -73,7 +74,8 @@ fn account_test() {
|
|||
balance: 150,
|
||||
location: 0,
|
||||
quests_completed: vec![0],
|
||||
rooms_unlocked: Vec::new()
|
||||
rooms_unlocked: Vec::new(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let accounts = config.load_accounts();
|
||||
|
|
@ -92,6 +94,7 @@ fn load_map() {
|
|||
value: 0,
|
||||
name: "Entrance".to_string(),
|
||||
description: Some("Enter the dungeon".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let room1 = Room {
|
||||
|
|
@ -100,6 +103,7 @@ fn load_map() {
|
|||
value: 100,
|
||||
name: "Kitchen hall".to_string(),
|
||||
description: None,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let room2 = Room {
|
||||
|
|
@ -108,6 +112,7 @@ fn load_map() {
|
|||
value: 250,
|
||||
name: "Room".to_string(),
|
||||
description: Some("Simple room with no furniture".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let room3 = Room {
|
||||
|
|
@ -116,6 +121,7 @@ fn load_map() {
|
|||
value: 175,
|
||||
name: "Kitchen".to_string(),
|
||||
description: Some("Knives are stored here".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let expected = Map {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue