• Visit Rebornbuddy
  • CoroutineCompositeExtensions Getting implemented in RebornBuddy

    Discussion in 'Community Developer Forum' started by Wheredidigo, Oct 31, 2014.

    1. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      I am trying to help Endus get movement code working in the MoreDots Combat Routine we've been doing together.

      Can we get this class from HonorBuddy implemented into RebornBuddy?

      CoroutineCompositeExtensions Class

      It would make doing movement a lot easier because we could use the CommonBehaviors

      Thanks,

      Wheredidigo
       
    2. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      Yes, please do! I've been banging my head against this wall for days and this would be such a huge help. :cool:
       
    3. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      EDIT: Forgot to say...thank you to MAIN for providing this code. At least somebody is willing to support the Community Developers around here.

      Let me make it a little easier for you so you can get this in for others to use....

      Code:
      using System;
      using System.Threading.Tasks;
      using Buddy.Coroutines;
      using TreeSharp;
      
      namespace "WHATEVER NAMESPACE YOU WANT TO PUT IT IN"
      {
          public static class CompositeExtensions
          {
              private static async Task<bool> ExecuteCoroutineInternal(Composite composite, object context)
              {
                  composite.Start(context);
      
                  while (composite.Tick(context) == RunStatus.Running)
                      await Coroutine.Yield();
      
                  composite.Stop(context);
      
                  return composite.LastStatus == RunStatus.Success;
              }
      
              /// <summary>
              /// Executes the composite inside a coroutine.
              /// </summary>
              /// <param name="composite"></param>
              /// <param name="context"></param>
              /// <returns><c>true</c> if the composite finished with <see cref="RunStatus.Success"/>; otherwise <c>false</c>.</returns>
              public static Task<bool> ExecuteCoroutine(this Composite composite, object context = null)
              {
                  if (composite == null)
                      throw new ArgumentNullException("composite");
      
                  return ExecuteCoroutineInternal(composite, context);
              }
          }
      }
      
       
      Last edited: Nov 3, 2014
    4. kaihaider

      kaihaider Community Developer

      Joined:
      May 18, 2010
      Messages:
      1,325
      Likes Received:
      5
      Trophy Points:
      38
      actually we should have thought of this :p
      obvious after you see it...
       
    5. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      Thing is...we shouldn't have to...Mastahg was asked to implement CoRoutines quite awhile ago and he did a half ass job doing it. As you can see from the code...its not exactly hard...its just sad that we basically had to go over his head so we can implement it ourselves when he should have had it in there awhile ago. I'd understand if it were something he had to write from scratch to do...but the code is there in honorbuddy...he should be able to see it.
       
    6. kaihaider

      kaihaider Community Developer

      Joined:
      May 18, 2010
      Messages:
      1,325
      Likes Received:
      5
      Trophy Points:
      38
      dude, he's only human. he probably just didn't think of it and didn't notice it until you posted something a couple days ago. when he saw the post he probably added it to his todo list to look into and you only gave him a day before finding the answer yourself.

      you're trying to make someone feel bad for no reason >_>
       
    7. Thecamel

      Thecamel Community Developer

      Joined:
      Aug 8, 2012
      Messages:
      2,036
      Likes Received:
      46
      Trophy Points:
      48
      I think the issue is we only have one core dev on this bot..and he's expected to support this bot too...

      I think the buddy team needs to provide more resources to this bot..at least
       
    8. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      Yeah, tensions have been high for a while because we've been without a lot of stuff (a real/working CR, no quest support, no unstuck support, no crafting support, etc.) and development seems like it's at a crawl.

      It also doesn't help that when mastahg is asked to fix/implement something he seems to blow it off (like how he never acknowledged this thread, or when I asked of Datamanager was broken/going to be fixed), especially if it's not something he's interested in (rather than what the community is interested in).

      I've been trying to keep trucking along but it does suck to feel like you don't have the support of the main dev as a community dev.
       
    9. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      I'm not trying to make anyone feel bad. And trust me when I tell you that Mastahg doesn't care about this kind of thing. I'm just not going to pull my punches anymore. When stuff is shitty, I'll call it shitty. Just the way it's going to be now.
       
    10. kaihaider

      kaihaider Community Developer

      Joined:
      May 18, 2010
      Messages:
      1,325
      Likes Received:
      5
      Trophy Points:
      38
      I'm just saying he can focus on the api and the community can focus on everything else

      That's how buddy products always were in the past. Buddy staff members that started helping out with stuff outside of api and bot core started as community devs and were then hired on.

      Since Mastahg is the only dev for reborn buddy I think he has his hands full with just the api/bot core :S
       
    11. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      You act like I have full access to the honorbuddy source code. I do not.
       

    Share This Page