Help updating mod

Started by skullywag, September 09, 2014, 03:52:34 PM

Previous topic - Next topic

skullywag

Im having a crack at updating Mechatronics and am most of the way there, just a couple of hangups in the DLL that I cant seem to find their replacements/updates:

if (this.connectedToTransmitter != null)

I dont even know what connectedToTransmitter was supposed to do??? TransmitsPower maybe?

Ahah got that one:

if (this.def.ConnectToPower != null)

-------------------

this.story.adulthood.workDisables = 9141;

It doesnt like the number 9141 as im guessing it doesnt exist in the worktags enum anymore, anyone know what worktag 9141 is now or used to be or anything?

Fixed this one, defined the backstories myself.

-------------------

this.playerController.workSettings.InitialSetupFromSkills();

Says workSettings doesnt exist inside playerCOntroller but it does as far as I can tell

Fixed that one with:
this.playerController.pawn.workSettings.InitialSetupFromSkills();

-------------------

this.psychology.Loyalty.set_curLevel(100f);
this.psychology.Happiness.set_curLevel(100f);
this.psychology.Fear.set_curLevel(0f);


there doesnt seem to be these inside Psycology anymore, anyone know what they should be now, tried mood to no avail?

Thanks to Haplo below this ones done.

-------------------

if (this.health <= 0)
                {
                    Explosion.DoExplosion(base.Position, 1.9f, DamageTypeDefOf.Bomb, this);
                }


Moaning about Explosion not existing in the current context, was this replaced with something?

Again thanks to Haplo below this ones done.

--------------------

if (Find.get_TickManager().tickCount % 100 == 0)
            {
                this.healthTracker.Heal(1);
            }


.Heal is now?

Ive fixed the rest so its just the ones above im having issues figuring out.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mrofa

Quoteif (this.health <= 0)
                {
                    Explosion.DoExplosion(base.get_Position(), 1.9f, DamageTypeDefOf.Bomb, this);
                }

It should work if you remove _get and leave "base.Position"
All i do is clutter all around.

skullywag

Yeah i spotted that and already fixed it, its still underlining the Explosion part in red.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Haplo

For your explosion part, you can use it like this:

GenExplosion.DoExplosion(Position, 1.9f, DamageTypeDefOf.Bomb, this);


And for the psychology part:

psychology.mood.CurLevel = 100.0f;


skullywag

Quote from: Haplo on September 09, 2014, 06:36:49 PM
For your explosion part, you can use it like this:

GenExplosion.DoExplosion(Position, 1.9f, DamageTypeDefOf.Bomb, this);


And for the psychology part:

psychology.mood.CurLevel = 100.0f;


Does the mood 1 replace all 3 of the others then? wasnt around for when it was happiness, loyalty etc..

Ill add these now and see what happens. Thanks muchly.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Haplo

Yes, Happyness and Fear are combined into Mood.
I don't know where the Loyalty part comes from, as I don't remember it at all..

skullywag

Those work so its just the heal one left...
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Haplo

Oh, didn't see that one..
I'm not sure, but try this:

healthTracker.Health += 1;

skullywag

#8
Well that got all the errors, however the mod goes nuts when loaded, lots of red yellow green blue colours!!

Fancy taking a quick peak as I feel ive done most of what I can achieve. It at least doesnt crash on adding it now (just cant play the game lol)

Had to split the zip due to file sizes.

hmm actually might have been a bad save. Seems to work ok on a new world. Now to test it.

Ok spawning in a centipede from the mod and errors galore, debug time.

[attachment deleted by admin: too old]
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?