Ejemplo n.º 1
0
    /* xSetItem
     * called by cropbehavior when slotting a new item,
     * code varies by type of station and type of crop
     * also sets buff values*/
    public override void SetItem(Utilities.CropTypes crop_in, Utilities.ItemTypes itemType_in, float restQuality_in, CropsAndBuffs.Buff buff_in)
    {
        itemType       = itemType_in;
        cropType       = crop_in;
        restoreQuality = restQuality_in;
        CropsAndBuffs.Crop newCrop = CropsAndBuffs.cropList[cropType];
        maxProductionTime = newCrop.timeToProduce * Utilities.TRADETIMERATIO / (Utilities.TIMESCALE);

        base.SetItem(crop_in, itemType_in, restQuality_in, buff_in);
    }
Ejemplo n.º 2
0
    /* xSetItem
     * called by cropbehavior when slotting a new item,
     * code varies by type of station and type of crop
     * also sets buff values*/
    public override void SetItem(Utilities.CropTypes crop_in, Utilities.ItemTypes itemType_in, float restQuality_in, CropsAndBuffs.Buff buff_in)
    {
        pestScript.RotateCrop();
        itemType       = itemType_in;
        cropType       = crop_in;
        restoreQuality = restQuality_in;

        CropsAndBuffs.Crop newCrop = CropsAndBuffs.cropList[cropType];

        primaryEff        = newCrop.primaryEff;
        secondaryEff      = newCrop.secondaryEff;
        primaryQual       = newCrop.primaryQual;
        secondaryQual     = newCrop.secondaryQual;
        fatigueRate       = newCrop.fatigueRate;
        maxProductionTime = newCrop.timeToProduce / Utilities.TIMESCALE;

        base.SetItem(crop_in, itemType_in, restQuality_in, buff_in);
    }
Ejemplo n.º 3
0
    /* xSetItem
     * called by cropbehavior when slotting a new item,
     * code varies by type of station and type of crop
     * also sets buff values*/
    public override void SetItem(Utilities.CropTypes crop_in, Utilities.ItemTypes itemType_in, float restQuality_in, CropsAndBuffs.Buff buff_in)
    {
        itemType       = itemType_in;
        cropType       = crop_in;
        restoreQuality = restQuality_in;
        CropsAndBuffs.Crop newCrop = CropsAndBuffs.cropList[cropType];

        if (itemType == Utilities.ItemTypes.Meal)
        {
            currentBuff = buff_in;
        }
        else
        {
            currentBuff.buffType = Utilities.BuffTypes.None;
        }

        recoveryRestore   = newCrop.baseRecovery + newCrop.baseRecovery * restoreQuality;
        maxProductionTime = Utilities.EATTIME / Utilities.TIMESCALE;

        base.SetItem(crop_in, itemType_in, restQuality_in, buff_in);
    }