Resource (26)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches CoalingTower.EmptyTenPercent of Assembly-CSharp.dll.

Example
void OnCoalingTowerGather()
{
    Puts("OnCoalingTowerGather was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches CoalingTower.RPC_Unload of Assembly-CSharp.dll.

Example
object OnCoalingTowerStart(CoalingTower CoalingTower , BasePlayer BasePlayer )
{
    Puts("OnCoalingTowerStart was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches CollectibleEntity.DoPickup of Assembly-CSharp.dll.

Example
void OnCollectiblePickedup(CollectibleEntity CollectibleEntity , BasePlayer BasePlayer , Item Item )
{
    Puts("OnCollectiblePickedup was called!");
}

This hook requires OnCollectiblePickup, which loads alongside OnCollectiblePickedup.

  • Called when the player collects an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CollectibleEntity.DoPickup of Assembly-CSharp.dll.

Example
object OnCollectiblePickup(CollectibleEntity CollectibleEntity , BasePlayer BasePlayer , bool Boolean )
{
    Puts("OnCollectiblePickup was called!");
    return (object) null;
}
  • Called before the player is given a bonus item for gathering.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResourceDispenser.AssignFinishBonus of Assembly-CSharp.dll.

Example
void OnDispenserBonus(ResourceDispenser ResourceDispenser , BasePlayer BasePlayer , Item Item )
{
    Puts("OnDispenserBonus was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches ResourceDispenser.AssignFinishBonus of Assembly-CSharp.dll.

Example
void OnDispenserBonusReceived(ResourceDispenser ResourceDispenser , BasePlayer BasePlayer , Item Item )
{
    Puts("OnDispenserBonusReceived was called!");
}

This hook requires OnDispenserBonus, which loads alongside OnDispenserBonusReceived.

  • Called before the player is given items from a resource.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResourceDispenser.GiveResourceFromItem of Assembly-CSharp.dll.

Example
object OnDispenserGather(ResourceDispenser ResourceDispenser , BasePlayer BasePlayer , Item Item )
{
    Puts("OnDispenserGather was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches ResourceDispenser.GiveResourceFromItem of Assembly-CSharp.dll.

Example
void OnDispenserGathered(ResourceDispenser ResourceDispenser , BasePlayer BasePlayer , Item Item )
{
    Puts("OnDispenserGathered was called!");
}

This hook requires OnDispenserGather, which loads alongside OnDispenserGathered.

  • Called right before moving gathered resource to container.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ExcavatorArm.ProduceResources of Assembly-CSharp.dll.

Example
object OnExcavatorGather(ExcavatorArm ExcavatorArm , Item Item )
{
    Puts("OnExcavatorGather was called!");
    return (object) null;
}
  • Called when excavator mining arm is toggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ExcavatorArm.BeginMining of Assembly-CSharp.dll.

Example
void OnExcavatorMiningToggled(ExcavatorArm ExcavatorArm )
{
    Puts("OnExcavatorMiningToggled was called!");
}
  • Called when excavator mining arm is toggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ExcavatorArm.StopMining of Assembly-CSharp.dll.

Example
void OnExcavatorMiningToggled(ExcavatorArm ExcavatorArm )
{
    Puts("OnExcavatorMiningToggled was called!");
}
  • Called when a player is trying to set a new resource target.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ExcavatorArm.RPC_SetResourceTarget of Assembly-CSharp.dll.

Example
object OnExcavatorResourceSet(ExcavatorArm ExcavatorArm , string String , BasePlayer BasePlayer )
{
    Puts("OnExcavatorResourceSet was called!");
    return (object) null;
}
  • Called when the player gathers a growable entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches GrowableEntity.PickFruit of Assembly-CSharp.dll.

Example
object OnGrowableGather(GrowableEntity GrowableEntity )
{
    Puts("OnGrowableGather was called!");
    return (object) null;
}
  • Called before the player receives an item from gathering a growable entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches GrowableEntity.GiveFruit of Assembly-CSharp.dll.

Example
void OnGrowableGathered(GrowableEntity GrowableEntity , Item Item , BasePlayer BasePlayer )
{
    Puts("OnGrowableGathered was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches GrowableEntity.ChangeState of Assembly-CSharp.dll.

Example
object OnGrowableStateChange(GrowableEntity GrowableEntity , PlantProperties.State State )
{
    Puts("OnGrowableStateChange was called!");
    return (object) null;
}
  • Called when loot spawns in a container.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.SpawnLoot of Assembly-CSharp.dll.

Example
object OnLootSpawn(LootContainer LootContainer )
{
    Puts("OnLootSpawn was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MiningQuarry.FuelCheck of Assembly-CSharp.dll.

Example
void OnQuarryConsumeFuel(MiningQuarry quarry, Item item)
{
    Puts("OnQuarryConsumeFuel was called!");
}
  • Called before items are gathered from a quarry.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MiningQuarry.ProcessResources of Assembly-CSharp.dll.

Example
void OnQuarryGather()
{
    Puts("OnQuarryGather was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches EngineSwitch.StartEngine of Assembly-CSharp.dll.

Example
object OnQuarryToggle(MiningQuarry MiningQuarry , BasePlayer BasePlayer )
{
    Puts("OnQuarryToggle was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches EngineSwitch.StopEngine of Assembly-CSharp.dll.

Example
object OnQuarryToggle(MiningQuarry MiningQuarry , BasePlayer BasePlayer )
{
    Puts("OnQuarryToggle was called!");
    return (object) null;
}
  • Called when a quarry has just been toggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EngineSwitch.StopEngine of Assembly-CSharp.dll.

Example
void OnQuarryToggled(MiningQuarry MiningQuarry , BasePlayer BasePlayer )
{
    Puts("OnQuarryToggled was called!");
}

This hook requires OnQuarryToggle [off], which loads alongside OnQuarryToggled.

  • Called when a quarry has just been toggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EngineSwitch.StartEngine of Assembly-CSharp.dll.

Example
void OnQuarryToggled(MiningQuarry MiningQuarry , BasePlayer BasePlayer )
{
    Puts("OnQuarryToggled was called!");
}

This hook requires OnQuarryToggle [on], which loads alongside OnQuarryToggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RandomItemDispenser.TryAward of Assembly-CSharp.dll.

Example
void OnRandomItemAward()
{
    Puts("OnRandomItemAward was called!");
}
  • Called when a player is trying to harvest a dying growable entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches GrowableEntity.RemoveDying of Assembly-CSharp.dll.

Example
object OnRemoveDying(GrowableEntity GrowableEntity , BasePlayer BasePlayer )
{
    Puts("OnRemoveDying was called!");
    return (object) null;
}
  • Called when a resource deposit has been created.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResourceDepositManager.CreateFromPosition of Assembly-CSharp.dll.

Example
void OnResourceDepositCreated(ResourceDepositManager.ResourceDeposit ResourceDeposit )
{
    Puts("OnResourceDepositCreated was called!");
}
  • Called before items are gathered from a survey charge.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SurveyCharge.Explode of Assembly-CSharp.dll.

Example
void OnSurveyGather(SurveyCharge SurveyCharge )
{
    Puts("OnSurveyGather was called!");
}

Last updated