--- deliantra/server/common/readable.C 2012/01/27 22:01:46 1.64
+++ deliantra/server/common/readable.C 2012/11/12 03:14:32 1.66
@@ -1,24 +1,24 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
- *
+ *
* Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2002 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992 Frank Tore Johansen
- *
+ *
* Deliantra is free software: you can redistribute it and/or modify it under
* the terms of the Affero GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the Affero GNU General Public License
* and the GNU General Public License along with this program. If not, see
* .
- *
+ *
* The authors can be reached via e-mail to
*/
@@ -816,21 +816,16 @@
break;
case 6: /*msg file */
default:
- if (book->weight > 2000)
- { /* based on weight */
- name = heavy_book_name[rndm (array_length (heavy_book_name))];
- }
- else if (book->weight < 2001)
- {
- name = light_book_name[rndm (array_length (light_book_name))];
- }
+ name = book->weight > 2000 /* based on weight */
+ ? heavy_book_name [rndm (array_length (heavy_book_name))]
+ : light_book_name [rndm (array_length (light_book_name))];
break;
}
book->name = name;
}
-/* add_book_author()
+/* add_book_author()
* A lot like new_text_name above, but instead chooses an author
* and sets op->title to that value
*/
@@ -1678,15 +1673,15 @@
return buf;
}
-/* tailor_readable_ob()- The main routine. This chooses a random
- * message to put in given readable object (type==BOOK) which will
- * be referred hereafter as a 'book'. We use the book level to de-
- * termine the value of the information we will insert. Higher
- * values mean the book will (generally) have better/more info.
+/* tailor_readable_ob()- The main routine. This chooses a random
+ * message to put in given readable object (type==BOOK) which will
+ * be referred hereafter as a 'book'. We use the book level to de-
+ * termine the value of the information we will insert. Higher
+ * values mean the book will (generally) have better/more info.
* See individual cases as to how this will be utilized.
- * "Book" name/content length are based on the weight of the
+ * "Book" name/content length are based on the weight of the
* document. If the value of msg_type is negative, we will randomly
- * choose the kind of message to generate.
+ * choose the kind of message to generate.
* -b.t. thomas@astro.psu.edu
*
* book is the object we are creating into.