Ejemplo n.º 1
0
        public static void KillFunctions()
        {
            switch (Main.settings.actionKeyKillIndex)
            {
            case 0:
                UnitEntityDataUtils.Kill(Common.GetUnitUnderMouse());
                break;

            case 1:
                UnitEntityDataUtils.ForceKill(Common.GetUnitUnderMouse());
                break;
            }
        }
Ejemplo n.º 2
0
        public static void ActionKeyEditStatsGui(UnitEntityData unit)
        {
            GL.Space(10);
            GL.BeginHorizontal();
            ActionKey.editUnitSelectedSizeIndex = GL.SelectionGrid(ActionKey.editUnitSelectedSizeIndex, Storage.charSizeArray, 4);
            GL.EndHorizontal();

            GL.Space(10);
            GL.BeginHorizontal();
            if (GL.Button(Strings.GetText("button_SetSizeTo") + $" {Storage.charSizeArray[ActionKey.editUnitSelectedSizeIndex]}", GL.ExpandWidth(false)))
            {
                unit.Descriptor.State.Size = (Size)ActionKey.editUnitSelectedSizeIndex;
            }
            GL.EndHorizontal();
            GL.BeginHorizontal();
            if (GL.Button(Strings.GetText("button_SetToOriginalSize") + $" ({unit.Descriptor.OriginalSize})", GL.ExpandWidth(false)))
            {
                unit.Descriptor.State.Size = unit.Descriptor.OriginalSize;
            }
            GL.EndHorizontal();
            MenuTools.SingleLineLabel(Strings.GetText("label_CurrentSize") + ": " + unit.Descriptor.State.Size);
            GL.Space(10);

            GL.BeginHorizontal();
            if (unit.Descriptor.HPLeft > 0)
            {
                if (GL.Button(Strings.GetText("button_Kill"), GL.ExpandWidth(false)))
                {
                    UnitEntityDataUtils.Kill(unit);
                }
                if (GL.Button(Strings.GetText("button_Panic"), GL.ExpandWidth(false)))
                {
                    unit.Descriptor.AddFact((BlueprintUnitFact)Utilities.GetBlueprintByGuid <BlueprintBuff>("cf0e277e6b785f449bbaf4e993b556e0"), (MechanicsContext)null, new FeatureParam());
                }
                if (GL.Button(Strings.GetText("button_Freeze"), GL.ExpandWidth(false)))
                {
                    unit.Descriptor.AddFact((BlueprintUnitFact)Utilities.GetBlueprintByGuid <BlueprintBuff>("af1e2d232ebbb334aaf25e2a46a92591"), (MechanicsContext)null, new FeatureParam());
                }
                if (GL.Button(Strings.GetText("button_MakeCower"), GL.ExpandWidth(false)))
                {
                    unit.Descriptor.AddFact((BlueprintUnitFact)Utilities.GetBlueprintByGuid <BlueprintBuff>("6062e3a8206a4284d867cbb7120dc091"), (MechanicsContext)null, new FeatureParam());
                }
                if (GL.Button(Strings.GetText("button_SetOnFire"), GL.ExpandWidth(false)))
                {
                    unit.Descriptor.AddFact((BlueprintUnitFact)Utilities.GetBlueprintByGuid <BlueprintBuff>("315acb0b29671f74c8c7cc062b23b9d6"), (MechanicsContext)null, new FeatureParam());
                }
            }
            GL.EndHorizontal();

            GL.BeginHorizontal();
            editUnitStatsAmount = GL.TextField(editUnitStatsAmount, 10, GL.Width(85f));
            MenuTools.SettingParse(ref editUnitStatsAmount, ref editUnitFinalStatsAmount);
            GL.EndHorizontal();

            CharacterStats charStats = unit.Descriptor.Stats;

            MenuTools.SingleLineLabel(RichTextUtils.Bold(Strings.GetText("header_AttributesBaseValues")));
            foreach (KeyValuePair <string, StatType> entry in Storage.statsAttributesDict)
            {
                MenuTools.CreateStatInterface(entry.Key, charStats, entry.Value, ActionKey.editUnitFinalStatsAmount);
            }
            MenuTools.SingleLineLabel(RichTextUtils.Bold(Strings.GetText("header_SkillsRanks")));
            foreach (KeyValuePair <string, StatType> entry in Storage.statsSkillsDict)
            {
                MenuTools.CreateStatInterface(entry.Key, charStats, entry.Value, ActionKey.editUnitFinalStatsAmount);
            }
            MenuTools.SingleLineLabel(RichTextUtils.Bold(Strings.GetText("header_SocialSkillsBaseValues")));
            foreach (KeyValuePair <string, StatType> entry in Storage.statsSocialSkillsDict)
            {
                MenuTools.CreateStatInterface(entry.Key, charStats, entry.Value, ActionKey.editUnitFinalStatsAmount);
            }
            MenuTools.SingleLineLabel(RichTextUtils.Bold(Strings.GetText("header_StatsSaves")));
            foreach (KeyValuePair <string, StatType> entry in Storage.statsSavesDict)
            {
                MenuTools.CreateStatInterface(entry.Key, charStats, entry.Value, ActionKey.editUnitFinalStatsAmount);
            }
            MenuTools.SingleLineLabel(RichTextUtils.Bold(Strings.GetText("header_StatsCombat")));
            foreach (KeyValuePair <string, StatType> entry in Storage.statsCombatDict)
            {
                MenuTools.CreateStatInterface(entry.Key, charStats, entry.Value, ActionKey.editUnitFinalStatsAmount);
            }
        }