Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

Plant Genes plugin?



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)
		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

About Us

Codefling is a forward-thinking platform for developers to share and monetize their work from plugins to game assets and everything in-between.

7,109 files sold to 634 customers and $103,022 of payments processed this year!

  • 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.