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

FREE CupboardResources : 1.0.0 1.0.0

Нет прав для скачивания
C#:
using Oxide.Core.Plugins;
using Oxide.Core;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("CupboardResources", "Mentol", "1.0.0")]
    [Description("Allows sulfur and gunpowder to be stored in Tool Cupboards.")]
    public class CupboardResources : RustPlugin
    {
        private const string SulfurShortname = "sulfur";
        private const string GunpowderShortname = "gunpowder";
		private const string OreSulfurShortname = "sulfur.ore";
        private const string DieselBarrel = "diesel_barrel";


        object CanAcceptItem(ItemContainer container, Item item, int targetPos)
        {
            if (container?.entityOwner is BuildingPrivlidge)
            {
                if (item.info.shortname == SulfurShortname || item.info.shortname == GunpowderShortname || item.info.shortname == OreSulfurShortname || item.info.shortname == DieselBarrel )
                {
                    //Puts($"Allowing {item.info.shortname} to be stored in Tool Cupboard.");
                    return ItemContainer.CanAcceptResult.CanAccept;
                }
            }

            return null; 
        }
    }
}

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