bool IsCanUpgradeCorporateCulture()
 {
     return
         (MyCompany.isWantsToExpand &&
          Companies.IsHasReleasedProducts(Q, MyCompany) &&
          !Cooldowns.HasCorporateCultureUpgradeCooldown(Q, MyCompany));
 }
    public override bool IsInteractable()
    {
        bool hasCooldown = Cooldowns.HasCorporateCultureUpgradeCooldown(Q, MyCompany);

        var culture = Companies.GetOwnCorporateCulture(MyCompany);

        var  value            = Companies.GetPolicyValue(MyCompany, CorporatePolicy);
        bool willExceedLimits = (Increment && value == Balance.CORPORATE_CULTURE_LEVEL_MAX) || (!Increment && value == Balance.CORPORATE_CULTURE_LEVEL_MIN);

        return(!hasCooldown && !willExceedLimits);
    }
    public override void ViewRender()
    {
        base.ViewRender();

        MainCompanyName.text = $"Hierarchy of {MyCompany.company.Name}";

        bool hasCultureUpgrade = Cooldowns.HasCorporateCultureUpgradeCooldown(Q, MyCompany);

        RenderGroups(hasCultureUpgrade);

        Draw(ProductProgessbars, hasCultureUpgrade);
        Draw(TeamProgessbars, hasCultureUpgrade);
        Draw(GroupProgessbars, hasCultureUpgrade);
    }
Example #4
0
    public override void SetItem <T>(Transform t, T entity)
    {
        var bar = t.GetComponent <ProgressBar>();

        if (Cooldowns.HasCorporateCultureUpgradeCooldown(Q, MyCompany))
        {
            var culture = Cooldowns.GetCorporateCultureCooldown(MyCompany, Q);

            var date = CurrentIntDate;

            bar.SetValue(date - culture.StartTime, culture.EndTime - culture.StartTime);
            bar.SetCustomText("Upgrading Culture".ToUpper());
        }
    }
Example #5
0
    public override void ViewRender()
    {
        base.ViewRender();

        bool hasCooldown = Cooldowns.HasCorporateCultureUpgradeCooldown(Q, MyCompany);

        var value = Companies.GetPolicyValue(MyCompany, CorporatePolicy);

        TweakLeft.GetComponent <TweakCorporatePolicy>().SetSettings(CorporatePolicy, -1);
        TweakRight.GetComponent <TweakCorporatePolicy>().SetSettings(CorporatePolicy, 1);
        TweakCenter.GetComponent <TweakCorporatePolicy>().SetSettings(CorporatePolicy, 0);

        PolicyValue.text = value.ToString();

        RenderTweak(TweakLeft, hasCooldown, value, false);
        RenderTweak(TweakRight, hasCooldown, value, true);
    }
Example #6
0
    public override void ViewRender()
    {
        base.ViewRender();

        bool hasProduct = Companies.IsHasDaughters(MyCompany);

        bool isFirstYear = CurrentIntDate < 360;

        bool showStats    = !isFirstYear;
        bool showMessages = hasProduct;


        var hasCultureCooldown = Cooldowns.HasCorporateCultureUpgradeCooldown(Q, MyCompany);

        bool hasReleasedProducts          = Companies.IsHasReleasedProducts(Q, MyCompany);
        var  playerCanExploreAdvancedTabs = hasReleasedProducts;
        bool bankruptcyLooming            = TutorialUtils.IsOpenedFunctionality(Q, TutorialFunctionality.BankruptcyWarning);

        //var canRaiseInvestments = !isRoundActive ;
        var canRaiseInvestments = playerCanExploreAdvancedTabs || bankruptcyLooming;
        var isOnMainScreen      = CurrentScreen == ScreenMode.HoldingScreen;

        bool showAdditionalIcons = false;

        //
        Draw(Main, true);
        Draw(Stats, showStats && isOnMainScreen);

        // messages
        Draw(Messages, false && showMessages);

        // culture
        CultureIcon.color = Visuals.GetColorFromString(hasCultureCooldown ? Colors.COLOR_NEUTRAL : Colors.COLOR_POSITIVE);
        Draw(Culture, false && hasProduct && hasReleasedProducts && !hasCultureCooldown);


        // investments
        //InvestmentsIcon.color = Visuals.GetColorFromString(canRaiseInvestments ? Colors.COLOR_NEUTRAL : Colors.COLOR_POSITIVE);
        Draw(Investments, showAdditionalIcons && hasProduct && canRaiseInvestments && isOnMainScreen);
        Draw(ExploreMarkets, showAdditionalIcons && playerCanExploreAdvancedTabs && isOnMainScreen);
        Draw(Partnerships, showAdditionalIcons && playerCanExploreAdvancedTabs && isOnMainScreen);
    }