ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_misc.C
(Generate patch)

Comparing deliantra/server/server/c_misc.C (file contents):
Revision 1.49 by pippijn, Fri Mar 2 10:15:40 2007 UTC vs.
Revision 1.50 by pippijn, Fri Mar 2 10:43:01 2007 UTC

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
651int 651int
652command_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
678int
679command_resistances (object *op, char *params) 652command_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
970int 943int
971command_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
987int
988command_title (object *op, char *params) 944command_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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines