mirror of
https://github.com/tbamud/tbamud.git
synced 2026-03-20 19:26:33 +01:00
Add WORN_BACK location
This commit is contained in:
parent
fa5a771f88
commit
448adc6cba
7 changed files with 66 additions and 40 deletions
|
|
@ -246,4 +246,12 @@ A long piece of bones with a sharpened edge has been left here.~
|
|||
5 0 0 0 0 an 0 0 0 0 0 0 0
|
||||
1 6 11 0
|
||||
3 50 0 0 0
|
||||
#131
|
||||
backpack pack hide~
|
||||
a hide backpack~
|
||||
A backpack made of thick hide is lying here.~
|
||||
~
|
||||
15 0 0 0 0 ad 0 0 0 0 0 0 0
|
||||
75 0 0 0
|
||||
5 50 0 0 0
|
||||
$~
|
||||
|
|
|
|||
|
|
@ -1127,6 +1127,9 @@ static void wear_message(struct char_data *ch, struct obj_data *obj, int where)
|
|||
{"$n wears $p around $s neck.",
|
||||
"You wear $p around your neck."},
|
||||
|
||||
{"$n straps $p around $s back.",
|
||||
"You wear $p on your back."},
|
||||
|
||||
{"$n wears $p on $s body.",
|
||||
"You wear $p on your body."},
|
||||
|
||||
|
|
@ -1180,11 +1183,11 @@ static void perform_wear(struct char_data *ch, struct obj_data *obj, int where)
|
|||
*/
|
||||
|
||||
int wear_bitvectors[] = {
|
||||
ITEM_WEAR_TAKE, ITEM_WEAR_FINGER, ITEM_WEAR_FINGER, ITEM_WEAR_NECK,
|
||||
ITEM_WEAR_NECK, ITEM_WEAR_BODY, ITEM_WEAR_HEAD, ITEM_WEAR_LEGS,
|
||||
ITEM_WEAR_FEET, ITEM_WEAR_HANDS, ITEM_WEAR_ARMS, ITEM_WEAR_SHIELD,
|
||||
ITEM_WEAR_ABOUT, ITEM_WEAR_WAIST, ITEM_WEAR_WRIST, ITEM_WEAR_WRIST,
|
||||
ITEM_WEAR_WIELD, ITEM_WEAR_TAKE
|
||||
ITEM_WEAR_TAKE, ITEM_WEAR_FINGER, ITEM_WEAR_FINGER, ITEM_WEAR_NECK,
|
||||
ITEM_WEAR_NECK, ITEM_WEAR_BACK, ITEM_WEAR_BODY, ITEM_WEAR_HEAD,
|
||||
ITEM_WEAR_LEGS, ITEM_WEAR_FEET, ITEM_WEAR_HANDS, ITEM_WEAR_ARMS,
|
||||
ITEM_WEAR_SHIELD, ITEM_WEAR_ABOUT, ITEM_WEAR_WAIST, ITEM_WEAR_WRIST,
|
||||
ITEM_WEAR_WRIST, ITEM_WEAR_WIELD, ITEM_WEAR_TAKE
|
||||
};
|
||||
|
||||
const char *already_wearing[] = {
|
||||
|
|
@ -1193,6 +1196,7 @@ static void perform_wear(struct char_data *ch, struct obj_data *obj, int where)
|
|||
"You're already wearing something on both of your ring fingers.\r\n",
|
||||
"YOU SHOULD NEVER SEE THIS MESSAGE. PLEASE REPORT.\r\n",
|
||||
"You can't wear anything else around your neck.\r\n",
|
||||
"You can't wear any more on your back.\r\n",
|
||||
"You're already wearing something on your body.\r\n",
|
||||
"You're already wearing something on your head.\r\n",
|
||||
"You're already wearing something on your legs.\r\n",
|
||||
|
|
@ -1242,6 +1246,7 @@ int find_eq_pos(struct char_data *ch, struct obj_data *obj, char *arg)
|
|||
"!RESERVED!",
|
||||
"neck",
|
||||
"!RESERVED!",
|
||||
"back",
|
||||
"body",
|
||||
"head",
|
||||
"legs",
|
||||
|
|
@ -1261,6 +1266,7 @@ int find_eq_pos(struct char_data *ch, struct obj_data *obj, char *arg)
|
|||
if (!arg || !*arg) {
|
||||
if (CAN_WEAR(obj, ITEM_WEAR_FINGER)) where = WEAR_FINGER_R;
|
||||
if (CAN_WEAR(obj, ITEM_WEAR_NECK)) where = WEAR_NECK_1;
|
||||
if (CAN_WEAR(obj, ITEM_WEAR_BACK)) where = WEAR_BACK;
|
||||
if (CAN_WEAR(obj, ITEM_WEAR_BODY)) where = WEAR_BODY;
|
||||
if (CAN_WEAR(obj, ITEM_WEAR_HEAD)) where = WEAR_HEAD;
|
||||
if (CAN_WEAR(obj, ITEM_WEAR_LEGS)) where = WEAR_LEGS;
|
||||
|
|
|
|||
|
|
@ -3978,6 +3978,7 @@ static struct zcheck_armor {
|
|||
} zarmor[] = {
|
||||
{ITEM_WEAR_FINGER, 10, "Ring"},
|
||||
{ITEM_WEAR_NECK, 10, "Necklace"},
|
||||
{ITEM_WEAR_BACK, 10, "Backpack"},
|
||||
{ITEM_WEAR_BODY, 10, "Body armor"},
|
||||
{ITEM_WEAR_HEAD, 10, "Head gear"},
|
||||
{ITEM_WEAR_LEGS, 10, "Legwear"},
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ const char *wear_where[] = {
|
|||
"<worn on finger> ",
|
||||
"<worn around neck> ",
|
||||
"<worn around neck> ",
|
||||
"<worn on back> ",
|
||||
"<worn on body> ",
|
||||
"<worn on head> ",
|
||||
"<worn on legs> ",
|
||||
|
|
@ -357,6 +358,7 @@ const char *equipment_types[] = {
|
|||
"Worn on left finger",
|
||||
"First worn around Neck",
|
||||
"Second worn around Neck",
|
||||
"Worn on back",
|
||||
"Worn on body",
|
||||
"Worn on head",
|
||||
"Worn on legs",
|
||||
|
|
@ -411,6 +413,7 @@ const char *wear_bits[] = {
|
|||
"TAKE",
|
||||
"FINGER",
|
||||
"NECK",
|
||||
"BACK",
|
||||
"BODY",
|
||||
"HEAD",
|
||||
"LEGS",
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ int find_eq_pos_script(char *arg)
|
|||
{"waist", WEAR_WAIST},
|
||||
{"rwrist", WEAR_WRIST_R},
|
||||
{"lwrist", WEAR_WRIST_L},
|
||||
{"back", WEAR_BACK},
|
||||
{"none", -1}
|
||||
};
|
||||
|
||||
|
|
@ -268,6 +269,7 @@ int can_wear_on_pos(struct obj_data *obj, int pos)
|
|||
case WEAR_FINGER_L: return CAN_WEAR(obj, ITEM_WEAR_FINGER);
|
||||
case WEAR_NECK_1:
|
||||
case WEAR_NECK_2: return CAN_WEAR(obj, ITEM_WEAR_NECK);
|
||||
case WEAR_BACK: return CAN_WEAR(obj, ITEM_WEAR_BACK);
|
||||
case WEAR_BODY: return CAN_WEAR(obj, ITEM_WEAR_BODY);
|
||||
case WEAR_HEAD: return CAN_WEAR(obj, ITEM_WEAR_HEAD);
|
||||
case WEAR_LEGS: return CAN_WEAR(obj, ITEM_WEAR_LEGS);
|
||||
|
|
|
|||
|
|
@ -160,6 +160,10 @@ static void auto_equip(struct char_data *ch, struct obj_data *obj, int location)
|
|||
if (!CAN_WEAR(obj, ITEM_WEAR_NECK))
|
||||
location = LOC_INVENTORY;
|
||||
break;
|
||||
case WEAR_BACK:
|
||||
if (!CAN_WEAR(obj, ITEM_WEAR_BACK))
|
||||
location = LOC_INVENTORY;
|
||||
break;
|
||||
case WEAR_BODY:
|
||||
if (!CAN_WEAR(obj, ITEM_WEAR_BODY))
|
||||
location = LOC_INVENTORY;
|
||||
|
|
|
|||
|
|
@ -346,26 +346,27 @@
|
|||
which control the valid places you can wear a piece of equipment.
|
||||
For example, there are two neck positions on the player, and items
|
||||
only get the generic neck type. */
|
||||
#define WEAR_LIGHT 0 /**< Equipment Location Light */
|
||||
#define WEAR_FINGER_R 1 /**< Equipment Location Right Finger */
|
||||
#define WEAR_FINGER_L 2 /**< Equipment Location Left Finger */
|
||||
#define WEAR_NECK_1 3 /**< Equipment Location Neck #1 */
|
||||
#define WEAR_NECK_2 4 /**< Equipment Location Neck #2 */
|
||||
#define WEAR_BODY 5 /**< Equipment Location Body */
|
||||
#define WEAR_HEAD 6 /**< Equipment Location Head */
|
||||
#define WEAR_LEGS 7 /**< Equipment Location Legs */
|
||||
#define WEAR_FEET 8 /**< Equipment Location Feet */
|
||||
#define WEAR_HANDS 9 /**< Equipment Location Hands */
|
||||
#define WEAR_ARMS 10 /**< Equipment Location Arms */
|
||||
#define WEAR_SHIELD 11 /**< Equipment Location Shield */
|
||||
#define WEAR_ABOUT 12 /**< Equipment Location about body (like a cape)*/
|
||||
#define WEAR_WAIST 13 /**< Equipment Location Waist */
|
||||
#define WEAR_WRIST_R 14 /**< Equipment Location Right Wrist */
|
||||
#define WEAR_WRIST_L 15 /**< Equipment Location Left Wrist */
|
||||
#define WEAR_WIELD 16 /**< Equipment Location Weapon */
|
||||
#define WEAR_HOLD 17 /**< Equipment Location held in offhand */
|
||||
#define WEAR_LIGHT 0 /**< Equipment Location Light */
|
||||
#define WEAR_FINGER_R 1 /**< Equipment Location Right Finger */
|
||||
#define WEAR_FINGER_L 2 /**< Equipment Location Left Finger */
|
||||
#define WEAR_NECK_1 3 /**< Equipment Location Neck #1 */
|
||||
#define WEAR_NECK_2 4 /**< Equipment Location Neck #2 */
|
||||
#define WEAR_BACK 5 /**< Equipment Location back */
|
||||
#define WEAR_BODY 6 /**< Equipment Location Body */
|
||||
#define WEAR_HEAD 7 /**< Equipment Location Head */
|
||||
#define WEAR_LEGS 8 /**< Equipment Location Legs */
|
||||
#define WEAR_FEET 9 /**< Equipment Location Feet */
|
||||
#define WEAR_HANDS 10 /**< Equipment Location Hands */
|
||||
#define WEAR_ARMS 11 /**< Equipment Location Arms */
|
||||
#define WEAR_SHIELD 12 /**< Equipment Location Shield */
|
||||
#define WEAR_ABOUT 13 /**< Equipment Location about body (like a cape or cloak)*/
|
||||
#define WEAR_WAIST 14 /**< Equipment Location Waist */
|
||||
#define WEAR_WRIST_R 15 /**< Equipment Location Right Wrist */
|
||||
#define WEAR_WRIST_L 16 /**< Equipment Location Left Wrist */
|
||||
#define WEAR_WIELD 17 /**< Equipment Location Weapon */
|
||||
#define WEAR_HOLD 18 /**< Equipment Location held in offhand */
|
||||
/** Total number of available equipment lcoations */
|
||||
#define NUM_WEARS 18
|
||||
#define NUM_WEARS 19
|
||||
|
||||
/* object-related defines */
|
||||
/* Item types: used by obj_data.obj_flags.type_flag */
|
||||
|
|
@ -396,23 +397,24 @@
|
|||
#define NUM_ITEM_TYPES 24
|
||||
|
||||
/* Take/Wear flags: used by obj_data.obj_flags.wear_flags */
|
||||
#define ITEM_WEAR_TAKE 0 /**< Item can be taken */
|
||||
#define ITEM_WEAR_FINGER 1 /**< Item can be worn on finger */
|
||||
#define ITEM_WEAR_NECK 2 /**< Item can be worn around neck */
|
||||
#define ITEM_WEAR_BODY 3 /**< Item can be worn on body */
|
||||
#define ITEM_WEAR_HEAD 4 /**< Item can be worn on head */
|
||||
#define ITEM_WEAR_LEGS 5 /**< Item can be worn on legs */
|
||||
#define ITEM_WEAR_FEET 6 /**< Item can be worn on feet */
|
||||
#define ITEM_WEAR_HANDS 7 /**< Item can be worn on hands */
|
||||
#define ITEM_WEAR_ARMS 8 /**< Item can be worn on arms */
|
||||
#define ITEM_WEAR_SHIELD 9 /**< Item can be used as a shield */
|
||||
#define ITEM_WEAR_ABOUT 10 /**< Item can be worn about body */
|
||||
#define ITEM_WEAR_WAIST 11 /**< Item can be worn around waist */
|
||||
#define ITEM_WEAR_WRIST 12 /**< Item can be worn on wrist */
|
||||
#define ITEM_WEAR_WIELD 13 /**< Item can be wielded */
|
||||
#define ITEM_WEAR_HOLD 14 /**< Item can be held */
|
||||
#define ITEM_WEAR_TAKE 0 /**< Item can be taken */
|
||||
#define ITEM_WEAR_FINGER 1 /**< Item can be worn on finger */
|
||||
#define ITEM_WEAR_NECK 2 /**< Item can be worn around neck */
|
||||
#define ITEM_WEAR_BACK 3 /**< Item can be worn on back */
|
||||
#define ITEM_WEAR_BODY 4 /**< Item can be worn on body */
|
||||
#define ITEM_WEAR_HEAD 5 /**< Item can be worn on head */
|
||||
#define ITEM_WEAR_LEGS 6 /**< Item can be worn on legs */
|
||||
#define ITEM_WEAR_FEET 7 /**< Item can be worn on feet */
|
||||
#define ITEM_WEAR_HANDS 8 /**< Item can be worn on hands */
|
||||
#define ITEM_WEAR_ARMS 9 /**< Item can be worn on arms */
|
||||
#define ITEM_WEAR_SHIELD 10 /**< Item can be used as a shield */
|
||||
#define ITEM_WEAR_ABOUT 11 /**< Item can be worn about body */
|
||||
#define ITEM_WEAR_WAIST 12 /**< Item can be worn around waist */
|
||||
#define ITEM_WEAR_WRIST 13 /**< Item can be worn on wrist */
|
||||
#define ITEM_WEAR_WIELD 14 /**< Item can be wielded */
|
||||
#define ITEM_WEAR_HOLD 15 /**< Item can be held */
|
||||
/** Total number of item wears */
|
||||
#define NUM_ITEM_WEARS 15
|
||||
#define NUM_ITEM_WEARS 16
|
||||
|
||||
/* Extra object flags: used by obj_data.obj_flags.extra_flags */
|
||||
#define ITEM_GLOW 0 /**< Item is glowing */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue