mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-07-20 20:37:03 +00:00
rabbit stew fix
This commit is contained in:
parent
12b1ca2e37
commit
183d1e9c99
|
|
@ -469,6 +469,7 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM_AUX(Item::apple_gold_Id,1) // Enchanted
|
||||
ITEM(Item::melon_Id)
|
||||
ITEM(Item::mushroomStew_Id)
|
||||
ITEM(Item::rabbitStew_Id)
|
||||
ITEM(Item::bread_Id)
|
||||
ITEM(Item::cake_Id)
|
||||
ITEM(Item::cookie_Id)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p
|
|||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
for(unsigned int i = 0; i < 4; ++i) m_labelIngredientsDesc[i].init(L"");
|
||||
for(unsigned int i = 0; i < 9; ++i) m_labelIngredientsDesc[i].init(L"");
|
||||
m_labelDescription.init(L"");
|
||||
m_labelGroupName.init(L"");
|
||||
m_labelItemName.init(L"");
|
||||
|
|
@ -135,7 +135,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p
|
|||
XuiSetTimer(m_hObj,IGNORE_KEYPRESS_TIMERID,IGNORE_KEYPRESS_TIME);
|
||||
#endif
|
||||
|
||||
for(unsigned int i = 0; i < 4; ++i)
|
||||
for(unsigned int i = 0; i < 9; ++i)
|
||||
{
|
||||
m_slotListIngredients[i].addSlot(CRAFTING_INGREDIENTS_DESCRIPTION_START + i);
|
||||
}
|
||||
|
|
@ -477,7 +477,7 @@ void UIScene_CraftingMenu::handleReload()
|
|||
m_slotListInventory.addSlots(CRAFTING_INVENTORY_SLOT_START,CRAFTING_INVENTORY_SLOT_END - CRAFTING_INVENTORY_SLOT_START);
|
||||
m_slotListHotBar.addSlots(CRAFTING_HOTBAR_SLOT_START, CRAFTING_HOTBAR_SLOT_END - CRAFTING_HOTBAR_SLOT_START);
|
||||
|
||||
for(unsigned int i = 0; i < 4; ++i)
|
||||
for(unsigned int i = 0; i < 9; ++i)
|
||||
{
|
||||
m_slotListIngredients[i].addSlot(CRAFTING_INGREDIENTS_DESCRIPTION_START + i);
|
||||
}
|
||||
|
|
@ -608,7 +608,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
|
|||
alpha = static_cast<float>(m_ingredientsSlotsInfo[iIndex].alpha)/31.0f;
|
||||
}
|
||||
}
|
||||
else if(slotId >= CRAFTING_INGREDIENTS_DESCRIPTION_START && slotId < (CRAFTING_INGREDIENTS_DESCRIPTION_START + 4) )
|
||||
else if(slotId >= CRAFTING_INGREDIENTS_DESCRIPTION_START && slotId < (CRAFTING_INGREDIENTS_DESCRIPTION_START + 9) )
|
||||
{
|
||||
int iIndex = slotId - CRAFTING_INGREDIENTS_DESCRIPTION_START;
|
||||
if(m_ingredientsInfo[iIndex].show)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ private:
|
|||
SlotInfo m_vSlotsInfo[m_iMaxDisplayedVSlotC];
|
||||
SlotInfo m_ingredientsSlotsInfo[m_iIngredients3x3SlotC];
|
||||
SlotInfo m_craftingOutputSlotInfo;
|
||||
SlotInfo m_ingredientsInfo[4];
|
||||
SlotInfo m_ingredientsInfo[9];
|
||||
|
||||
AbstractContainerMenu *m_menu;
|
||||
|
||||
|
|
@ -86,9 +86,9 @@ protected:
|
|||
UIControl_SlotList m_slotListCraftingHSlots;
|
||||
UIControl_SlotList m_slotListCrafting1VSlots, m_slotListCrafting2VSlots[2], m_slotListCrafting3VSlots[3];
|
||||
UIControl_SlotList m_slotListIngredientsLayout, m_slotListCraftingOutput;
|
||||
UIControl_SlotList m_slotListIngredients[4];
|
||||
UIControl_SlotList m_slotListIngredients[9];
|
||||
UIControl_SlotList m_slotListInventory, m_slotListHotBar;
|
||||
UIControl_Label m_labelIngredientsDesc[4];
|
||||
UIControl_Label m_labelIngredientsDesc[9];
|
||||
UIControl_HTMLLabel m_labelDescription;
|
||||
UIControl_Label m_labelGroupName, m_labelItemName, m_labelInventory, m_labelIngredients;
|
||||
|
||||
|
|
@ -143,11 +143,21 @@ protected:
|
|||
UI_MAP_ELEMENT( m_slotListIngredients[1], "Ingredient2")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[2], "Ingredient3")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[3], "Ingredient4")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[4], "Ingredient5")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[5], "Ingredient6")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[6], "Ingredient7")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[7], "Ingredient8")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[8], "Ingredient9")
|
||||
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[0], "Ingredient1Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[1], "Ingredient2Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[2], "Ingredient3Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[3], "Ingredient4Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[4], "Ingredient5Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[5], "Ingredient6Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[6], "Ingredient7Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[7], "Ingredient8Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[8], "Ingredient9Desc")
|
||||
|
||||
UI_MAP_ELEMENT( m_labelIngredients, "IngredientsLabel")
|
||||
|
||||
|
|
|
|||
|
|
@ -99,10 +99,12 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
|
|||
m_iCraftablesMaxHSlotC=m_iMaxHSlot3x3C;
|
||||
|
||||
// set up the ingredients descriptions
|
||||
for(int i=0;i<4;i++)
|
||||
for(int i=0;i<9;i++)
|
||||
{
|
||||
pObj = nullptr;
|
||||
m_pCraftIngredientDescA[i] = nullptr;
|
||||
XuiObjectFromHandle( m_hCraftIngredientDescA[i], &pObj );
|
||||
m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
if(pObj) m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -124,10 +126,12 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
|
|||
m_iCraftablesMaxHSlotC=m_iMaxHSlot2x2C;
|
||||
|
||||
// set up the ingredients descriptions
|
||||
for(int i=0;i<4;i++)
|
||||
for(int i=0;i<9;i++)
|
||||
{
|
||||
pObj = nullptr;
|
||||
m_pCraftIngredientDescA[i] = nullptr;
|
||||
XuiObjectFromHandle( m_hCraftIngredientDescA[i], &pObj );
|
||||
m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
if(pObj) m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -413,7 +417,7 @@ void CXuiSceneCraftingPanel::hideAllIngredientsSlots()
|
|||
{
|
||||
for(int i=0;i<m_iIngredientsC;i++)
|
||||
{
|
||||
m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
if(m_pCraftIngredientDescA[i]) m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -467,17 +471,17 @@ void CXuiSceneCraftingPanel::setIngredientSlotRedBox(int index, bool show)
|
|||
|
||||
void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item)
|
||||
{
|
||||
m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE);
|
||||
if(m_pCraftIngredientDescA[index]) m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE);
|
||||
}
|
||||
|
||||
void CXuiSceneCraftingPanel::setIngredientDescriptionRedBox(int index, bool show)
|
||||
{
|
||||
m_pCraftIngredientDescA[index]->SetRedBox(show?TRUE:FALSE);
|
||||
if(m_pCraftIngredientDescA[index]) m_pCraftIngredientDescA[index]->SetRedBox(show?TRUE:FALSE);
|
||||
}
|
||||
|
||||
void CXuiSceneCraftingPanel::setIngredientDescriptionText(int index, LPCWSTR text)
|
||||
{
|
||||
m_pCraftIngredientDescA[index]->SetDescription(text);
|
||||
if(m_pCraftIngredientDescA[index]) m_pCraftIngredientDescA[index]->SetDescription(text);
|
||||
}
|
||||
|
||||
void CXuiSceneCraftingPanel::setShowCraftHSlot(int iIndex, bool show)
|
||||
|
|
@ -511,9 +515,9 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel()
|
|||
{
|
||||
case DISPLAY_INVENTORY:
|
||||
// turn off all the ingredients display
|
||||
for(int i=0;i<4;i++)
|
||||
for(int i=0;i<9;i++)
|
||||
{
|
||||
m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
if(m_pCraftIngredientDescA[i]) m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
}
|
||||
|
||||
XuiElementSetShow(m_hGridInventory,TRUE);
|
||||
|
|
@ -533,7 +537,7 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel()
|
|||
// display the ingredients
|
||||
for(int i=0;i<m_iIngredientsC;i++)
|
||||
{
|
||||
m_pCraftIngredientDescA[i]->SetShow(TRUE);
|
||||
if(m_pCraftIngredientDescA[i]) m_pCraftIngredientDescA[i]->SetShow(TRUE);
|
||||
}
|
||||
|
||||
if(m_iIngredientsC==0)
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ public:
|
|||
MAP_CONTROL(IDC_Ingredient2,m_hCraftIngredientDescA[1])
|
||||
MAP_CONTROL(IDC_Ingredient3,m_hCraftIngredientDescA[2])
|
||||
MAP_CONTROL(IDC_Ingredient4,m_hCraftIngredientDescA[3])
|
||||
MAP_CONTROL(L"Ingredient5",m_hCraftIngredientDescA[4])
|
||||
MAP_CONTROL(L"Ingredient6",m_hCraftIngredientDescA[5])
|
||||
MAP_CONTROL(L"Ingredient7",m_hCraftIngredientDescA[6])
|
||||
MAP_CONTROL(L"Ingredient8",m_hCraftIngredientDescA[7])
|
||||
MAP_CONTROL(L"Ingredient9",m_hCraftIngredientDescA[8])
|
||||
|
||||
MAP_CONTROL(IDC_CraftingOutputRed,m_hCraftOutput)
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
|
|
|
|||
|
|
@ -557,6 +557,7 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(13, 2, L"doorDark")
|
||||
ADD_ICON(13, 3, L"doorJungle")
|
||||
ADD_ICON(13, 4, L"doorSpruce")
|
||||
ADD_ICON(13, 5, L"rabbitStew")
|
||||
ADD_ICON(13, 6, L"salmonCooked")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
BowlFoodItem::BowlFoodItem(int id, int nutrition) : FoodItem( id, nutrition, false )
|
||||
{
|
||||
setMaxStackSize(1);
|
||||
setBaseItemTypeAndMaterial(Item::eBaseItemType_bowl,Item::eMaterial_wood);
|
||||
}
|
||||
|
||||
shared_ptr<ItemInstance> BowlFoodItem::useTimeDepleted(shared_ptr<ItemInstance> instance, Level *level, shared_ptr<Player> player)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,20 @@ void FoodRecipies::addRecipes(Recipes *r)
|
|||
L"ttig",
|
||||
Tile::mushroom_brown, Tile::mushroom_red, Item::bowl,
|
||||
L'F');
|
||||
|
||||
r->addShapedRecipy(new ItemInstance(Item::rabbitStew),
|
||||
L"ssscicictcicig",
|
||||
L" 1 ",//s
|
||||
L"2X3",//s
|
||||
L" 4 ",//s
|
||||
L'1', Item::rabbit_cooked, // ci
|
||||
L'2', Item::carrots, // ci
|
||||
L'3', Tile::mushroom_brown, // ct
|
||||
L'X', Item::potato, // ci
|
||||
L'4', Item::bowl, // ci
|
||||
L'F');
|
||||
|
||||
|
||||
|
||||
r->addShapedRecipy(new ItemInstance(Item::cookie, 8), //
|
||||
L"sczcig",
|
||||
|
|
|
|||
|
|
@ -265,10 +265,11 @@ Item* Item::rabbit_cooked = nullptr;
|
|||
Item* Item::rabbits_foot = nullptr;
|
||||
Item* Item::rabbit_hide = nullptr;
|
||||
Item* Item::armor_stand = nullptr;
|
||||
|
||||
Item* Item::rabbitStew = nullptr;
|
||||
Item* Item::prismarine_crystal = nullptr;
|
||||
Item* Item::prismarine_shard = nullptr;
|
||||
|
||||
|
||||
void Item::staticCtor()
|
||||
{
|
||||
Item::sword_wood = ( new WeaponItem(12, _Tier::WOOD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_wood) ->setIconName(L"swordWood")->setDescriptionId(IDS_ITEM_SWORD_WOOD)->setUseDescriptionId(IDS_DESC_SWORD);
|
||||
|
|
@ -354,6 +355,7 @@ void Item::staticCtor()
|
|||
Item::diamond = ( new Item(8) ) ->setBaseItemTypeAndMaterial(eBaseItemType_treasure, eMaterial_diamond)->setIconName(L"diamond")->setDescriptionId(IDS_ITEM_DIAMOND)->setUseDescriptionId(IDS_DESC_DIAMONDS);
|
||||
Item::stick = ( new Item(24) ) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_stick, Item::eMaterial_wood)->setIconName(L"stick")->handEquipped()->setDescriptionId(IDS_ITEM_STICK)->setUseDescriptionId(IDS_DESC_STICK);
|
||||
Item::mushroomStew = ( new BowlFoodItem(26, 6) ) ->setIconName(L"mushroomStew")->setDescriptionId(IDS_ITEM_MUSHROOM_STEW)->setUseDescriptionId(IDS_DESC_MUSHROOMSTEW);
|
||||
Item::rabbitStew = ( new BowlFoodItem(157, 10) ) ->setIconName(L"rabbitStew")->setDescriptionId(IDS_ITEM_MUSHROOM_STEW)->setUseDescriptionId(IDS_DESC_MUSHROOMSTEW);
|
||||
|
||||
Item::string = ( new TilePlanterItem(31, Tile::tripWire) ) ->setIconName(L"string")->setDescriptionId(IDS_ITEM_STRING)->setUseDescriptionId(IDS_DESC_STRING);
|
||||
Item::feather = ( new Item(32) ) ->setIconName(L"feather")->setDescriptionId(IDS_ITEM_FEATHER)->setUseDescriptionId(IDS_DESC_FEATHER);
|
||||
|
|
@ -1052,6 +1054,7 @@ const int Item::hatchet_diamond_Id ;
|
|||
const int Item::stick_Id ;
|
||||
const int Item::bowl_Id ;
|
||||
const int Item::mushroomStew_Id ;
|
||||
const int Item::rabbitStew_Id ;
|
||||
const int Item::sword_gold_Id ;
|
||||
const int Item::shovel_gold_Id ;
|
||||
const int Item::pickAxe_gold_Id ;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@ public:
|
|||
eBaseItemType_MAXTYPES,
|
||||
eBaseItemType_stick,
|
||||
eBaseItemType_fenceGate,
|
||||
eBaseItemType_decoration
|
||||
eBaseItemType_decoration,
|
||||
eBaseItemType_bowl
|
||||
}
|
||||
eBaseItemType;
|
||||
|
||||
|
|
@ -225,6 +226,7 @@ public:
|
|||
static Item *stick;
|
||||
static Item *bowl;
|
||||
static Item *mushroomStew;
|
||||
static Item *rabbitStew;
|
||||
|
||||
static Item *sword_gold;
|
||||
static Item *shovel_gold;
|
||||
|
|
@ -658,10 +660,12 @@ public:
|
|||
static const int rabbits_foot_Id = 414;
|
||||
static const int rabbit_hide_Id = 415;
|
||||
static const int armor_stand_Id = 416;
|
||||
static const int rabbitStew_Id = 413;
|
||||
|
||||
static const int prismarine_cystal_Id = 432;
|
||||
static const int prismarine_shard_Id = 433;
|
||||
|
||||
|
||||
public:
|
||||
const int id;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue