Creating an NRaas project Debugging mods

Talk nerdy to us here.
User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7619
Joined: December 30th, 2011, 6:00 pm
Answers: 82
Contact:

Post by Chain_Reaction » September 10th, 2014, 10:08 pm

I'm sure we'll get you sorted but this one is definitely odd. Does your PrimaryInteraction look exactly like this?

<!-- ws:start:WikiTextCodeRule:0:
<pre class="text">namespace NRaas.OnceReadSpace.Interactions<br/>{<br/> public class PrimaryInteraction : ListedInteraction&lt;IPrimaryOption&lt;GameObject&gt;, GameObject&gt;<br/> {<br/> static InteractionDefinition Singleton = new CommonDefinition&lt;PrimaryInteraction&gt;();<br/><br/> public override void AddInteraction(Common.InteractionInjectorList interactions)<br/> { <br/> interactions.AddRoot(Singleton);<br/> }<br/> }<br/>}</pre>
-->
<style type="text/css"><!--
/**
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
*/
.text {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

-->
</style><pre class="text">namespace NRaas.OnceReadSpace.Interactions
{
public class PrimaryInteraction : ListedInteraction<IPrimaryOption<GameObject>, GameObject>
{
static InteractionDefinition Singleton = new CommonDefinition<PrimaryInteraction>();
&nbsp;
public override void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.AddRoot(Singleton);
}
}
}</pre>


myranalis
Reactions:
Posts: 12
Joined: June 24th, 2014, 6:00 pm

Post by myranalis » September 10th, 2014, 10:57 pm

Mine also has the Test method overridden. But other than that addition it is identical.

protected override bool Test(IActor actor, GameObject target, GameObjectHit hit, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
return Common.IsRootMenuObject(target);
}

myranalis
Reactions:
Posts: 12
Joined: June 24th, 2014, 6:00 pm

Post by myranalis » September 12th, 2014, 9:16 am

Finally got a screenshot of what I'm seeing. See http://i9.photobucket.com/albums/a65/my ... -14-06.jpg

I've been trying to modify my PrimaryInteraction class in any number of ways, including completely replacing it with yours above - still the same result. If I exclude the file from my project then the menus go back to the pie toggle style but the OnceRead menu draws properly. I'm stumped. :)

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7619
Joined: December 30th, 2011, 6:00 pm
Answers: 82
Contact:

Post by Chain_Reaction » September 13th, 2014, 7:10 pm

Hi, apologies for the lack of response. I've been busier than usual. :)

I can't say I have seen that before. Let me give adding an option and menu to the mod and see if I get the same results.

myranalis
Reactions:
Posts: 12
Joined: June 24th, 2014, 6:00 pm

Post by myranalis » September 13th, 2014, 7:34 pm

If I check my stuff into GitHub you should be able to see my code to compare it, correct? I shall try and figure out how to do that shortly :)

myranalis
Reactions:
Posts: 12
Joined: June 24th, 2014, 6:00 pm

Post by myranalis » September 13th, 2014, 9:04 pm

OK, I think the changes I've made should be visible on https://github.com/myranalis/NRaas/

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7619
Joined: December 30th, 2011, 6:00 pm
Answers: 82
Contact:

Post by Chain_Reaction » September 14th, 2014, 2:12 am

Yes I can see them. Give me a bit to digest it and I'll get back with you :)

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7619
Joined: December 30th, 2011, 6:00 pm
Answers: 82
Contact:

Post by Chain_Reaction » September 15th, 2014, 12:38 am

Alright, the issue is you didn't remove the default primary interaction (that shows the version when there are no configurable options).

<!-- ws:start:WikiTextCodeRule:0:
<pre class="text">&lt;Compile Include=&quot;..\NRaas\Interactions\PrimaryInteraction.cs&quot;&gt;<br/> &lt;Link&gt;CommonSpace\Interactions\PrimaryInteraction.cs&lt;/Link&gt;<br/> &lt;/Compile&gt;</pre>
-->
<style type="text/css"><!--
/**
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
*/
.text {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

-->
</style><pre class="text"><Compile Include="..\NRaas\Interactions\PrimaryInteraction.cs">
<Link>CommonSpace\Interactions\PrimaryInteraction.cs</Link>
</Compile></pre>


Remove that from the project file and it should be okay.

My apologies for taking so long to assist you!

myranalis
Reactions:
Posts: 12
Joined: June 24th, 2014, 6:00 pm

Post by myranalis » September 15th, 2014, 7:56 am

That fixes it alright! Figured it would be something simple in the end. Thanks. Now I wIll try and do something useful with my fancy new option :)

Post Reply