16 #define DO(v, s) { if (recipe->v) { stringbuffer_append_printf(buf, s "\n", recipe->v); } } 29 DO(keycode,
"keycode %s");
30 DO(transmute,
"trans %d");
31 DO(yield,
"yield %d");
38 DO(skill,
"skill %s");
39 DO(cauldron,
"cauldron %s");
40 DO(failure_arch,
"failure_arch %s");
41 DO(failure_message,
"failure_message %s");
42 DO(min_level,
"min_level %d");
43 DO(is_combination,
"combination %d");
sstring title
Distinguishing name of product.
linked_char * ingred
List of ingredients.
recipe * items
Pointer to first recipe in this list.
bool chance(int a, int b)
Return true with a probability of a/b.
size_t arch_names
Size of the arch_name[] array.
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Append a formatted string to a string buffer instance.
size_t tool_size
Length of tool.
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
List of recipes with a certain number of ingredients.
char ** tool
Tool(s) for item transformation.
static void writeStringArray(char **items, size_t count, StringBuffer *buf)
Write a list of strings as ' a,b,c' (leading space).
recipe * next
Next recipe with the same number of ingredients.
char ** arch_name
Possible archetypes of the final product made.
A buffer that will be expanded as content is added to it.
static void writeLinkedChar(const linked_char *list, StringBuffer *buf)
Write a list of strings as ' a,b,c' (leading space).