Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Allows two-wheel-drive rovers #6

Closed
wants to merge 3 commits into from

Conversation

Kerbas-ad-astra
Copy link

Inspired by #5 -- this will allow a rover with two motor wheels and two landing gears to be Poehali'd. Additionally, it no longer depends on ModuleWheelDamage to tell if a wheel is touching the ground or not (it uses a variable from ModuleWheelBase now), so the Karibou and Malemute wheels are less 'cheaty'.

There is one more side effect that I'm okay with, but I'll change it if you prefer: currently, a rover with damaged wheels can still be Poehali'd as long as it has at least four working wheels touching the ground (and two of them are motorized). If you'd rather keep the current behavior of not allowing any broken wheels at all, I can move the brokenness check earlier in the loop.

…otorized landing gear) to be automated.

Also no longer depends on ModuleWheelDamage to say if a wheel is touching the ground or not.

Also allows rovers with broken wheels to be automated, *if* there are enough non-broken wheels still touching the ground (i.e. 4, with at least 2 motorized).  This can be changed by moving the isGrounded check after the damage check.
@Real-Gecko
Copy link
Owner

Well, thanks for advance, man! But you changes are a little bit out of date :D
I already changed code dramatically to support KSPWheel.
Anyway do landing gear parts have ModuleWheel?

@Kerbas-ad-astra
Copy link
Author

Landing gear parts use ModuleWheelBase, but not ModuleWheelMotor. (So do landing legs, incidentally, which is why I included the "wheelBase.wheelType != WheelType.LEG" check.)

I'll adapt as necessary when your update goes live here. Thanks!

@Real-Gecko
Copy link
Owner

OK, I've adopt your changes as it turns out I'll need rely on two usable gears anyway in case of monstrocities like this:
monster truck maddness

@Real-Gecko Real-Gecko closed this Mar 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants