private bool IsAllowedToAdd(Pickupable pickupable, bool verbose) { bool flag = false; if (pickupable != null) { var filter = pickupable.gameObject.GetComponent <FCSTechFabricatorTag>(); if (filter != null) { if (pickupable.GetTechType() == TechTypeHelpers.AlienFecesTechType()) { flag = true; } if (pickupable.GetTechType() == TechTypeHelpers.GasTankTechType()) { flag = true; } } } QuickLogger.Debug($"Adding Item {flag} || {verbose}"); if (!flag && verbose) { ErrorMessage.AddMessage("Alterra Refrigeration Freon allowed only"); } return(flag); }
private void OnEquipmentAdded(string slot, InventoryItem item) { if (item.item.GetTechType() == TechTypeHelpers.GasTankTechType()) { AddFuel(FuelType.Gas); return; } if (item.item.GetTechType() == TechTypeHelpers.AlienFecesTechType()) { AddFuel(FuelType.AlienFeces); return; } }