Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COV-0049: Update object types #5

Merged
merged 1 commit into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/act_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ void show_list_to_char(OBJ_DATA * list, CHAR_DATA * ch, bool fShort, bool fShowN
default:
set_char_color(AT_OBJECT, ch);
break;
case ITEM_BLOOD:
set_char_color(AT_BLOOD, ch);
case ITEM_PLANT:
set_char_color(AT_LGREEN, ch);
break;
case ITEM_CORPSE_PC:
case ITEM_CORPSE_NPC:
Expand Down
1 change: 0 additions & 1 deletion src/act_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,6 @@ void wear_obj(CHAR_DATA * ch, OBJ_DATA * obj, bool fReplace, short wear_bit)
|| obj->item_type == ITEM_POTION
|| obj->item_type == ITEM_SCROLL
|| obj->item_type == ITEM_DRINK_CON
|| obj->item_type == ITEM_BLOOD
|| obj->item_type == ITEM_PIPE
|| obj->item_type == ITEM_HERB || obj->item_type == ITEM_KEY || !oprog_use_trigger(ch, obj, NULL, NULL))
{
Expand Down
19 changes: 10 additions & 9 deletions src/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@ const char *const area_flags[] = {
};

const char *const o_types[] = {
"none", "light", "scroll", "wand", "staff", "weapon", "_fireweapon", "_missile",
"treasure", "armor", "potion", "_worn", "furniture", "trash", "_oldtrap",
"container", "_note", "drinkcon", "key", "food", "money", "pen", "boat",
"corpse", "corpse_pc", "fountain", "pill", "blood", "bloodstain",
"scraps", "pipe", "herbcon", "herb", "incense", "fire", "book", "switch",
"lever", "pullchain", "button", "dial", "rune", "runepouch", "match", "trap",
"map", "portal", "paper", "tinder", "lockpick", "spike", "disease", "oil",
"fuel", "puddle", "journal", "missileweapon", "projectile", "quiver", "shovel",
"salve", "cook", "keyring", "odor", "chance", "piece", "housekey", "mix"
"none", "light", "scroll", "wand", "staff", "weapon", "shelf",
"furniture", "treasure", "armor", "potion", "worn", "other", "trash",
"_oldtrap", "container", "_note", "drinkcon", "key", "food", "money",
"pen", "boat", "corpse", "corpse_pc", "fountain", "pill", "plant",
"jewellery", "scraps", "pipe", "herbcon", "herb", "incense", "fire",
"book", "switch", "lever", "pullchain", "button", "dial", "rune",
"runepouch", "match", "trap", "map", "portal", "paper", "tinder",
"lockpick", "spike", "disease", "oil", "fuel", "puddle", "journal",
"missileweapon", "projectile", "quiver", "shovel", "salve", "cook",
"keyring", "odor", "chance", "piece", "housekey", "mix"
};

const char *const a_types[] = {
Expand Down
7 changes: 4 additions & 3 deletions src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -2833,6 +2833,7 @@ OBJ_DATA *create_object(OBJ_INDEX_DATA * pObjIndex, int level)
case ITEM_LIGHT:
case ITEM_TREASURE:
case ITEM_FURNITURE:
case ITEM_SHELF:
case ITEM_TRASH:
case ITEM_CONTAINER:
case ITEM_DRINK_CON:
Expand Down Expand Up @@ -2860,8 +2861,8 @@ OBJ_DATA *create_object(OBJ_INDEX_DATA * pObjIndex, int level)
case ITEM_CORPSE_NPC:
case ITEM_CORPSE_PC:
case ITEM_FOUNTAIN:
case ITEM_BLOOD:
case ITEM_BLOODSTAIN:
case ITEM_PLANT:
case ITEM_JEWEL:
case ITEM_SCRAPS:
case ITEM_PIPE:
case ITEM_HERB_CON:
Expand Down Expand Up @@ -8586,7 +8587,7 @@ void fread_sysdata(SYSTEM_DATA * sys, FILE * fp)
if (!sys->time_of_max)
sys->time_of_max = str_dup("(not recorded)");
if (!sys->mud_name)
sys->mud_name = str_dup("(Name Not Set)");
sys->mud_name = str_dup("Covenant MUD");
if (!sys->port_name)
sys->port_name = str_dup("mud");
if (!sys->admin_email)
Expand Down
78 changes: 2 additions & 76 deletions src/liquids.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ void do_drink(CHAR_DATA* ch, const char* argument)
if (arg[0] == '\0')
{
for (obj = ch->in_room->first_content; obj; obj = obj->next_content)
if ((obj->item_type == ITEM_FOUNTAIN) || (obj->item_type == ITEM_BLOOD) || (obj->item_type == ITEM_PUDDLE))
if ((obj->item_type == ITEM_FOUNTAIN) || (obj->item_type == ITEM_PUDDLE))
break;

if (!obj)
Expand Down Expand Up @@ -1300,57 +1300,6 @@ void do_drink(CHAR_DATA* ch, const char* argument)
}
break;

case ITEM_BLOOD:
if (IS_VAMPIRE(ch) && !IS_NPC(ch))
{
if (obj->timer > 0 /* if timer, must be spilled blood */
&& ch->level > 5 && ch->pcdata->condition[COND_BLOODTHIRST] > (5 + ch->level / 10))
{
send_to_char("It is beneath you to stoop to drinking blood from the ground!\r\n", ch);
send_to_char("Unless in dire need, you'd much rather have blood from a victim's neck!\r\n", ch);
return;
}

if (ch->pcdata->condition[COND_BLOODTHIRST] < (10 + ch->level))
{
if (ch->pcdata->condition[COND_FULL] >= MAX_COND_VALUE
|| ch->pcdata->condition[COND_THIRST] >= MAX_COND_VALUE)
{
send_to_char("You are too full to drink any blood.\r\n", ch);
return;
}

if (!oprog_use_trigger(ch, obj, NULL, NULL))
{
act(AT_BLOOD, "$n drinks from the spilled blood.", ch, NULL, NULL, TO_ROOM);
set_char_color(AT_BLOOD, ch);
send_to_char("You relish in the replenishment of this vital fluid...\r\n", ch);
if (obj->value[1] <= 1)
{
set_char_color(AT_BLOOD, ch);
send_to_char("You drink the last drop of blood from the spill.\r\n", ch);
act(AT_BLOOD, "$n drinks the last drop of blood from the spill.", ch, NULL, NULL, TO_ROOM);
}
}

gain_condition(ch, COND_BLOODTHIRST, 1);
gain_condition(ch, COND_FULL, 1);
gain_condition(ch, COND_THIRST, 1);
if (--obj->value[1] <= 0)
{
if (obj->serial == cur_obj)
global_objcode = rOBJ_DRUNK;
extract_obj(obj);
make_bloodstain(ch);
}
}
else
send_to_char("Alas... you cannot consume any more blood.\r\n", ch);
}
else
send_to_char("It is not in your nature to do such things.\r\n", ch);
break;

case ITEM_POTION:
if (obj->carried_by == ch)
{
Expand Down Expand Up @@ -1684,8 +1633,7 @@ void do_fill(CHAR_DATA* ch, const char* argument)
*/
case ITEM_DRINK_CON:
src_item1 = ITEM_FOUNTAIN;
src_item2 = ITEM_BLOOD;
src_item3 = ITEM_PUDDLE;
src_item2 = ITEM_PUDDLE;
break;
case ITEM_HERB_CON:
src_item1 = ITEM_HERB;
Expand Down Expand Up @@ -1825,9 +1773,6 @@ void do_fill(CHAR_DATA* ch, const char* argument)
case ITEM_FOUNTAIN:
send_to_char("There is no fountain, pool, or puddle here!\r\n", ch);
return;
case ITEM_BLOOD:
send_to_char("There is no blood pool here!\r\n", ch);
return;
case ITEM_HERB_CON:
send_to_char("There are no herbs here!\r\n", ch);
return;
Expand Down Expand Up @@ -1999,25 +1944,6 @@ void do_fill(CHAR_DATA* ch, const char* argument)
act(AT_ACTION, "$n fills $p from $P.", ch, obj, source, TO_ROOM);
return;

case ITEM_BLOOD:
if (obj->value[1] != 0 && obj->value[2] != 13)
{
send_to_char("There is already another liquid in it.\r\n", ch);
return;
}
obj->value[2] = 13;
if (source->value[1] < diff)
diff = source->value[1];
obj->value[1] += diff;
act(AT_ACTION, "You fill $p from $P.", ch, obj, source, TO_CHAR);
act(AT_ACTION, "$n fills $p from $P.", ch, obj, source, TO_ROOM);
if ((source->value[1] -= diff) < 1)
{
extract_obj(source);
make_bloodstain(ch);
}
return;

case ITEM_HERB:
if (obj->value[1] != 0 && obj->value[2] != source->value[2])
{
Expand Down
1 change: 0 additions & 1 deletion src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,6 @@ void actiondesc(CHAR_DATA * ch, OBJ_DATA * obj)

switch (obj->item_type)
{
case ITEM_BLOOD:
case ITEM_FOUNTAIN:
act(AT_ACTION, charbuf, ch, obj, ch, TO_CHAR);
act(AT_ACTION, roombuf, ch, obj, ch, TO_ROOM);
Expand Down
10 changes: 5 additions & 5 deletions src/mud.h
Original file line number Diff line number Diff line change
Expand Up @@ -1677,18 +1677,18 @@ typedef enum
typedef enum
{
ITEM_NONE, ITEM_LIGHT, ITEM_SCROLL, ITEM_WAND, ITEM_STAFF, ITEM_WEAPON,
ITEM_FIREWEAPON, ITEM_MISSILE, ITEM_TREASURE, ITEM_ARMOR, ITEM_POTION,
ITEM_WORN, ITEM_FURNITURE, ITEM_TRASH, ITEM_OLDTRAP, ITEM_CONTAINER,
ITEM_SHELF, ITEM_FURNITURE, ITEM_TREASURE, ITEM_ARMOR, ITEM_POTION,
ITEM_WORN, ITEM_OTHER, ITEM_TRASH, ITEM_OLDTRAP, ITEM_CONTAINER,
ITEM_NOTE, ITEM_DRINK_CON, ITEM_KEY, ITEM_FOOD, ITEM_MONEY, ITEM_PEN,
ITEM_BOAT, ITEM_CORPSE_NPC, ITEM_CORPSE_PC, ITEM_FOUNTAIN, ITEM_PILL,
ITEM_BLOOD, ITEM_BLOODSTAIN, ITEM_SCRAPS, ITEM_PIPE, ITEM_HERB_CON,
ITEM_PLANT, ITEM_JEWEL, ITEM_SCRAPS, ITEM_PIPE, ITEM_HERB_CON,
ITEM_HERB, ITEM_INCENSE, ITEM_FIRE, ITEM_BOOK, ITEM_SWITCH, ITEM_LEVER,
ITEM_PULLCHAIN, ITEM_BUTTON, ITEM_DIAL, ITEM_RUNE, ITEM_RUNEPOUCH,
ITEM_MATCH, ITEM_TRAP, ITEM_MAP, ITEM_PORTAL, ITEM_PAPER,
ITEM_TINDER, ITEM_LOCKPICK, ITEM_SPIKE, ITEM_DISEASE, ITEM_OIL, ITEM_FUEL,
ITEM_PUDDLE, ITEM_JOURNAL, ITEM_MISSILE_WEAPON, ITEM_PROJECTILE, ITEM_QUIVER,
ITEM_SHOVEL, ITEM_SALVE, ITEM_COOK, ITEM_KEYRING, ITEM_ODOR, ITEM_CHANCE,
ITEM_PIECE, ITEM_HOUSEKEY, ITEM_DRINK_MIX
ITEM_SHOVEL, ITEM_SALVE, ITEM_COOK, ITEM_KEYRING, ITEM_ODOR,
ITEM_CHANCE, ITEM_PIECE, ITEM_HOUSEKEY, ITEM_DRINK_MIX
} item_types;

#define MAX_ITEM_TYPE ITEM_DRINK_MIX
Expand Down
10 changes: 0 additions & 10 deletions src/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,16 +1462,6 @@ void obj_update(void)
AT_TEMP = AT_HUNGRY;
break;

case ITEM_BLOOD:
message = "$p slowly seeps into the ground.";
AT_TEMP = AT_BLOOD;
break;

case ITEM_BLOODSTAIN:
message = "$p dries up into flakes and blows away.";
AT_TEMP = AT_BROWN;
break;

case ITEM_SCRAPS:
message = "$p crumble and decay into nothing.";
AT_TEMP = AT_OBJECT;
Expand Down
2 changes: 1 addition & 1 deletion system/WIZLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Masters of the (Name Not Set)!
Masters of the Covenant MUD!

Supreme Entity
Shamus