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,19 @@
public class MinEventActionRemoveRoundsFromInventory : MinEventActionAmmoAccessBase
{
private ItemValue itemValueCache;
public override bool CanExecute(MinEventTypes _eventType, MinEventParams _params)
{
if (!base.CanExecute(_eventType, _params))
return false;
var _ranged = _params.ItemValue.ItemClass.Actions[_params.ItemActionData.indexInEntityOfAction] as ItemActionRanged;
string ammoName = _ranged.MagazineItemNames[_params.ItemValue.SelectedAmmoTypeIndex];
return RoundsInInventory.TryGetValue(ammoName, out itemValueCache);
}
public override void Execute(MinEventParams _params)
{
_params.Self.TryRemoveItem(GetCount(_params), itemValueCache);
}
}