コード例 #1
0
 private ItemID GetResultItemID(FoodInfo info)
 {
     FoodProcessor.Type type = this.m_Type;
     if (type == FoodProcessor.Type.Dryer)
     {
         return(info.m_DryingItemID);
     }
     if (type == FoodProcessor.Type.Smoker)
     {
         return(info.m_SmokingItemID);
     }
     if (type != FoodProcessor.Type.Fire)
     {
         return(ItemID.None);
     }
     return((!info.m_CanCook) ? ((!GreenHellGame.ROADSHOW_DEMO) ? info.m_BurningItemID : ItemID.None) : info.m_CookingItemID);
 }
コード例 #2
0
    public virtual bool CanInsertItem(Item item)
    {
        if (!item.m_Info.IsFood())
        {
            return(false);
        }
        FoodInfo foodInfo = (FoodInfo)item.m_Info;

        FoodProcessor.Type type = this.m_Type;
        if (type == FoodProcessor.Type.Dryer)
        {
            return(foodInfo.m_CanDry);
        }
        if (type != FoodProcessor.Type.Smoker)
        {
            return(type == FoodProcessor.Type.Fire && foodInfo.m_CanCook);
        }
        return(foodInfo.m_CanSmoke);
    }
コード例 #3
0
 private float GetProcessingTime(FoodInfo info)
 {
     FoodProcessor.Type type = this.m_Type;
     if (type == FoodProcessor.Type.Dryer)
     {
         return(info.m_DryingLength);
     }
     if (type == FoodProcessor.Type.Smoker)
     {
         return(info.m_SmokingLength);
     }
     if (type != FoodProcessor.Type.Fire)
     {
         return(0f);
     }
     if (info.m_CanCook)
     {
         return(info.m_CookingLength * Skill.Get <CookingSkill>().GetCookingDurationMul());
     }
     return(info.m_BurningLength * Skill.Get <CookingSkill>().GetBurningDurationMul());
 }