Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:13:32 +09:30
commit 7345f42201
470 changed files with 51966 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using KFCommonUtilityLib.Scripts.StaticManagers;
public class PercentInHoldingItem : RoundsInHoldingItem
{
public override bool IsValid(MinEventParams _params)
{
if (!ParamsValid(_params))
return false;
ItemValue holdingItemValue = _params.Self.inventory.holdingItemItemValue;
int actionIndex = MultiActionManager.GetActionIndexForEntity(_params.Self);
if (holdingItemValue.IsEmpty() || !(holdingItemValue.ItemClass.Actions[actionIndex] is ItemActionRanged _ranged))
return false;
return RequirementBase.compareValues((float)(roundsBeforeShot ? holdingItemValue.Meta + 1 : holdingItemValue.Meta) / _ranged.GetMaxAmmoCount(_params.Self.inventory.holdingItemData.actionData[actionIndex]), operation, value) ^ invert;
}
}