Example #1
0
    void GradeSplitFirewoodBeforeUnsnap()
    {
        SetCanPerformAction(false);

        PlayerHud.ToggleQualityGame(true);
        QualityMinigame.StartGame();

        StartCoroutine(WaitForFirewoodGrade());
    }
Example #2
0
    public static void UnsnapPlayer()
    {
        PlayerHud.ToggleQualityGame(false);

        CharacterMotor.SetCanMove(true);
        CharacterInputController.SetCanTurn(true);
        CharacterInputController.InitiateLoggingState(AnimState.NONE);
        CharacterInputController.ToggleToolsInput(true);
        CharacterAnimator.ResetLoggingTriggers();

        Instance.GetComponent <Rigidbody>().constraints = startingConstraints;

        playerIsLocked = false;
    }
        public void CutSide(int side)
        {
            int oppositeSide = side % 2 == 0 ? (side + 1) : (side - 1);
            int axisCount    = sideCutsCount[side] + sideCutsCount[oppositeSide];

            if (axisCount < 9)
            {
                upperCutBlock.CutFace(side);
                lowerCutBlock.CutFace(side);
                sideCutsCount[side]++;
            }
            else
            {
                LoggingActivityPlayerBehavior.SetCanPerformAction(false);
                PlayerHud.ToggleQualityGame(true);
                QualityMinigame.StartGame();

                StartCoroutine(FallAfterGrade(side));
            }
        }
        public void SawLocation(int loc)
        {
            if (locationStrokeCounts[loc] == 0)
            {
                logMarks[loc].SetActive(false);
            }


            if (locationStrokeCounts[loc] < 5)
            {
                int cut01 = loc == 0 ? 0 : 2;
                int cut02 = loc == 0 ? 1 : 3;

                locationStrokeCounts[loc]++;
                sawProgressCuts[cut01].CutFace(3);
                sawProgressCuts[cut02].CutFace(3);
            }

            if (locationStrokeCounts[loc] == 5)
            {
                snapSpots[loc].enabled  = false;
                locationFullySawed[loc] = true;

                LoggingActivityPlayerBehavior.SetCanPerformAction(false);

                if (locationFullySawed[0] && locationFullySawed[1])
                {
                    PlayerHud.ToggleQualityGame(true);
                    QualityMinigame.StartGame();

                    StartCoroutine(SawThroughAfterGrade(loc));
                }
                else
                {
                    LoggingActivityPlayerBehavior.UnsnapPlayer();
                }
            }
        }
Example #5
0
        // public bool PlayerCanStore()
        // {
        //  return HomesteadStockpile.GetFirewoodCountAtGrade(qualityGrade) < PlayerSkills.GetMaxLumberFirewoodValue();
        // }

        // public QualityGrade GetQualityGrade() { return qualityGrade; }

        // public bool HasBeenSplit() { return hasBeenSplit; }

        public void ChopLog()
        {
            HomesteadStockpile.UpdateLogsCountAtGrade(maxQualityGrade, -1);
            if (HomesteadStockpile.GetLogsCountAtGrade(maxQualityGrade) > 0)
            {
                associatedLogPile.UpdateLogPile();
            }

            QualityMinigame.IncrementUngradedFirewood();
            QualityMinigame.SetLastMaxFirewoodGrade(maxQualityGrade);

            // hasBeenSplit = true;

            if (HomesteadStockpile.GetLogsCountAtGrade(maxQualityGrade) <= 0)
            {
                LoggingActivityPlayerBehavior.SetLogsRemaining(HomesteadStockpile.GetLogsCountAtGrade(maxQualityGrade));
                LoggingActivityPlayerBehavior.SetCanPerformAction(false);

                PlayerHud.ToggleQualityGame(true);
                QualityMinigame.StartGame();

                StartCoroutine(SplitAfterGrade());
            }
        }