public override void Initialise()
        {
            _sData = StashData.Load(this);

            if (_sData == null)
            {
                LogMessage("RareSetManager: Can't load cached items from file StashData.json. Creating new config. Open stash tabs for updating info. Tell to developer if this happen often enough.", 10);
                _sData = new StashData();
            }

            _inventDrop = new DropAllToInventory(this);

            DisplayData = new ItemDisplayData[8];

            for (var i = 0; i <= 7; i++)
            {
                DisplayData[i] = new ItemDisplayData();
            }

            UpdateItemsSetsInfo();

            Settings.WeaponTypePriority.SetListValues(new List <string> {
                "Two handed", "One handed"
            });

            Settings.CalcByFreeSpace.OnValueChanged  += UpdateItemsSetsInfo;
            GameController.Area.OnAreaChange         += OnAreaChange;
            MenuPlugin.KeyboardMouseEvents.MouseDown += OnMouseEvent;
            API.SubscribePluginEvent("StashUpdate", ExternalUpdateStashes);
        }
Beispiel #2
0
        private void SetupOrClose()
        {
            if (!Settings.Enable.Value)
            {
                // If threads are implemented they should be closed here.
                return;
            }

            CheckGitUpdateConfig();

            _sData      = StashData.Load(this);
            _inventDrop = new DropAllToInventory(this);

            DisplayData = new ItemDisplayData[8];

            for (var i = 0; i <= 7; i++)
            {
                DisplayData[i] = new ItemDisplayData();
            }

            UpdateItemsSetsInfo();

            GameController.Area.OnAreaChange += OnAreaChange;

            Settings.WeaponTypePriority.SetListValues(new List <string> {
                "Two handed", "One handed"
            });
        }
Beispiel #3
0
        public override bool Initialise()
        {
            Input.RegisterKey(Settings.DropToInventoryKey.Value);
            _sData = StashData.Load(this);

            if (_sData == null)
            {
                LogMessage(
                    "RareSetManager: Can't load cached items from file StashData.json. Creating new config. Open stash tabs for updating info. Tell to developer if this happen often enough.",
                    10);

                _sData = new StashData();
            }

            _inventDrop = new DropAllToInventory(this);

            DisplayData = new ItemDisplayData[8];

            for (var i = 0; i <= 7; i++)
            {
                DisplayData[i] = new ItemDisplayData();
            }

            UpdateItemsSetsInfo();

            Settings.WeaponTypePriority.SetListValues(new List <string> {
                "Two handed", "One handed"
            });

            Settings.CalcByFreeSpace.OnValueChanged += delegate { UpdateItemsSetsInfo(); };

            FrSetManagerPublishInformation = new FRSetManagerPublishInformation();
            //WorldItemsController.OnEntityAdded += args => EntityAdded(args.Entity);
            //WorldItemsController.OnEntityRemoved += args => EntityRemoved(args.Entity);
            //WorldItemsController.OnItemPicked += WorldItemsControllerOnOnItemPicked;
            return(true);
        }