… | |
… | |
102 | } |
102 | } |
103 | |
103 | |
104 | /** |
104 | /** |
105 | * Returns total number of items in op |
105 | * Returns total number of items in op |
106 | */ |
106 | */ |
107 | int |
107 | static int |
108 | numb_ob_inside (object *op) |
108 | numb_ob_inside (object *op) |
109 | { |
109 | { |
110 | object *tmp = op->inv; |
110 | object *tmp = op->inv; |
111 | int number = 0, o_number = 0; |
111 | int number = 0, o_number = 0; |
112 | |
112 | |
… | |
… | |
131 | * Otherwise the code returns a 'generic' item if create_item is set. -b.t. |
131 | * Otherwise the code returns a 'generic' item if create_item is set. -b.t. |
132 | * |
132 | * |
133 | * @param rp_arch_index pointer to return value; set to arch index for recipe; |
133 | * @param rp_arch_index pointer to return value; set to arch index for recipe; |
134 | * set to zero if not using a transmution formula |
134 | * set to zero if not using a transmution formula |
135 | */ |
135 | */ |
136 | object * |
136 | static object * |
137 | find_transmution_ob (object *first_ingred, recipe *rp, size_t *rp_arch_index, int create_item) |
137 | find_transmution_ob (object *first_ingred, recipe *rp, size_t *rp_arch_index, int create_item) |
138 | { |
138 | { |
139 | object *prod_item = 0; |
139 | object *prod_item = 0; |
140 | bool found = false; |
140 | bool found = false; |
141 | *rp_arch_index = 0; |
141 | *rp_arch_index = 0; |
… | |
… | |
192 | * |
192 | * |
193 | * @param rp the recipe to make the artifact from |
193 | * @param rp the recipe to make the artifact from |
194 | * |
194 | * |
195 | * @return the newly created object, NULL if something failed |
195 | * @return the newly created object, NULL if something failed |
196 | */ |
196 | */ |
197 | object * |
197 | static object * |
198 | make_item_from_recipe (object *cauldron, recipe *rp) |
198 | make_item_from_recipe (object *cauldron, recipe *rp) |
199 | { |
199 | { |
200 | artifact *art = NULL; |
200 | artifact *art = NULL; |
201 | object *item = NULL; |
201 | object *item = NULL; |
202 | size_t rp_arch_index; |
202 | size_t rp_arch_index; |
… | |
… | |
236 | /* |
236 | /* |
237 | * All but object "save_item" are elimentated from |
237 | * All but object "save_item" are elimentated from |
238 | * the container list. Note we have to becareful to remove the inventories |
238 | * the container list. Note we have to becareful to remove the inventories |
239 | * of objects in the cauldron inventory (ex icecube has stuff in it). |
239 | * of objects in the cauldron inventory (ex icecube has stuff in it). |
240 | */ |
240 | */ |
241 | void |
241 | static void |
242 | remove_contents (object *first_ob, object *save_item) |
242 | remove_contents (object *first_ob, object *save_item) |
243 | { |
243 | { |
244 | // this cries for a cleaner rewrite, removing save_item first possibly |
244 | // this cries for a cleaner rewrite, removing save_item first possibly |
245 | object *next, *tmp = first_ob; |
245 | object *next, *tmp = first_ob; |
246 | |
246 | |