Jump to content

Allow ModuleAnimationGroup to consume/generate resources when used on its own


Recommended Posts

The stock ModuleAnimationGroup PartModule, which supports looped animations, is currently used in the stock ore mining drill in conjunction with the surface/asteroid resource harvesting PartModule. Although the latter PartModules have built-in resource consumption, I think it would be nice for ModuleAnimationGroup to be able to consume/generate resources when used in a part on its own.

Link to comment
Share on other sites

And right now I'm imagining landing legs and misc parts requiring electricity to deploy. This is a great idea! :D

Landing leg animations aren't looped, since the animations for those play forwards to completion on deployment, and is then reversed when stowing - they remain static at the end of either state.

One applicable example, however, would be a set of strobe warning lights I'm making, which spin constantly when activated and should consume ElectricCharge while doing so.

Link to comment
Share on other sites

Landing leg animations aren't looped, since the animations for those play forwards to completion on deployment, and is then reversed when stowing - they remain static at the end of either state.

One applicable example, however, would be a set of strobe warning lights I'm making, which spin constantly when activated and should consume ElectricCharge while doing so.

Oh, I understand. But it would still be cool to have landing legs, cargo bays, and other parts consume electricity on deployment and retraction.

Link to comment
Share on other sites

That would really be out of scope for that module (separation of concerns and all that jazz).

That being said, if you want to use it in conjunction with something more lightweight than a full on converter, just implement it using IAnimatedModule (it's super lightweight) and you're all set.

Link to comment
Share on other sites

That would really be out of scope for that module (separation of concerns and all that jazz).

That being said, if you want to use it in conjunction with something more lightweight than a full on converter, just implement it using IAnimatedModule (it's super lightweight) and you're all set.

I'm not familiar with IAnimatedModule. Is this stock or from USI?

EDIT: Looks like IAnimatedModule is an interface for plugin authors. Since I'm looking to make these particular parts using existing stock features, a bespoke plugin is out of the question.

Edited by sumghai
Link to comment
Share on other sites

Gotcha. Yeah, I would still say that ModuleAnimationGroup is the wrong place for what you want (again, separation of concerns, etc.). Why not just use the regular ModuleResourceConverter then? Input of EC, no outputs. Done.

Link to comment
Share on other sites

Gotcha. Yeah, I would still say that ModuleAnimationGroup is the wrong place for what you want (again, separation of concerns, etc.). Why not just use the regular ModuleResourceConverter then? Input of EC, no outputs. Done.

I'm not sure I'm understanding this correctly.

Are you suggesting I use ModuleAnimationGroup as-is for the looping animation, and ModuleResourceConverter to listen for the animation state in order to determine whether to consume resources?

EDIT: After a PM conversation witn RoverDude, I now understand that ModuleAnimationGroup is the one that controls what other PartModules ModuleResourceConverter do (a prime example is the ISRU converter).

As this feature is already possible using the stock PartModules, I'll go ahead and close my own suggestion thread :)

Edited by sumghai
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...