Exemple #1
0
        private Gizmo GetHackingCancelGizmo(Pawn mech, int index)
        {
            Command_Action_Highlight command = new Command_Action_Highlight();

            command.defaultLabel = "WTH_Gizmo_HackingCancel_Label".Translate() + " " + index;
            command.defaultDesc  = "WTH_Gizmo_HackingCancel_Description".Translate();
            command.parent       = this;
            command.thing        = mech;

            bool iconFound = Base.Instance.cancelControlMechTextures.TryGetValue(mech.def.defName, out Texture2D icon);

            if (iconFound)
            {
                command.icon = icon;
            }
            command.action = delegate
            {
                CancelHacking(mech);
            };
            return(command);
        }
Exemple #2
0
        private Gizmo GetControlTurretCancelGizmo(Building_TurretGun turret, int index)
        {
            Command_Action_Highlight command = new Command_Action_Highlight();

            command.defaultLabel = "WTH_Gizmo_ControlTurretCancel_Label".Translate() + index;
            command.defaultDesc  = "WTH_Gizmo_ControlTurretCancel_Description".Translate();
            command.parent       = this;
            command.thing        = turret;

            bool iconFound = Base.Instance.cancelControlTurretTextures.TryGetValue(turret.def.defName, out Texture2D icon);

            if (iconFound)
            {
                command.icon = icon;
            }
            command.action = delegate
            {
                CancelControlTurret(turret);
            };
            return(command);
        }
Exemple #3
0
        private Gizmo GetControlMechanoidCancelGizmo(Pawn mech)
        {
            Command_Action_Highlight command = new Command_Action_Highlight();

            command.defaultLabel = mech.Name.ToStringShort;
            command.defaultDesc  = "WTH_Gizmo_ControlMechanoidCancel_Description".Translate();
            command.parent       = this;
            command.thing        = mech;

            bool iconFound = Base.Instance.cancelControlMechTextures.TryGetValue(mech.def.defName, out Texture2D icon);

            if (iconFound)
            {
                command.icon = icon;
            }
            command.action = delegate
            {
                CancelControlMechanoid(mech);
            };
            return(command);
        }