Example #1
0
        public static string Profession(string[] args, GameController ctrl)
        {
            Profession prof = Assets.GetProfession(args[0]);

            if (prof == null)
            {
                return($"No profession named \"{args[0]}\" exists.");
            }

            Entity entity = ctrl.Cursor.HoveredCell.Actor;

            if (entity == null)
            {
                return("Please mouseover an actor first.");
            }

            if (!prof.Apply(entity))
            {
                return("Failed to apply profession.");
            }

            return($"Applied profession {prof.ID} to {entity.Name}.");
        }