Jump to content
  • 0

Plant Genes plugin?


KanyT
 Share

Question

Hello community!

Can anybody help me to make a simple plugin for new Rust plants genetics manipulation?

For now I just use this dumb code for fast clones selection:

private void OnEntityBuilt(Planner planner, GameObject seed)
{
		var player = planner.GetOwnerPlayer();
		var imSeed = seed.GetComponent<GrowableEntity>();

		if (player == null || !player.IsAdmin)
		{
			return;
		}
			
		if (imSeed != null)
      	{
			NextTick(() =>
        {
        	imSeed.ChangeState(PlantProperties.State.Fruiting, false, false);
        });
}

Anybody knows how to make access to GrowableGene.Set(global::GrowableGenetics.GeneType geneType, bool firstSet = false) class ?

Edited by KanyT
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 3

            for (int i = 0; i < imSeed.Genes.Genes.Length; i++)
            {
                imSeed.Genes.Genes[i].Set(GrowableGenetics.GeneType.Yield, true);
            }

 

Edited by nivex
  • Like 1
  • Love 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

391.8k

Downloads

Total number of downloads.

2.1k

Customers

Total customers served.

28.3k

Files Sold

Total number of files sold.

441k

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.