Closed linuxgurugamer closed 3 years ago
It doesn't look like this patch is removing the (presumed) ModuleAnimateGeneric on the cacteye parts. I would guess that they are conflicting because both modules would try to manage the animation.
The slots are set up by the B9PS module, they allow players to pick what instruments go on the telescope. Instruments are defined here - they're not real parts.
Correct, I wasn't removing the ModuleAnimateGeneric. Ok, thank you, I'll make the fixes and try it out
So I have that working, but removing the MOduleAnimateGeneric broke some of the functionality, since I directly call the Toggle() method in ModuleanimateGeneric when a button is clicked in the GUI
Do you have a wrapper I could use to call the appropriate method in your mod? I'd prefer the wrapper not require a hard compile dependency, if possible.
Specifically, the Start Survey/Stop Survey. If necessary, I can code around this, just need to know where and what the proper calls are.
You could try using reflection or monobehaviour Invoke to call DisableTelescope()
and EnableTelescope()
I'll have to use Reflection, I also need to know the state of the animation.
So, what do I need to do to help you here then?
Just one more question: How can I tell if it's working? I decided to do a hard dependency, simpler than doing reflection. So it's done, I just want to test it.
I did have a small issue which I ignored, CactEye uses the animTime of ModuleAnimateGeneric to determine if it's open or closed, I used the ModuleSpaceDustTelescope.Enabled for now. The animation is less than a second, I can ignore it
Start a new game, create a ship with the part, pick the Xenon spectrometer. Teleport to orbit, cheat electricity, target Eve. Timewarp for a while, you should eventually see a screenmessage about 'xenon discovered at eve' get posted.
Great, thank you
I added the patch below to the CactEye Optics mod. I updated the ScanAnimationName to be the telescope apeture. When it was running, and I used the CactEye ModuleAnimateGeneric's startEventGUIName event, the event just disappeared from the PAW and was unable to be used again.
Not sure if I did something wrong. Also, the SLOTs, what are they and how do they get populated? I assume it's a part, but haven't had a chance to dig into the Spacedust mod yet.
`@PART[tele_body]:NEEDS[SpaceDust] {
MODULE { name = ModuleSpaceDustTelescope // Power cost per second when scanning PowerCost = 12 // Animation ScanAnimationName = tele_openaperture // Size of the lens/mirror, for calcuations ObjectiveSize = 1.8 // FOV (radians) FieldOfView = 0.000969627362992369
}
@PART[tele_body2]:NEEDS[SpaceDust] {
MODULE { name = ModuleSpaceDustTelescope // Power cost per second when scanning PowerCost = 12 // Animation ScanAnimationName = body2_open // Size of the lens/mirror, for calcuations ObjectiveSize = 1.8 // FOV (radians) FieldOfView = 0.000969627362992369
}
@PART[tele_body,tele_body2]:NEEDS[SpaceDust] { MODULE { name = ModuleB9PartSwitch moduleID = instrumentSlot1 switcherDescription = #LOC_SpaceDust_switcher_instrument_slot1_title
}
@PART[tele_body]:NEEDS[SpaceDust] {
}
@PART[tele_body2]:NEEDS[SpaceDust] {
}
`