… | |
… | |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * it under the terms of the GNU General Public License as published by |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * the Free Software Foundation, either version 3 of the License, or |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * (at your option) any later version. |
11 | * option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * and the GNU General Public License along with this program. If not, see |
|
|
20 | * <http://www.gnu.org/licenses/>. |
20 | * |
21 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
23 | */ |
23 | |
24 | |
24 | /* This file contains code relevant to the BOOKS hack -- designed |
25 | /* This file contains code relevant to the BOOKS hack -- designed |
… | |
… | |
1349 | |
1350 | |
1350 | /* separator of items */ |
1351 | /* separator of items */ |
1351 | strcpy (buf, "--- \n"); |
1352 | strcpy (buf, "--- \n"); |
1352 | |
1353 | |
1353 | /* Name */ |
1354 | /* Name */ |
1354 | if (art->allowed != NULL && strcmp (art->allowed->name, "All")) |
1355 | if (art->allowed && art->allowed->name != shstr_All) |
1355 | { |
1356 | { |
1356 | linked_char *temp, *next = art->allowed; |
1357 | linked_char *temp, *next = art->allowed; |
1357 | |
1358 | |
1358 | do |
1359 | do |
1359 | { |
1360 | { |
… | |
… | |
1536 | op_name = at->object::name; |
1537 | op_name = at->object::name; |
1537 | else |
1538 | else |
1538 | LOG (llevError, "formula_msg() can't find arch %s for formula.\n", op_name); |
1539 | LOG (llevError, "formula_msg() can't find arch %s for formula.\n", op_name); |
1539 | |
1540 | |
1540 | /* item name */ |
1541 | /* item name */ |
1541 | if (strcmp (formula->title, "NONE")) |
1542 | if (formula->title != shstr_NONE) |
1542 | { |
1543 | { |
1543 | sprintf (retbuf, "%sThe %s of %s", retbuf, op_name, &formula->title); |
1544 | sprintf (retbuf, "%sThe %s of %s", retbuf, op_name, &formula->title); |
1544 | /* This results in things like pile of philo. sulfur. |
1545 | /* This results in things like pile of philo. sulfur. |
1545 | * while philo. sulfur may look better, without this, |
1546 | * while philo. sulfur may look better, without this, |
1546 | * you get things like 'the wise' because its missing the |
1547 | * you get things like 'the wise' because its missing the |
… | |
… | |
1559 | strcat (retbuf, at->title); |
1560 | strcat (retbuf, at->title); |
1560 | strcat (title, " "); |
1561 | strcat (title, " "); |
1561 | strcat (title, at->title); |
1562 | strcat (title, at->title); |
1562 | } |
1563 | } |
1563 | } |
1564 | } |
|
|
1565 | |
1564 | /* Lets name the book something meaningful ! */ |
1566 | /* Lets name the book something meaningful ! */ |
1565 | book->name = title; |
1567 | book->name = title; |
1566 | book->title = NULL; |
1568 | book->title = NULL; |
1567 | |
1569 | |
1568 | /* ingredients to make it */ |
1570 | /* ingredients to make it */ |