… | |
… | |
69 | { |
69 | { |
70 | display_motd (op); |
70 | display_motd (op); |
71 | return 1; |
71 | return 1; |
72 | } |
72 | } |
73 | |
73 | |
74 | /* |
|
|
75 | * Pretty much identical to current map_info, but on a bigger scale |
|
|
76 | * This function returns the name of the players current region, and |
|
|
77 | * a description of it. It is there merely for flavour text. |
|
|
78 | */ |
|
|
79 | void |
|
|
80 | current_region_info (object *op) |
|
|
81 | { |
|
|
82 | if (region *reg = op->region ()) |
|
|
83 | new_draw_info_format (NDI_UNIQUE, 0, op, "You are %s.\n%s", ®->longname, ®->msg); |
|
|
84 | } |
|
|
85 | |
|
|
86 | void |
74 | void |
87 | current_map_info (object *op) |
75 | current_map_info (object *op) |
88 | { |
76 | { |
89 | maptile *m = op->map; |
77 | maptile *m = op->map; |
90 | |
78 | |
… | |
… | |
164 | |
152 | |
165 | int |
153 | int |
166 | command_mapinfo (object *op, char *params) |
154 | command_mapinfo (object *op, char *params) |
167 | { |
155 | { |
168 | current_map_info (op); |
156 | current_map_info (op); |
169 | return 1; |
|
|
170 | } |
|
|
171 | |
|
|
172 | int |
|
|
173 | command_whereami (object *op, char *params) |
|
|
174 | { |
|
|
175 | current_region_info (op); |
|
|
176 | return 1; |
157 | return 1; |
177 | } |
158 | } |
178 | |
159 | |
179 | int |
160 | int |
180 | command_time (object *op, char *params) |
161 | command_time (object *op, char *params) |
… | |
… | |
398 | } |
379 | } |
399 | else |
380 | else |
400 | { |
381 | { |
401 | LOG (llevError, "Cannot write bugs file %s: %s\n", BUG_LOG, strerror (errno)); |
382 | LOG (llevError, "Cannot write bugs file %s: %s\n", BUG_LOG, strerror (errno)); |
402 | } |
383 | } |
403 | } |
|
|
404 | |
|
|
405 | int |
|
|
406 | command_output_sync (object *op, char *params) |
|
|
407 | { |
|
|
408 | int val; |
|
|
409 | |
|
|
410 | if (!params) |
|
|
411 | { |
|
|
412 | new_draw_info_format (NDI_UNIQUE, 0, op, "Output sync time is presently %d", op->contr->outputs_sync); |
|
|
413 | return 1; |
|
|
414 | } |
|
|
415 | val = atoi (params); |
|
|
416 | if (val > 0) |
|
|
417 | { |
|
|
418 | op->contr->outputs_sync = val; |
|
|
419 | new_draw_info_format (NDI_UNIQUE, 0, op, "Output sync time now set to %d", op->contr->outputs_sync); |
|
|
420 | } |
|
|
421 | else |
|
|
422 | new_draw_info (NDI_UNIQUE, 0, op, "Invalid value for output_sync."); |
|
|
423 | |
|
|
424 | return 1; |
|
|
425 | } |
|
|
426 | |
|
|
427 | int |
|
|
428 | command_output_count (object *op, char *params) |
|
|
429 | { |
|
|
430 | int val; |
|
|
431 | |
|
|
432 | if (!params) |
|
|
433 | { |
|
|
434 | new_draw_info_format (NDI_UNIQUE, 0, op, "Output count is presently %d", op->contr->outputs_count); |
|
|
435 | return 1; |
|
|
436 | } |
|
|
437 | val = atoi (params); |
|
|
438 | if (val > 0) |
|
|
439 | { |
|
|
440 | op->contr->outputs_count = val; |
|
|
441 | new_draw_info_format (NDI_UNIQUE, 0, op, "Output count now set to %d", op->contr->outputs_count); |
|
|
442 | } |
|
|
443 | else |
|
|
444 | new_draw_info (NDI_UNIQUE, 0, op, "Invalid value for output_count."); |
|
|
445 | |
|
|
446 | return 1; |
|
|
447 | } |
384 | } |
448 | |
385 | |
449 | /* Prints out some useful information for the character. Everything we print |
386 | /* Prints out some useful information for the character. Everything we print |
450 | * out can be determined by the docs, so we aren't revealing anything extra - |
387 | * out can be determined by the docs, so we aren't revealing anything extra - |
451 | * rather, we are making it convenient to find the values. params have |
388 | * rather, we are making it convenient to find the values. params have |