Skip to content

Commit 9f66f01

Browse files
add autoready toggle to not automatically ready when holstering
1 parent 97fa6f7 commit 9f66f01

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

src/act.obj.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5508,9 +5508,10 @@ ACMD(do_holster)
55085508
else
55095509
obj_from_char(obj);
55105510
obj_to_obj(obj, cont);
5511-
send_to_char(ch, "You slip %s^n into %s^n and ready it for a quick draw.\r\n", GET_OBJ_NAME(obj), decapitalize_a_an(GET_OBJ_NAME(cont)));
5511+
send_to_char(ch, "You slip %s^n into %s^n%s.\r\n", GET_OBJ_NAME(obj), decapitalize_a_an(GET_OBJ_NAME(cont)),
5512+
PRF_FLAGGED(ch, PRF_AUTOREADY) ? " and ready it for a quick draw" : "");
55125513
act("$n slips $p into $P.", FALSE, ch, obj, cont, TO_ROOM);
5513-
GET_HOLSTER_READY_STATUS(cont) = 1;
5514+
GET_HOLSTER_READY_STATUS(cont) = PRF_FLAGGED(ch, PRF_AUTOREADY) ? 1 : 0;
55145515

55155516
set_dropped_by_info(obj, ch);
55165517

src/act.other.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,9 @@ const char *tog_messages[][2] = {
12181218
{"You will now participate in combat again.\r\n",
12191219
"OK, you will no longer be able to initiate combat or fight back.\r\n"},
12201220
{"You will now see ambiance messages and environmental echoes about traffic.\r\n",
1221-
"You will no longer see ambiance messages and environmental echoes about traffic.\r\n"}
1221+
"You will no longer see ambiance messages and environmental echoes about traffic.\r\n"},
1222+
{"You will now automatically ready your holstered/sheathed weapons.\r\n",
1223+
"You will no longer automatically ready your holstered/sheathed weapons.\r\n"}
12221224
};
12231225

12241226
ACMD(do_toggle)
@@ -1510,6 +1512,9 @@ ACMD(do_toggle)
15101512
} else if (is_abbrev(argument, "traffic") || is_abbrev(argument, "notraffic") || is_abbrev(argument, "no traffic")) {
15111513
result = PRF_TOG_CHK(ch, PRF_NOTRAFFIC);
15121514
mode = 52;
1515+
} else if (is_abbrev(argument, "autoready") || is_abbrev(argument, "ready")) {
1516+
result = PRF_TOG_CHK(ch, PRF_AUTOREADY);
1517+
mode = 53;
15131518
} else {
15141519
send_to_char("That is not a valid toggle option.\r\n", ch);
15151520
return;

src/awake.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ enum {
488488
#define PRF_NOFOLLOW 69
489489
#define PRF_SUPPRESS_PROMPT_CHANGE 70
490490
#define PRF_PASSIVE_IN_COMBAT 71
491-
#define PRF_MAX 72
491+
#define PRF_AUTOREADY 72
492+
#define PRF_MAX 73
492493

493494
/* log watch */
494495

src/constants.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ struct preference_bit_struct preference_bits_v2[] = {
745745
{ "No Follow" , FALSE, TRUE },
746746
{ "No Prompt Change Message", FALSE, TRUE },
747747
{ "Passive Combat" , FALSE, TRUE },
748+
{ "Auto Ready" , TRUE, FALSE },
748749
{ "\n" , 0 , 0 }
749750
};
750751

@@ -823,6 +824,7 @@ const char *preference_bits[] =
823824
"NOFOLLOW",
824825
"!PROMPT_CHANGE_MSG",
825826
"PASSIVE_COMBAT",
827+
"AUTOREADY",
826828
MAX_FLAG_MARKER
827829
};
828830

0 commit comments

Comments
 (0)