Иконка ресурса

FREE RustBugFixes : 1.0 1.0

Нет прав для скачивания
C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("Rust Bug Fixes", "Mughisi", 1.0)]
    class RustBugFixes : RustPlugin
    {

        /* Includes 'fixes' for the following bugs:
         *  - Quarry inventories' capacity is limited to 6 and should be 18.*/

        void OnServerInitialized()
        {
            var quarries = UnityEngine.Object.FindObjectsOfType<MiningQuarry>();
            foreach (var quarry in quarries)
            {
                quarry.hopperPrefab.instance.GetComponent<StorageContainer>().inventory.capacity = 18;
                quarry.fuelStoragePrefab.instance.GetComponent<StorageContainer>().inventory.capacity = 18;
            }
        }

        void OnEntityBuilt(Planner planner, GameObject component)
        {
            var quarry = component.ToBaseEntity() as MiningQuarry;
            if (!quarry) return;
            quarry.hopperPrefab.instance.GetComponent<StorageContainer>().inventory.capacity = 18;
            quarry.fuelStoragePrefab.instance.GetComponent<StorageContainer>().inventory.capacity = 18;
        }
    }
}

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху