15 #define W(x, n) { if (quest->x) { stringbuffer_append_printf(buf, n "\n", quest->x); } } 18 W(quest_code,
"quest %s");
19 W(quest_title,
"title %s");
27 W(quest_restart,
"restart %d");
28 W(quest_is_system,
"is_system %d");
30 for (
const auto step : quest->
steps) {
32 if (step->is_completion_step) {
36 if (!step->conditions.empty()) {
39 for (
const auto cond : step->conditions) {
Definition of an in-game quest.
std::vector< quest_step_definition * > steps
Quest steps.
sstring quest_comment
Quest comment, not visible to players.
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Append a formatted string to a string buffer instance.
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
sstring quest_code
Quest internal code.
void quest_write_condition(char *buf, size_t len, const quest_condition *cond)
Write a step condition to a buffer.
virtual void write(const quest_definition *quest, StringBuffer *buf)
Write the specified asset to the StringBuffer.
struct quest_definition * parent
Parent for this quest, NULL if it is a 'top-level' quest.
const Face * face
Face associated with this quest.
void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end)
Append the specified content in a multiline block, starting with "start" and ending with "end"...
A buffer that will be expanded as content is added to it.
sstring quest_description
Quest longer description.
sstring name
Face name, as used by archetypes and such.