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
object OnCoalingTowerGather()
{
    Puts("OnCoalingTowerGather was called!");
    return (object) null;
}
  • 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 self, BasePlayer player)
{
    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 self, BasePlayer reciever, Item local4)
{
    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 self, BasePlayer reciever, bool eat)
{
    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 self, BasePlayer player, Item local4)
{
    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 self, BasePlayer player, Item local4)
{
    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 self, BasePlayer entity, Item local7)
{
    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 self, BasePlayer entity, Item local7)
{
    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 self, Item local8)
{
    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 self)
{
    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 self)
{
    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 self, string local0, BasePlayer player)
{
    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 self)
{
    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 self, Item local0, BasePlayer player)
{
    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 self, 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 self)
{
    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
object OnQuarryGather()
{
    Puts("OnQuarryGather was called!");
    return (object) null;
}
  • 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 local0, BasePlayer player)
{
    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 local0, BasePlayer player)
{
    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 local0, BasePlayer player)
{
    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 local0, BasePlayer player)
{
    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
object OnRandomItemAward()
{
    Puts("OnRandomItemAward was called!");
    return (object) null;
}
  • 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 self, BasePlayer receiver)
{
    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 local1)
{
    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 self)
{
    Puts("OnSurveyGather was called!");
}

Last updated