Skip to content
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
2 changes: 1 addition & 1 deletion src/engine/db/obj_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ ObjData::shared_ptr read_one_object_new(char **data, int *error) {
}
}
// Проверка на ингры
if (object->get_type() == EObjType::kMagicIngredient) {
if (object->get_type() == EObjType::kMagicComponent) {
int err = im_assign_power(object.get());
if (err) {
*error = 100 + err;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/entities/entities_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ void init_EObjectType_ITEM_NAMES() {
EObjectType_name_by_value[EObjType::kBoat] = "kBoat";
EObjectType_name_by_value[EObjType::kFountain] = "kFounrain";
EObjectType_name_by_value[EObjType::kBook] = "kBook";
EObjectType_name_by_value[EObjType::kIngredient] = "kIngredient";
EObjectType_name_by_value[EObjType::kMagicIngredient] = "kMagicIngredient";
EObjectType_name_by_value[EObjType::kMagicComponent] = "kMagicComponent";
EObjectType_name_by_value[EObjType::kCraftMaterial] = "kCraftMaterial";
EObjectType_name_by_value[EObjType::kBandage] = "kBandage";
EObjectType_name_by_value[EObjType::kLightArmor] = "kLightArmor";
Expand Down
4 changes: 2 additions & 2 deletions src/engine/entities/entities_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ enum EObjType {
kBoat = 22, // Item is a boat //
kFountain = 23, // Item is a fountain //
kBook = 24, // Item is book //
kIngredient = 25, // Item is magical ingradient //
kMagicIngredient = 26, // Магический ингредиент //
kMagicIngredient = 25, // Item is magical ingradient //
kMagicComponent = 26, // Магический ингредиент //
kCraftMaterial = 27, // Материал для крафтовых умений //
kBandage = 28, // бинты для перевязки
kLightArmor = 29, // легкий тип брони
Expand Down
22 changes: 11 additions & 11 deletions src/engine/olc/oedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void olc_update_object(int robj_num, ObjData *obj, ObjData *olc_obj) {
obj->get_custom_label()->author_mail = str_dup(tmp.get_custom_label()->author_mail);
}
// восстановим силу ингров
if (tmp.get_type() == EObjType::kMagicIngredient) {
if (tmp.get_type() == EObjType::kMagicComponent) {
obj->set_val(0, tmp.get_val(0));
obj->set_val(1, tmp.get_val(1));
obj->set_val(2, tmp.get_val(2));
Expand Down Expand Up @@ -694,12 +694,12 @@ void oedit_disp_val1_menu(DescriptorData *d) {
SendMsgToChar(buf, d->character.get());
break;

case EObjType::kIngredient:
case EObjType::kMagicIngredient:
SendMsgToChar("Первый байт - лаг после применения в сек, 6 бит - уровень : ",
d->character.get());
break;

case EObjType::kMagicIngredient: oedit_disp_val4_menu(d);
case EObjType::kMagicComponent: oedit_disp_val4_menu(d);
break;

case EObjType::kCraftMaterial: SendMsgToChar("Уровень игрока для использования + морт * 2: ", d->character.get());
Expand Down Expand Up @@ -787,7 +787,7 @@ void oedit_disp_val2_menu(DescriptorData *d) {
}
break;

case EObjType::kIngredient: SendMsgToChar("Виртуальный номер прототипа : ", d->character.get());
case EObjType::kMagicIngredient: SendMsgToChar("Виртуальный номер прототипа : ", d->character.get());
break;

case EObjType::kCraftMaterial: SendMsgToChar("Введите VNUM прототипа: ", d->character.get());
Expand Down Expand Up @@ -843,7 +843,7 @@ void oedit_disp_val3_menu(DescriptorData *d) {
}
break;

case EObjType::kIngredient: SendMsgToChar("Сколько раз можно использовать : ", d->character.get());
case EObjType::kMagicIngredient: SendMsgToChar("Сколько раз можно использовать : ", d->character.get());
break;

case EObjType::kCraftMaterial: SendMsgToChar("Введите силу ингридиента: ", d->character.get());
Expand Down Expand Up @@ -891,7 +891,7 @@ void oedit_disp_val4_menu(DescriptorData *d) {
}
break;

case EObjType::kMagicIngredient: SendMsgToChar("Класс ингредиента (0-РОСЛЬ,1-ЖИВЬ,2-ТВЕРДЬ): ", d->character.get());
case EObjType::kMagicComponent: SendMsgToChar("Класс ингредиента (0-РОСЛЬ,1-ЖИВЬ,2-ТВЕРДЬ): ", d->character.get());
break;

case EObjType::kCraftMaterial: SendMsgToChar("Введите условный уровень: ", d->character.get());
Expand Down Expand Up @@ -1084,7 +1084,7 @@ std::array<const char *, 9> wskill_bits =
}};

void oedit_disp_skills_menu(DescriptorData *d) {
if (OLC_OBJ(d)->get_type() == EObjType::kIngredient) {
if (OLC_OBJ(d)->get_type() == EObjType::kMagicIngredient) {
oedit_disp_ingradient_menu(d);
return;
}
Expand Down Expand Up @@ -1489,7 +1489,7 @@ void oedit_parse(DescriptorData *d, char *arg) {
case 'n':
case 'N':
if (OLC_OBJ(d)->get_type() == EObjType::kWeapon
|| OLC_OBJ(d)->get_type() == EObjType::kIngredient) {
|| OLC_OBJ(d)->get_type() == EObjType::kMagicIngredient) {
oedit_disp_skills_menu(d);
OLC_MODE(d) = OEDIT_SKILL;
} else if (OLC_OBJ(d)->get_type() == EObjType::kLiquidContainer
Expand Down Expand Up @@ -1610,7 +1610,7 @@ void oedit_parse(DescriptorData *d, char *arg) {
OLC_OBJ(d)->set_type(static_cast<EObjType>(number));
snprintf(buf, sizeof(buf), "%s меняет тип предмета для %d!!!", GET_NAME(d->character), OLC_NUM(d));
mudlog(buf, BRF, kLvlGod, SYSLOG, true);
if (number != EObjType::kWeapon && number != EObjType::kIngredient) {
if (number != EObjType::kWeapon && number != EObjType::kMagicIngredient) {
OLC_OBJ(d)->set_spec_param(0);
}
}
Expand Down Expand Up @@ -1723,7 +1723,7 @@ void oedit_parse(DescriptorData *d, char *arg) {
if (number == 0) {
break;
}
if (OLC_OBJ(d)->get_type() == EObjType::kIngredient) {
if (OLC_OBJ(d)->get_type() == EObjType::kMagicIngredient) {
OLC_OBJ(d)->toggle_skill(1 << (number - 1));
oedit_disp_skills_menu(d);
return;
Expand Down Expand Up @@ -1936,7 +1936,7 @@ void oedit_parse(DescriptorData *d, char *arg) {
min_val = 0;
max_val = NUM_ATTACK_TYPES - 1;
break;
case EObjType::kMagicIngredient:
case EObjType::kMagicComponent:
min_val = 0;
max_val = 2;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/scripting/scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2153,8 +2153,8 @@ BOOST_PYTHON_MODULE (constants) {
DEFINE_ENUM_CONSTANT(EObjType::kBoat);
DEFINE_ENUM_CONSTANT(EObjType::kFounrain);
DEFINE_ENUM_CONSTANT(EObjType::kBook);
DEFINE_ENUM_CONSTANT(EObjType::kIngredient);
DEFINE_ENUM_CONSTANT(EObjType::kMagicIngredient);
DEFINE_ENUM_CONSTANT(EObjType::kMagicComponent);
DEFINE_ENUM_CONSTANT(EObjType::kCraftMaterial);
DEFINE_ENUM_CONSTANT(EObjType::kBandage);
DEFINE_ENUM_CONSTANT(EObjType::kLightArmor);
Expand Down
2 changes: 1 addition & 1 deletion src/engine/ui/cmd/do_drink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int CanDrink(CharData *ch, ObjData *jar) {
return 0;
}

if (jar->get_type() == EObjType::kMagicIngredient) {
if (jar->get_type() == EObjType::kMagicComponent) {
SendMsgToChar("Не можешь приготовить - покупай готовое!\r\n", ch);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/engine/ui/cmd/do_eat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void do_eat(CharData *ch, char *argument, int/* cmd*/, int subcmd) {
}

if (!ch->IsGod()) {
if (food->get_type() == EObjType::kMagicIngredient) //Сообщение на случай попытки проглотить ингры
if (food->get_type() == EObjType::kMagicComponent) //Сообщение на случай попытки проглотить ингры
{
SendMsgToChar("Не можешь приготовить - покупай готовое!\r\n", ch);
return;
Expand Down
4 changes: 2 additions & 2 deletions src/engine/ui/cmd/do_get.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ void get_from_container(CharData *ch, ObjData *cont, char *local_arg, int mode,
|| isname(local_arg, obj->get_aliases())
|| CHECK_CUSTOM_LABEL(local_arg, obj, ch))) {
if (autoloot
&& (obj->get_type() == EObjType::kIngredient
|| obj->get_type() == EObjType::kMagicIngredient)
&& (obj->get_type() == EObjType::kMagicIngredient
|| obj->get_type() == EObjType::kMagicComponent)
&& ch->IsFlagged(EPrf::kNoIngrLoot)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/engine/ui/cmd_god/do_stat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ void do_stat_object(CharData *ch, ObjData *j, const int virt = 0) {
);
break;

case EObjType::kIngredient:sprintbit(j->get_spec_param(), ingradient_bits, smallBuf, sizeof(smallBuf));
case EObjType::kMagicIngredient:sprintbit(j->get_spec_param(), ingradient_bits, smallBuf, sizeof(smallBuf));
snprintf(buf, sizeof(buf), "ingr bits %s", smallBuf);

if (IS_SET(j->get_spec_param(), kItemCheckUses)) {
Expand Down
6 changes: 3 additions & 3 deletions src/engine/ui/mapsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ void draw_objs(const CharData *ch, int room_rnum, int next_y, int next_x) {
continue;
}
if (!ch->map_check_option(MAP_MODE_INGREDIENTS)
&& (obj->get_type() == EObjType::kIngredient
|| obj->get_type() == EObjType::kMagicIngredient)) {
&& (obj->get_type() == EObjType::kMagicIngredient
|| obj->get_type() == EObjType::kMagicComponent)) {
continue;
}
if (!IS_CORPSE(obj)
&& obj->get_type() != EObjType::kIngredient
&& obj->get_type() != EObjType::kMagicIngredient
&& obj->get_type() != EObjType::kMagicComponent
&& !ch->map_check_option(MAP_MODE_OTHER_OBJECTS)) {
continue;
}
Expand Down
8 changes: 4 additions & 4 deletions src/engine/ui/objects_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ bool ParseFilter::init_type(const char *str) {
type = EObjType::kBook;
} else if (utils::IsAbbr(str, "руна")
|| utils::IsAbbr(str, "rune")) {
type = EObjType::kIngredient;
type = EObjType::kMagicIngredient;
} else if (utils::IsAbbr(str, "ингредиент")
|| utils::IsAbbr(str, "ingradient")) {
type = EObjType::kMagicIngredient;
type = EObjType::kMagicComponent;
} else if (utils::IsAbbr(str, "легкие")
|| utils::IsAbbr(str, "легкая")) {
type = EObjType::kLightArmor;
Expand Down Expand Up @@ -406,8 +406,8 @@ bool ParseFilter::check_name(ObjData *obj, CharData *ch) const {
if (name.empty()
|| isname(name, name_obj)) {
result = true;
} else if ((obj->get_type() == EObjType::kMagicIngredient
|| obj->get_type() == EObjType::kIngredient)
} else if ((obj->get_type() == EObjType::kMagicComponent
|| obj->get_type() == EObjType::kMagicIngredient)
&& obj->get_rnum() >= 0
&& isname(name, obj_proto[obj->get_rnum()]->get_aliases().c_str())) {
result = true;
Expand Down
4 changes: 2 additions & 2 deletions src/gameplay/ai/spec_procs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ bool item_nouse(ObjData *obj) {
case EObjType::kPen:
case EObjType::kBoat:
case EObjType::kFountain:
case EObjType::kMagicIngredient: return true;
case EObjType::kMagicComponent: return true;

default: break;
}
Expand Down Expand Up @@ -207,7 +207,7 @@ int npc_scavenge(CharData *ch) {
cont = nullptr;
best_cont = nullptr;
for (auto obj : world[ch->in_room]->contents) {
if (obj->get_type() == EObjType::kMagicIngredient
if (obj->get_type() == EObjType::kMagicComponent
|| Clan::is_clan_chest(obj)
|| ClanSystem::is_ingr_chest(obj)) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/gameplay/clans/house.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4369,7 +4369,7 @@ bool Clan::put_ingr_chest(CharData *ch, ObjData *obj, ObjData *chest) {
return false;
}

if (obj->get_type() != EObjType::kMagicIngredient
if (obj->get_type() != EObjType::kMagicComponent
&& obj->get_type() != EObjType::kCraftMaterial) {
SendMsgToChar(ch, "%s - Хранилище ингредиентов не предназначено для предметов данного типа.\r\n",
obj->get_PName(ECase::kNom).c_str());
Expand Down
4 changes: 2 additions & 2 deletions src/gameplay/crafting/craft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ bool CObject::save_to_node(pugi::xml_node *node) const {
// unpack item_parameters
std::list<std::string> item_parameters;
switch (get_type()) {
case EObjType::kIngredient: {
case EObjType::kMagicIngredient: {
int flag = 1;
while (flag <= get_spec_param()) {
if (IS_SET(get_spec_param(), flag)) {
Expand Down Expand Up @@ -723,7 +723,7 @@ ObjData *CObject::build_object() const {

bool CObject::load_item_parameters(const pugi::xml_node *node) {
switch (get_type()) {
case EObjType::kIngredient:
case EObjType::kMagicIngredient:
for (const auto flags : node->children("parameter")) {
const char *flag = flags.child_value();
try {
Expand Down
4 changes: 2 additions & 2 deletions src/gameplay/crafting/im.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ void im_reset_room(RoomData *room, int level, int type) {

for (auto it = room->contents.begin(); it != room->contents.end(); ) {
auto o = *it; ++it;
if (o->get_type() == EObjType::kMagicIngredient) {
if (o->get_type() == EObjType::kMagicComponent) {
ExtractObjFromWorld(o, false);
}
}
Expand Down Expand Up @@ -1208,7 +1208,7 @@ ObjData **im_obtain_ingredients(CharData *ch, char *argument, int *count) {
snprintf(buf, kMaxInputLength, "У вас нет %s.\r\n", name);
break;
}
if (o->get_type() != EObjType::kMagicIngredient) {
if (o->get_type() != EObjType::kMagicComponent) {
sprintf(buf, "Вы должны использовать только магические ингредиенты.\r\n");
break;
}
Expand Down
26 changes: 13 additions & 13 deletions src/gameplay/crafting/item_creation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void do_transform_weapon(CharData *ch, char *argument, int/* cmd*/, int subcmd)
act("В $o5 что-то лежит.", false, ch, obj, 0, kToChar);
return;
}
if (obj->get_type() == EObjType::kIngredient) {
if (obj->get_type() == EObjType::kMagicIngredient) {
for (i = 0, found = false; i < MAX_PROTO; i++) {
if (GET_OBJ_VAL(obj, 1) == created_item[obj_type].proto[i]) {
if (proto[i]) {
Expand Down Expand Up @@ -935,7 +935,7 @@ void do_transform_weapon(CharData *ch, char *argument, int/* cmd*/, int subcmd)
return;
}
for (coal = ch->carrying; coal; coal = coal->get_next_content()) {
if (coal->get_type() == EObjType::kIngredient) {
if (coal->get_type() == EObjType::kMagicIngredient) {
for (i = 0; i < MAX_PROTO; i++) {
if (proto[i] == coal) {
break;
Expand Down Expand Up @@ -974,7 +974,7 @@ void do_transform_weapon(CharData *ch, char *argument, int/* cmd*/, int subcmd)
break;
case ESkill::kCreateBow:
for (coal = ch->carrying; coal; coal = coal->get_next_content()) {
if (coal->get_type() == EObjType::kIngredient) {
if (coal->get_type() == EObjType::kMagicIngredient) {
for (i = 0; i < MAX_PROTO; i++) {
if (proto[i] == coal) {
break;
Expand Down Expand Up @@ -1185,8 +1185,8 @@ ObjData *get_obj_in_list_ingr(int num,
return i;
}
if ((GET_OBJ_VAL(i, 1) == num)
&& (i->get_type() == EObjType::kIngredient
|| i->get_type() == EObjType::kMagicIngredient
&& (i->get_type() == EObjType::kMagicIngredient
|| i->get_type() == EObjType::kMagicComponent
|| i->get_type() == EObjType::kCraftMaterial)) {
return i;
}
Expand Down Expand Up @@ -1244,10 +1244,10 @@ int MakeRecept::can_make(CharData *ch) {

int MakeRecept::get_ingr_lev(ObjData *ingrobj) {
// Получаем уровень ингредиента ...
if (ingrobj->get_type() == EObjType::kIngredient) {
if (ingrobj->get_type() == EObjType::kMagicIngredient) {
// Получаем уровень игредиента до 128
return (GET_OBJ_VAL(ingrobj, 0) >> 8);
} else if (ingrobj->get_type() == EObjType::kMagicIngredient) {
} else if (ingrobj->get_type() == EObjType::kMagicComponent) {
// У ингров типа 26 совпадает уровень и сила.
return GET_OBJ_VAL(ingrobj, IM_POWER_SLOT);
} else if (ingrobj->get_type() == EObjType::kCraftMaterial) {
Expand All @@ -1259,10 +1259,10 @@ int MakeRecept::get_ingr_lev(ObjData *ingrobj) {

int MakeRecept::get_ingr_pow(ObjData *ingrobj) {
// Получаем силу ингредиента ...
if (ingrobj->get_type() == EObjType::kIngredient
if (ingrobj->get_type() == EObjType::kMagicIngredient
|| ingrobj->get_type() == EObjType::kCraftMaterial) {
return GET_OBJ_VAL(ingrobj, 2);
} else if (ingrobj->get_type() == EObjType::kMagicIngredient) {
} else if (ingrobj->get_type() == EObjType::kMagicComponent) {
return GET_OBJ_VAL(ingrobj, IM_POWER_SLOT);
} else {
return -1;
Expand Down Expand Up @@ -1938,7 +1938,7 @@ int MakeRecept::make(CharData *ch) {
}
int sign = -1;
if (obj->get_type() == EObjType::kWeapon
|| obj->get_type() == EObjType::kIngredient) {
|| obj->get_type() == EObjType::kMagicIngredient) {
sign = 1;
}
obj->set_weight(stat_modify(ch, obj->get_weight(), 20 * sign));
Expand Down Expand Up @@ -1992,7 +1992,7 @@ int MakeRecept::make(CharData *ch) {
// Считаем объем контейнера.
obj->set_val(0, stat_modify(ch, GET_OBJ_VAL(obj, 0), 1));
break;
case EObjType::kIngredient:
case EObjType::kMagicIngredient:
// Для ингров ничего не трогаем ... ибо опасно. :)
break;
default: break;
Expand Down Expand Up @@ -2040,8 +2040,8 @@ int MakeRecept::make(CharData *ch) {
// число шмоток в мире то шмотки по хуже будут вытеснять
// шмотки по лучше (в целом это не так страшно).
// Ставим метку если все хорошо.
if ((obj->get_type() != EObjType::kIngredient
&& obj->get_type() != EObjType::kMagicIngredient)
if ((obj->get_type() != EObjType::kMagicIngredient
&& obj->get_type() != EObjType::kMagicComponent)
&& (number(1, 100) - CalcCurrentSkill(ch, skill, 0) < 0)) {
act(tagging.c_str(), false, ch, obj.get(), 0, kToChar);
// Прибавляем в экстра описание строчку.
Expand Down
Loading
Loading