… | |
… | |
1185 | buf << "This is a buildable item.\r"; |
1185 | buf << "This is a buildable item.\r"; |
1186 | |
1186 | |
1187 | /* Does the object have a message? Don't show message for all object |
1187 | /* Does the object have a message? Don't show message for all object |
1188 | * types - especially if the first entry is a match |
1188 | * types - especially if the first entry is a match |
1189 | */ |
1189 | */ |
|
|
1190 | if (msg) |
|
|
1191 | { |
1190 | if (msg && type != EXIT && type != BOOK && type != CORPSE && !move_on && !has_dialogue ()) |
1192 | if (type != EXIT && type != BOOK && type != CORPSE && !move_on && !has_dialogue ()) |
1191 | { |
1193 | { |
1192 | buf << '\r'; |
1194 | buf << '\r'; |
1193 | |
1195 | |
1194 | /* This is just a hack so when identifying the items, we print |
1196 | /* This is just a hack so when identifying the items, we print |
1195 | * out the extra message |
1197 | * out the extra message |
1196 | */ |
1198 | */ |
1197 | if (need_identify (this) && flag [FLAG_IDENTIFIED]) |
1199 | if (need_identify (this) && flag [FLAG_IDENTIFIED]) |
1198 | buf << "The object has a story:\r"; |
1200 | buf << "The object has a story:\r"; |
1199 | |
1201 | |
1200 | buf << msg << '\n'; |
1202 | buf << msg << '\n'; |
|
|
1203 | } |
1201 | } |
1204 | } |
|
|
1205 | else if (inv && inv->type == SPELL && flag [FLAG_IDENTIFIED] |
|
|
1206 | && (type == SPELLBOOK || type == ROD || type == WAND |
|
|
1207 | || type == ROD || type == POTION || type == SCROLL)) |
|
|
1208 | // for spellbooks and other stuff that conatisn spells, print the spell message, |
|
|
1209 | // unless the object has a custom message |
|
|
1210 | buf << '\r' << inv->msg << '\n'; |
1202 | |
1211 | |
1203 | buf << '\n'; |
1212 | buf << '\n'; |
1204 | |
1213 | |
1205 | return std::string (buf.linearise (), buf.size ()); |
1214 | return std::string (buf.linearise (), buf.size ()); |
1206 | } |
1215 | } |