예제 #1
0
파일: Plugin.cs 프로젝트: severd8/Valheim
        private void ContainerRecyclingTriggered()
        {
            var player    = Player.m_localPlayer;
            var container = (Container)AccessTools.Field(typeof(InventoryGui), "m_currentContainer")
                            .GetValue(InventoryGui.instance);

            if (container == null)
            {
                return;
            }
            Log.LogDebug($"Player {player.GetPlayerName()} triggered recycling");
            Recycler.RecycleInventoryForAllRecipes(container.GetInventory(), player);
        }