#define CHECK_HERE 0x80
#define CHECK_ZONE 0x100
#define CHECK_GLOBAL 0x200
+#define CHECK_DIVISION 0x400
/* hash table stuff */
extern void init_func_hashtab(void); /* eval.c */
DESCRIBE
DESTROY
DISABLE
+DIVISION
DOWN
DSTATS
EMIT
do_scan(player, arg_left, CHECK_INVENTORY | CHECK_SELF);
else if (SW_ISSET(sw, SWITCH_ZONE))
do_scan(player, arg_left, CHECK_ZONE);
+ else if (SW_ISSET(sw, SWITCH_DIVISION))
+ do_scan(player, arg_left, CHECK_DIVISION);
else if (SW_ISSET(sw, SWITCH_GLOBALS))
do_scan(player, arg_left, CHECK_GLOBAL);
else
do_scan(player, arg_left, CHECK_INVENTORY | CHECK_NEIGHBORS |
- CHECK_SELF | CHECK_HERE | CHECK_ZONE | CHECK_GLOBAL);
+ CHECK_SELF | CHECK_HERE | CHECK_ZONE | CHECK_DIVISION |
+ CHECK_GLOBAL);
}
-COMMAND(cmd_search)
-{
+COMMAND (cmd_search) {
do_search(player, arg_left, args_right);
}
CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, NULL},
{"@REJECTMOTD", NULL, cmd_rejectmotd, CMD_T_ANY, "POWER^SITE"},
{"@RESTART", "ALL", cmd_restart, CMD_T_ANY | CMD_T_NOGAGGED, NULL},
- {"@SCAN", "ROOM SELF ZONE GLOBALS", cmd_scan,
+#ifdef RPMODE_SYS
+ {"@CRPLOG", "QUIET RESET COMBAT", cmd_rplog, CMD_T_ANY, "POWER^COMBAT"},
+#endif
+ {"@SCAN", "ROOM SELF ZONE DIVISION GLOBALS", cmd_scan,
CMD_T_ANY | CMD_T_NOGAGGED, NULL},
{"@SD", "LOGOUT", cmd_su, CMD_T_ANY, NULL},
{"@SEARCH", NULL, cmd_search,
}
}
ptr = atrname;
+ if (GoodObject(Division(player))) {
+ /* try division tree */
+ for (thing = Division(player); GoodObject(thing);
+ thing = Division(thing)) {
+ if (ScanFind(player, thing)) {
+ *ptr = '\0';
+ safe_str(atrname, tbuf, &tp);
+ ptr = atrname;
+ }
+ }
+ }
+ ptr = atrname;
if ((Location(player) != MASTER_ROOM)
&& (Zone(Location(player)) != MASTER_ROOM)
&& (Zone(player) != MASTER_ROOM)) {
}
}
ptr = atrname;
+ if ((flag & CHECK_DIVISION) && GoodObject(Division(player))) {
+ /* try division tree */
+ notify(player, T("Matches on objects in the division tree:"));
+ for (thing = Division(player); GoodObject(thing);
+ thing = Division(thing)) {
+ if (ScanFind(player, thing)) {
+ *ptr = '\0';
+ notify_format(player, "%s [%d:%s]",
+ unparse_object(player, thing), num, atrname);
+ ptr = atrname;
+ }
+ }
+ }
+ ptr = atrname;
if ((flag & CHECK_GLOBAL)
&& (Location(player) != MASTER_ROOM)
&& (Zone(Location(player)) != MASTER_ROOM)