… | |
… | |
113 | { |
113 | { |
114 | if (operate_altar (altar, &money)) |
114 | if (operate_altar (altar, &money)) |
115 | { |
115 | { |
116 | identify (marked); |
116 | identify (marked); |
117 | |
117 | |
118 | buf.printf ("You have %s.", long_desc (marked, pl)); |
118 | buf.printf ("You have %s.\n\n", long_desc (marked, pl)); |
119 | if (marked->msg) |
119 | if (marked->msg) |
120 | buf << "The item has a story:\n" << marked->msg; |
120 | buf << "The item has a story:\n\n" << marked->msg << "\n\n"; |
121 | |
121 | |
122 | return !money; |
122 | return !money; |
123 | } |
123 | } |
124 | } |
124 | } |
125 | |
125 | |
… | |
… | |
129 | { |
129 | { |
130 | if (operate_altar (altar, &money)) |
130 | if (operate_altar (altar, &money)) |
131 | { |
131 | { |
132 | identify (id); |
132 | identify (id); |
133 | |
133 | |
134 | buf.printf ("You have %s.", long_desc (id, pl)); |
134 | buf.printf ("You have %s.\n\n", long_desc (id, pl)); |
135 | if (id->msg) |
135 | if (id->msg) |
136 | buf << "The item has a story:\n" << id->msg; |
136 | buf << "The item has a story:\n\n" << id->msg << "\n\n"; |
137 | |
137 | |
138 | /* If no more money, might as well quit now */ |
138 | /* If no more money, might as well quit now */ |
139 | if (!money || !check_altar_sacrifice (altar, money)) |
139 | if (!money || !check_altar_sacrifice (altar, money)) |
140 | break; |
140 | break; |
141 | } |
141 | } |
… | |
… | |
146 | } |
146 | } |
147 | } |
147 | } |
148 | } |
148 | } |
149 | |
149 | |
150 | if (buf.empty ()) |
150 | if (buf.empty ()) |
151 | buf << ("You have nothing that needs identifying"); |
151 | pl->failmsg ("You have nothing that needs identifying"); |
152 | |
152 | else |
153 | pl->contr->infobox ("Identify", buf); |
153 | pl->contr->infobox (MSG_CHANNEL ("identify"), buf); |
154 | |
154 | |
155 | return !money; |
155 | return !money; |
156 | } |
156 | } |
157 | |
157 | |
158 | /** |
158 | /** |
… | |
… | |
1311 | |
1311 | |
1312 | if (op->contr) |
1312 | if (op->contr) |
1313 | if (client *ns = op->contr->ns) |
1313 | if (client *ns = op->contr->ns) |
1314 | { |
1314 | { |
1315 | ns->play_sound (sign->sound); |
1315 | ns->play_sound (sign->sound); |
1316 | msgType = get_readable_message_type (sign); |
|
|
1317 | |
1316 | |
1318 | if (ns->can_msg) |
1317 | if (ns->can_msg) |
1319 | ns->send_msg (NDI_NAVY, msgType->msgtype, &sign->msg); |
1318 | op->contr->infobox (MSG_CHANNEL ("examine"), format ("T<%s>\n\n\n\n%s", &sign->name, &sign->msg)); |
1320 | else |
1319 | else |
1321 | { |
1320 | { |
1322 | char newbuf[HUGE_BUF]; |
1321 | msgType = get_readable_message_type (sign); |
1323 | snprintf (newbuf, sizeof (newbuf), "%u %s", autoapply ? 1 : 0, &sign->msg); |
1322 | const char *somemsg = format ("%u %s", autoapply ? 1 : 0, &sign->msg); |
1324 | draw_ext_info (NDI_UNIQUE | NDI_NAVY, 0, op, msgType->message_type, msgType->message_subtype, newbuf, &sign->msg); |
1323 | draw_ext_info (NDI_UNIQUE | NDI_NAVY, 0, op, msgType->message_type, msgType->message_subtype, somemsg, &sign->msg); |
1325 | } |
1324 | } |
1326 | } |
1325 | } |
1327 | } |
1326 | } |
1328 | |
1327 | |
1329 | /** |
1328 | /** |
… | |
… | |
1524 | * players output. |
1523 | * players output. |
1525 | */ |
1524 | */ |
1526 | if (trap->msg && strncmp (EXIT_PATH (trap), "/!", 2)) |
1525 | if (trap->msg && strncmp (EXIT_PATH (trap), "/!", 2)) |
1527 | victim->statusmsg (trap->msg, NDI_NAVY); |
1526 | victim->statusmsg (trap->msg, NDI_NAVY); |
1528 | |
1527 | |
|
|
1528 | trap->play_sound (trap->sound); |
1529 | victim->enter_exit (trap); |
1529 | victim->enter_exit (trap); |
1530 | } |
1530 | } |
1531 | goto leave; |
1531 | goto leave; |
1532 | |
1532 | |
1533 | case ENCOUNTER: |
1533 | case ENCOUNTER: |
… | |
… | |
2278 | |
2278 | |
2279 | #if 0 //TODO |
2279 | #if 0 //TODO |
2280 | if (!has_been_loaded (EXIT_PATH (exit)) && exit->race) |
2280 | if (!has_been_loaded (EXIT_PATH (exit)) && exit->race) |
2281 | return 0; /* This is a reset town portal */ |
2281 | return 0; /* This is a reset town portal */ |
2282 | #endif |
2282 | #endif |
|
|
2283 | |
|
|
2284 | LOG (llevError | logBacktrace, "sync map load due to %s\n", exit->debug_desc ()); |
2283 | |
2285 | |
2284 | maptile *exitmap = maptile::find_sync (EXIT_PATH (exit), exit->map); |
2286 | maptile *exitmap = maptile::find_sync (EXIT_PATH (exit), exit->map); |
2285 | |
2287 | |
2286 | if (exitmap) |
2288 | if (exitmap) |
2287 | { |
2289 | { |