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,41 @@
using System;
using System.Collections.Generic;
namespace KFCommonUtilityLib.Scripts.ConsoleCmd
{
public class ConsoleCmdPrintLocalCache : ConsoleCmdAbstract
{
public override bool IsExecuteOnClient => true;
public override bool AllowedInMainMenu => false;
public override int DefaultPermissionLevel => 1000;
public override void Execute(List<string> _params, CommandSenderInfo _senderInfo)
{
if (_params.Count != 1)
return;
int index = int.Parse(_params[0]);
var player = GameManager.Instance.World.GetPrimaryPlayer();
if (player != null && player.inventory.holdingItemData.actionData[index] is IModuleContainerFor<ActionModuleLocalPassiveCache.LocalPassiveCacheData> module)
{
ActionModuleLocalPassiveCache.LocalPassiveCacheData instance = module.Instance;
foreach (int hash in instance)
{
Log.Out($"cache {instance.GetCachedName(hash)} value {instance.GetCachedValue(hash)}");
}
}
}
public override string[] getCommands()
{
return new[] { "plc" };
}
public override string getDescription()
{
return "Show local cache for current holding item.";
}
}
}