Skip to content

Commit

Permalink
really fix achievements command
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelprograms committed Sep 4, 2024
1 parent 444d1bf commit 6cb7609
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions lib/cmd/character/achievements.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,42 @@ void command (string input, mapping flags) {

if (input == "here") {
a = D_ACHIEVEMENTS->query_achievements_from_room(environment(this_character()));
foreach (mapping m in a || ([ ])) {
if (!sizeof(a)) {
body += ({
([
"items": ({
m["name"] + "\n" + m["description"],
"No achievements found",
}),
"columns": 1,
"align": "left",
"align": "center",
]),
});
} else {
foreach (mapping m in a) {
body += ({
([
"items": ({
m["name"] + "\n" + m["description"],
}),
"columns": 1,
"align": "left",
]),
});
}
}

border(([
"title": "ACHIEVEMENTS",
"body": body,
]));
} else {
// @TODO: Query your achievements
border(([
"title": "ACHIEVEMENTS",
"body": ([
"items": ({
// @TODO: query your achievements
})
]),
]));
}
}

0 comments on commit 6cb7609

Please sign in to comment.