diff --git a/include/object.h b/include/object.h index 6e64ec5..2bcccd4 100644 --- a/include/object.h +++ b/include/object.h @@ -403,4 +403,9 @@ extern int nroffreeobjects; #define ARCH_DEPLETION "depletion" /**< Archetype for depletion. */ #define ARCH_SYMPTOM "symptom" /**< Archetype for disease symptom. */ +/* This isn't the right place for this, but we need a container subtype for + * special "flesh sack" bonus handling. -kts + */ +#define CONTAINER_NORMAL 0 +#define CONTAINER_FLESH 1 #endif /* OBJECT_H */ diff --git a/server/c_object.c b/server/c_object.c index 2988bd9..d2b6a95 100644 --- a/server/c_object.c +++ b/server/c_object.c @@ -297,7 +297,16 @@ int sack_can_hold(const object *pl, const object *sack, const object *op, uint32 name); return 0; } - if (sack->race + /* Special handling for "flesh bags" --kts */ + if (sack->subtype == CONTAINER_FLESH + && (!op->other_arch || (op->other_arch && sack->race && strstr(sack->race, op->other_arch->name) == NULL)) ) { + draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, + "You can only put %s parts into the %s.", + "You can only put %s parts into the %s.", + sack->race, sack->name); + return 0; + } + if (sack->race && sack->subtype != CONTAINER_FLESH && (sack->race != op->race || op->type == CONTAINER || (sack->stats.food && sack->stats.food != op->type))) { draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, "You can put only %s into the %s.", @@ -574,14 +583,15 @@ void pick_up(object *op, object *alt) { /* startequip items are not allowed to be put into containers * Not sure why we have this limitation + * @@ BE LIMITED NO LONGER !!!! */ - if (op->type == PLAYER + /*if (op->type == PLAYER && alt->type == CONTAINER && QUERY_FLAG(tmp, FLAG_STARTEQUIP)) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, "This object cannot be put into containers!", NULL); return; - } + }*/ tag = tmp->count; pick_up_object(op, alt, tmp, count); @@ -712,7 +722,8 @@ void put_object_in_sack(object *op, object *sack, object *tmp, uint32 nrof) { name_sack); return; } - if (QUERY_FLAG(tmp, FLAG_STARTEQUIP)) { + /* Changed to allow god-given materials to be placed into a cauldron -kts */ + if (QUERY_FLAG(tmp, FLAG_STARTEQUIP) && !QUERY_FLAG(tmp, FLAG_IS_CAULDRON)) { query_name(tmp, name_tmp, MAX_BUF); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, "You cannot put the %s in the %s.",