示例#1
0
        public bool DoToggleAction(ToggleActionEventArgs args)
        {
            if (!IoCManager.Resolve <IEntityManager>().TryGetComponent(args.Performer, out CombatModeComponent? combatMode))
            {
                return(false);
            }

            args.Performer.PopupMessage(Loc.GetString(args.ToggledOn ? "hud-combat-enabled" : "hud-combat-disabled"));
            combatMode.IsInCombatMode = args.ToggledOn;

            return(true);
        }
        public bool DoToggleAction(ToggleActionEventArgs args)
        {
            if (!args.Performer.TryGetComponent(out CombatModeComponent? combatMode))
            {
                return(false);
            }

            args.Performer.PopupMessage(args.ToggledOn ? Loc.GetString("hud-combat-enabled") : Loc.GetString("hud-combat-disabled"));
            combatMode.IsInCombatMode = args.ToggledOn;

            return(true);
        }
示例#3
0
        public bool DoToggleAction(ToggleActionEventArgs args)
        {
            if (args.ToggledOn)
            {
                args.Performer.PopupMessageEveryone(MessageOn);
            }
            else
            {
                args.Performer.PopupMessageEveryone(MessageOff);
            }

            return(true);
        }