Exemplo n.º 1
0
        private void OnEquipmentAdded(string slot, InventoryItem item)
        {
            QuickLogger.Debug($"ModuleContainerOnAddItem Item Name {item.item.name}");

            if (item.item.GetTechType() == TechTypeHelper.BatteryAttachmentTechType())
            {
                _mono.AddAttachment(DeepDrillModules.Battery);
                _powerModuleAttached = true;
            }
            else if (item.item.GetTechType() == TechTypeHelper.SolarAttachmentTechType())
            {
                _mono.AddAttachment(DeepDrillModules.Solar);
                _powerModuleAttached = true;
            }
            else if (item.item.GetTechType() == TechTypeHelper.FocusAttachmentTechType())
            {
                _mono.AddAttachment(DeepDrillModules.Focus);
            }
            else if (item.item.GetTechType() == TechTypeHelper.DrillerMK1TechType())
            {
                _mono.OreGenerator.SetOresPerDay(QPatch.Configuration.Mk1OrePerDay);
                _upgradeAttached = true;
            }
            else if (item.item.GetTechType() == TechTypeHelper.DrillerMK2TechType())
            {
                _mono.OreGenerator.SetOresPerDay(QPatch.Configuration.Mk2OrePerDay);
                _upgradeAttached = true;
            }
            else if (item.item.GetTechType() == TechTypeHelper.DrillerMK3TechType())
            {
                _mono.OreGenerator.SetOresPerDay(QPatch.Configuration.Mk3OrePerDay);
                _upgradeAttached = true;
            }
        }