Toils: Cleaning table before working on it ?

Started by notfood, July 26, 2016, 12:04:23 AM

Previous topic - Next topic

notfood

Is there a helper method or an example how it's usually done?

I feel that doing it the manual way is the suboptimal way. How is it handled normally? My decompiler can't see yields so I can't tell from the code.

1000101

Be sure to turn on the option to decompile compiler generated code.  But it still is a fugly mess.  Unfortunately, we all have to do it this way to see how core toils are generated.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

notfood

I'm using monodevelop. It decompiles all code just fine except for toils. It comes out as garbled text. I don't see an option to decompile compiler generated code.

Anyhow, I tried looking at github for examples and found none. If you can post a snip of that decompiled compiler generated code, I'd appreciate it.

For now I used a hack to keep the table clear but I feel it's the wrong waytm.

1000101

Can you give an example of this "garbled text"?  Do you mean the escape-sequenced unicode (ie: \003E instead of <)?
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

notfood

I get things like this: [DebuggerHidden]
protected override IEnumerable<Toil> MakeNewToils ()
{
JobDriver_DoBill.<MakeNewToils>c__Iterator159 <MakeNewToils>c__Iterator = new JobDriver_DoBill.<MakeNewToils>c__Iterator159 ();
<MakeNewToils>c__Iterator.<>f__this = this;
JobDriver_DoBill.<MakeNewToils>c__Iterator159 expr_0E = <MakeNewToils>c__Iterator;
expr_0E.$PC = -2;
return expr_0E;
}


Digging more I found these two. They generate the Jobs I need.
WorkGiverUtility.HaulStuffOffBillGiverJob()
HaulAIUtility.HaulAsideJobFor()


1000101

Quote from: 1000101 on July 26, 2016, 04:56:16 AMBe sure to turn on the option to decompile compiler generated code.  But it still is a fugly mess.  Unfortunately, we all have to do it this way to see how core toils are generated.

^^

You need it to also decompile the "<MakeNewToils>c__Iterator159" class.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By