예제 #1
0
        public static void UIGeneralTips__OnUpdate_Postfix(ref Text ___modeText)
        {
            if (BuildLogic.IsMultiBuildAvailable() && BuildLogic.multiBuildEnabled)
            {
                ___modeText.text += $"\nMultiBuild [{(BuildLogic.startPos == Vector3.zero ? "START" : "END")}]";

                if (BuildLogic.spacingStore[BuildLogic.spacingIndex] > 0)
                {
                    ___modeText.text += $" - Spacing {BuildLogic.spacingStore[BuildLogic.spacingIndex]}";
                    if (BuildLogic.spacingPeriod > 1)
                    {
                        ___modeText.text += $" every {BuildLogic.spacingPeriod} copies";
                    }
                }
            }

            if (BlueprintCreator.bpMode)
            {
                ___modeText.text = "Blueprint Mode";
            }
        }
예제 #2
0
        public static void UIKeyTips_UpdateTipDesiredState_Prefix(ref UIKeyTips __instance, ref List <UIKeyTipNode> ___allTips)
        {
            if (tooltips.Count == 0)
            {
                allTips = ___allTips;
                tooltips.Add("toggle-build", __instance.RegisterTip("L-ALT", "Toggle multiBuild mode"));
                tooltips.Add("toggle-inserters", __instance.RegisterTip("TAB", "Toggle inserters copy"));
                tooltips.Add("increase-spacing", __instance.RegisterTip("+", "Increase space between copies"));
                tooltips.Add("decrease-spacing", __instance.RegisterTip("-", "Decrease space between copies"));
                tooltips.Add("increase-period", __instance.RegisterTip("CTRL", "+", "Increase spacing period"));
                tooltips.Add("decrease-period", __instance.RegisterTip("CTRL", "-", "Decrease spacing period"));
                tooltips.Add("zero-spacing", __instance.RegisterTip("0", "Reset space between copies"));
                tooltips.Add("rotate-path", __instance.RegisterTip("Z", "Rotate build path"));

                tooltips.Add("increase-radius", __instance.RegisterTip("+", "Increase selection area"));
                tooltips.Add("decrease-radius", __instance.RegisterTip("-", "Decrease selection area"));
                tooltips.Add("bp-select", __instance.RegisterTip(0, "Add building to blueprint"));
                tooltips.Add("bp-deselect", __instance.RegisterTip("CTRL", 0, "Remove building from blueprint"));
                tooltips.Add("bp-reference", __instance.RegisterTip("ALT", 0, "Select reference building"));
            }
            tooltips["toggle-build"].desired = tooltips["toggle-inserters"].desired = BuildLogic.IsMultiBuildAvailable();

            tooltips["rotate-path"].desired                         =
                tooltips["zero-spacing"].desired                    =
                    tooltips["decrease-spacing"].desired            =
                        tooltips["increase-spacing"].desired        =
                            tooltips["decrease-period"].desired     =
                                tooltips["increase-period"].desired =
                                    BuildLogic.IsMultiBuildRunning();

            tooltips["increase-radius"].desired              =
                tooltips["decrease-radius"].desired          =
                    tooltips["bp-select"].desired            =
                        tooltips["bp-deselect"].desired      =
                            tooltips["bp-reference"].desired =
                                BlueprintCreator.bpMode;
        }