If the return is false,The plants will still disappear,but the player will not receive any item!onPlantTakeCutting is ok!
Plants disappearing when returning OnGrowableGatherFixed
CanTakeCutting is earlier than OnGrowableGather. If you want to prevent, you should be using the earlier one.
Wulf
CanTakeCutting is earlier than OnGrowableGather. If you want to prevent, you should be using the earlier one.
Whichever I use, the plants will be gathered....
Wulf
CanTakeCutting is earlier than OnGrowableGather. If you want to prevent, you should be using the earlier one.
on QuarryGather is also have bug....
private void OnQuarryGather(MiningQuarry quarry, List<ResourceDepositManager.ResourceDeposit.ResourceDepositEntry> items)
{
ResourceDepositManager.ResourceDeposit.ResourceDepositEntry item;
float modifier;
for (var i = 0; i < items.Count; i++)
{
item = items[i];
if (QuarryResourceModifiers.TryGetValue(item.type.displayName.english, out modifier))
{
item.amount = (int)(item.amount * modifier);
}
else if (QuarryResourceModifiers.TryGetValue("*", out modifier))
{
item.amount = (int)(item.amount * modifier);
}
}
}this is a fragment in GatherMannger. "item.amount" is no effective.... and in my plugins, it is also no effective.... I think oxide need to update.
Thank you for Wulf help!
Oxide (not uMod) is having the quarry hook change reverted, but nothing changeable about the others that I am aware of.
OnGrowableGather is in
public void GiveFruit(BasePlayer player, int amount, bool applyCondition)the Return here will NOT prevent
public void PickFruit(BasePlayer player)from running the follow up steps... which is OK for a Hook that is supposed to do counting or side-actions, but is makes it impossible to prevent looting based on other factors.
My proposal would be a:
public void PickFruit(BasePlayer player)
{
if (!this.CanPick())
return;
if (Interface.CallHook("CanGrowableGather", (object) this, (object) player) == false)
return;
...(edit ==false)
Wulf
Oxide (not uMod) is having the quarry hook change reverted, but nothing changeable about the others that I am aware of.
OK thank you!
Locked automatically