… | |
… | |
230 | * start with equipment, but only their abilities). |
230 | * start with equipment, but only their abilities). |
231 | */ |
231 | */ |
232 | static void |
232 | static void |
233 | put_treasure (object *op, object *creator, int flags) |
233 | put_treasure (object *op, object *creator, int flags) |
234 | { |
234 | { |
|
|
235 | if (flags & GT_ENVIRONMENT) |
|
|
236 | { |
235 | /* Bit of a hack - spells should never be put onto the map. The entire |
237 | /* Bit of a hack - spells should never be put onto the map. The entire |
236 | * treasure stuff is a problem - there is no clear idea of knowing |
238 | * treasure stuff is a problem - there is no clear idea of knowing |
237 | * this is the original object, or if this is an object that should be created |
239 | * this is the original object, or if this is an object that should be created |
238 | * by another object. |
240 | * by another object. |
239 | */ |
241 | */ |
240 | if (flags & GT_ENVIRONMENT && op->type != SPELL) |
242 | //TODO: flag such as objects... as such (no drop, anybody?) |
241 | { |
243 | if (op->type == SPELL) |
|
|
244 | { |
|
|
245 | op->destroy (); |
|
|
246 | return; |
|
|
247 | } |
|
|
248 | |
242 | op->expand_tail (); |
249 | op->expand_tail (); |
243 | |
250 | |
244 | if (ob_blocked (op, creator->map, creator->x, creator->y)) |
251 | if (ob_blocked (op, creator->map, creator->x, creator->y)) |
245 | op->destroy (); |
252 | op->destroy (); |
246 | else |
253 | else |