OnGrowableUpdate
CarbonGlobalCalled when a growable is updated.
void OnGrowableUpdate(GrowableEntity growable)Works — the game method in this build is the one the hook was written for.
Parameters
- growable
- GrowableEntity
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnGrowableUpdate(GrowableEntity growable)
{
Puts("OnGrowableUpdate");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Carbon
void GrowableEntity.RunUpdate()
WorksAssembly-CSharp
Where it is called (this branch's game code)
private void RunUpdate()
{
Interface.CallHook("OnGrowableUpdate", this);
if (!IsDead())
{
CalculateQualities(firstTime: false);
float overallQuality = CalculateOverallQuality();
float actualStageAgeIncrease = UpdateAge(overallQuality);
UpdateHealthAndYield(overallQuality, actualStageAgeIncrease);
if (health <= 0f)
{
// …Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.