Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add customizeable option RDRotation #234

Merged
merged 4 commits into from
Sep 22, 2017
Merged

add customizeable option RDRotation #234

merged 4 commits into from
Sep 22, 2017

Conversation

Sigma88
Copy link
Contributor

@Sigma88 Sigma88 commented Sep 22, 2017

No description provided.

@Sigma88
Copy link
Contributor Author

Sigma88 commented Sep 22, 2017

if you also want the customizeable option merge this PR first, and then merge #233

@@ -277,6 +277,19 @@ public EnumParser<RDVisibility> hiddenRnD
set { celestialBody.Set("hiddenRnD", value.value); }
}

// If the body should be hidden in RnD
[ParserTarget("RDRotation")]
public NumericParser<bool> RDRotation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to RnDRotation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we change RDVisibility as well?

or do you want to have RDVisibility and RnDRotation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea, but I wouldn't change it. Instead we should add a second ParserTarget with the new name to it.

@@ -40,14 +40,14 @@ namespace Kopernicus
/// </summary>
public class RnDFixer : MonoBehaviour
{
List<RDPlanetListItemContainer> stars = new List<RDPlanetListItemContainer>();
internal static List<RDPlanetListItemContainer> RDRotationKill = new List<RDPlanetListItemContainer>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RnDRotationKill?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the list of bodies for which we want to "kill" the rotation

it's not required that they are stars, but someone might want to kill the rotation of other bodies

I initially had named it stars because I didn't intend to allow the users to choose which bodies to select

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. I was just suggesting a new name (with an n)

@@ -252,9 +252,10 @@ void Start()
}
}

if (planetItem?.planet?.GetComponent<StarComponent>() != null)
// Kill Rotation
if (body.Has("RDRotation") ? !body.Get<bool>("RDRotation") : planetItem?.planet?.GetComponent<StarComponent>() != null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, I would just check if the body is in KopernicusStar.Stars, but this works too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how KopernicusStar worked

do you keep all stars in there? even those with "GivesOffLight = False" ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly I would restrict the "off" feature only to those stars that have coronas, since the only downside of rotating stars is that the corona rotates together with the star >_>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats fine.

return generatedBody.Get<bool>("RDRotation");
return generatedBody?.scaledVersion?.GetComponentsInChildren<SunShaderController>(true)?.Length > 0;
}
set { celestialBody.Set("RnDrotation", value.value); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix this.

@Sigma88 Sigma88 merged commit 83822db into starfixes Sep 22, 2017
@Sigma88 Sigma88 deleted the starfixes+ branch September 22, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants