static void Prefix(GhostCrafter __instance, TechType techType)
 {
     if (techType == TechType.Titanium && extraPowerConsumption > 0f)
     {
         CrafterLogic.ConsumeEnergy(__instance.powerRelay, extraPowerConsumption);
     }
 }
예제 #2
0
            static void craftFixEnergyConsumption(GhostCrafter __instance, TechType techType)
            {
                if (!Main.config.bulkCrafting.changePowerConsumption)
                {
                    return;
                }

                if (isAmountChanged(techType))
                {
                    CrafterLogic.ConsumeEnergy(__instance.powerRelay, (currentCraftAmount - 1) * 5f);                     // and 5f also consumed in the vanilla method
                }
            }