… | |
… | |
647 | new_draw_info (NDI_UNIQUE, 0, op, "no such pet."); |
647 | new_draw_info (NDI_UNIQUE, 0, op, "no such pet."); |
648 | return 0; |
648 | return 0; |
649 | } |
649 | } |
650 | |
650 | |
651 | int |
651 | int |
652 | command_usekeys (object *op, char *params) |
|
|
653 | { |
|
|
654 | usekeytype oldtype = op->contr->usekeys; |
|
|
655 | static const char *const types[] = { "inventory", "keyrings", "containers" }; |
|
|
656 | |
|
|
657 | if (!params) |
|
|
658 | { |
|
|
659 | new_draw_info_format (NDI_UNIQUE, 0, op, "usekeys is set to %s", types[op->contr->usekeys]); |
|
|
660 | return 1; |
|
|
661 | } |
|
|
662 | |
|
|
663 | if (!strcmp (params, "inventory")) |
|
|
664 | op->contr->usekeys = key_inventory; |
|
|
665 | else if (!strcmp (params, "keyrings")) |
|
|
666 | op->contr->usekeys = keyrings; |
|
|
667 | else if (!strcmp (params, "containers")) |
|
|
668 | op->contr->usekeys = containers; |
|
|
669 | else |
|
|
670 | { |
|
|
671 | new_draw_info_format (NDI_UNIQUE, 0, op, "usekeys: Unknown options %s, valid options are inventory, keyrings, containers", params); |
|
|
672 | return 0; |
|
|
673 | } |
|
|
674 | new_draw_info_format (NDI_UNIQUE, 0, op, "usekeys %s set to %s", (oldtype == op->contr->usekeys ? "" : "now"), types[op->contr->usekeys]); |
|
|
675 | return 1; |
|
|
676 | } |
|
|
677 | |
|
|
678 | int |
|
|
679 | command_resistances (object *op, char *params) |
652 | command_resistances (object *op, char *params) |
680 | { |
653 | { |
681 | int i; |
654 | int i; |
682 | |
655 | |
683 | if (!op) |
656 | if (!op) |
… | |
… | |
966 | return 0; |
939 | return 0; |
967 | } |
940 | } |
968 | } |
941 | } |
969 | |
942 | |
970 | int |
943 | int |
971 | command_sound (object *op, char *params) |
|
|
972 | { |
|
|
973 | if (op->contr->ns->sound) |
|
|
974 | { |
|
|
975 | op->contr->ns->sound = 0; |
|
|
976 | new_draw_info (NDI_UNIQUE, 0, op, "Silence is golden..."); |
|
|
977 | } |
|
|
978 | else |
|
|
979 | { |
|
|
980 | op->contr->ns->sound = 1; |
|
|
981 | new_draw_info (NDI_UNIQUE, 0, op, "The sounds are enabled."); |
|
|
982 | } |
|
|
983 | |
|
|
984 | return 1; |
|
|
985 | } |
|
|
986 | |
|
|
987 | int |
|
|
988 | command_title (object *op, char *params) |
944 | command_title (object *op, char *params) |
989 | { |
945 | { |
990 | char buf[MAX_BUF]; |
946 | char buf[MAX_BUF]; |
991 | |
947 | |
992 | if (settings.set_title == FALSE) |
948 | if (settings.set_title == FALSE) |