Feature Make the CLI command "garden" available via ash

taltamir

Member
There is a CLI command called garden which tells you which garden you have, its growth, and can also use "garden pick" to collect it.

Would be great if this CLI command was translated into ash availability.
 

lostcalpolydude

Developer
Staff member
The first two are available both from get_campground() and my_garden_type(). So you're just asking for an ASH function to harvest your garden?
 

taltamir

Member
The first two are available both from get_campground() and my_garden_type(). So you're just asking for an ASH function to harvest your garden?
Thank you, I added my_garden_type() to the wiki. that is what I get for relying on it instead of ashref.

In regards to get_campground()
you can extract the growth from it but it is somewhat of a pain to do so. so it would be great if there was something like
int my_garden_growth()
for example I use this function
Code:
int grass_growth()
{
    int [item] campground = get_campground();
    foreach it,qty in campground
    {
        if(it == $item[packet of tall grass seeds])
        {
            return qty;
        }
    }
    return 0;
}
which is specific to only one garden type.

and yes I would definitely love a function to let you harvest garden. Either a specified amount or all of it (for grass you need to pick it multiple times)
 
Last edited:
There's no reason to loop the entire thing, just to find the value for one item.

I have the following static dataset
Code:
item [string] Gardens = {"pumpkin": $item[packet of pumpkin seeds],
			"peppermint": $item[Peppermint Pip Packet],
			"skeleton": $item[packet of dragon's teeth],
			"beer": $item[packet of beer seeds],
			"winter": $item[packet of winter seeds],
			"thanksgarden": $item[packet of thanksgarden seeds],
			"grass": $item[packet of tall grass seeds],
			"mushroom": $item[packet of mushroom spores],
			};

So now I can find the garden growth with:
Code:
int GardenGrowth() {
	get_campground()[Gardens[my_garden_type()]]
}
 
Last edited:

taltamir

Member
Top