Wolves changed to Windhounds.
This commit is contained in:
@@ -52,6 +52,7 @@ INCLUDE_GFX
|
||||
|
||||
const std::string Item::BLANK_ITEM_NAME="";
|
||||
safemap<std::string,ItemInfo>ITEM_DATA;
|
||||
safemap<std::string,IT>ITEM_CONVERSIONS;
|
||||
safemap<std::string,ItemScript>ITEM_SCRIPTS;
|
||||
safemap<std::string,std::set<std::string>>ITEM_CATEGORIES;
|
||||
std::shared_ptr<Item>Item::BLANK=std::make_shared<Item>();
|
||||
@@ -150,6 +151,10 @@ void ItemInfo::InitializeItems(){
|
||||
}else
|
||||
if(keyName=="UseSound"||keyName=="Equip Sound"){
|
||||
useSound=data[key][keyName].GetString();
|
||||
}else
|
||||
if(keyName.starts_with("Alternative Name")){
|
||||
if(ITEM_CONVERSIONS.count(data[key][keyName].GetString()))ERR(std::format("Item {} already exists in Item Conversion database! Cannot add a duplicate entry!",data[key][keyName].GetString()));
|
||||
ITEM_CONVERSIONS[data[key][keyName].GetString()]=key;
|
||||
}else{ //THis is a custom override modifier for a script. NO-OP
|
||||
}
|
||||
}
|
||||
@@ -280,6 +285,7 @@ void ItemInfo::InitializeItems(){
|
||||
|
||||
ITEM_DATA.SetInitialized();
|
||||
ITEM_CATEGORIES.SetInitialized();
|
||||
ITEM_CONVERSIONS.SetInitialized();
|
||||
Menu::LockInListeners();
|
||||
|
||||
for(auto&[name,info]:ITEM_DATA){
|
||||
@@ -382,9 +388,18 @@ Item::Item()
|
||||
:amt(0),it(nullptr),enhancementLevel(0){}
|
||||
|
||||
Item::Item(uint32_t amt,IT item,uint8_t enhancementLevel)
|
||||
:amt(amt),it(&ITEM_DATA.at(item)),enhancementLevel(enhancementLevel){}
|
||||
:amt(amt),enhancementLevel(enhancementLevel){
|
||||
if(ITEM_CONVERSIONS.count(item)){
|
||||
it=&ITEM_DATA.at(ITEM_CONVERSIONS[item]); //Convert the item if it's using an old name.
|
||||
}else{
|
||||
it=&ITEM_DATA.at(item);
|
||||
}
|
||||
}
|
||||
|
||||
std::weak_ptr<Item>Inventory::AddItem(IT it,uint32_t amt,bool monsterDrop){
|
||||
if(ITEM_CONVERSIONS.count(it)){
|
||||
it=ITEM_CONVERSIONS[it]; //Convert the item if it's using an old name.
|
||||
}
|
||||
if(!ITEM_DATA.count(it))ERR("Item "<<std::quoted(it)<<" does not exist in Item Database!");
|
||||
|
||||
std::weak_ptr<Item>itemPtr;
|
||||
|
||||
Reference in New Issue
Block a user