What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

CoroutineCompositeExtensions Getting implemented in RebornBuddy

Wheredidigo

Community Developer
Joined
Dec 15, 2013
Messages
417
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
 
Yes, please do! I've been banging my head against this wall for days and this would be such a huge help. :cool:
 
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:
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);
        }
    }
}

actually we should have thought of this :P
obvious after you see it...
 
actually we should have thought of this :P
obvious after you see it...
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.
 
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.

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 >_>
 
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
 
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.
 
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 >_>

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.
 
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
 
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.

You act like I have full access to the honorbuddy source code. I do not.
 
Back
Top