From fe0387946550f89a403b09f4e8cf6e43ee8f2e8f Mon Sep 17 00:00:00 2001 From: Maxim Date: Mon, 10 Jul 2023 10:13:04 +0200 Subject: Generic processing logic (#2096) * Added enumeration for check recipe result * Rework processing logic to work with MTEs too * Switched first few multiblocks to new checkRecipe method * Applied generic logic to EBF * Added support for long power base and applied generic processing logic to more machines * Address some feedback * Added more setter to further configure the processing logic * Change internal checkRecipe to work with checkRecipeResult, to allow the injection of custom failure messages * Suppress warning, change access * Merge recipeMap and mapSupplier * Move calls to setMetaTEController and setRecipeMap to base classes * Make processingLogic final * Make results non-null * Rename `ProcessingLogic#checkRecipe` -> `#validateRecipe` Otherwise it's confusing with `GT_MetaTileEntity_MultiBlockBase#checkRecipe` * oops * Added recipe locking to generic processing logic * Rename: getWorldObject -> getIHasWorldObjectAndCoords * Annotate missing overrides * Renamed recipeLockableController -> recipeLockableMachine * Migrated Cleanroom * Migrated pyrolyse oven * Migrated driller * Migrated charcoal pit * Migrated DT * Rename: controller -> machine * Make recipemaps override base `findRecipe` and mark others final * Remove unused maps * Add FindRecipeResult * Remove IHasWorldObjectAndCoords parameter from findRecipe This removes argument for printer recipemap to pass for GT_ModHandler.getAllRecipeOutput, but I don't think there's any mod that adds world-specific coloring recipe. * Added method to set processing logic power so machines can override it on demand * Restructure CheckRecipeResult, show voltage required and move package * Reword: insufficient voltage -> power * Change text color: dark gray -> gray * Added findRecipeResult for insufficient heat * Migrated PCB factory * Fix result not being reset on shut down * Show coil tier for heat * clean * Reverted migration of driller base * Migrated TPM * Moved getting of parallel supplier, to accomodate TPM * Migrated power gen multiblocks * Migrated Assembling Line * Migrated fusion * Migrated multi smelter * Migrated boiler * Migrated DTPF * Migrated ore factory * Migrated heat exchanger * Make checkRecipe() final, javadoc, minor cleanup * Fix overclock behavior with multiple hatches, javadoc, minor cleanup * Minor fix for javadoc * Fixed creation of OC calculator not factoring in batch mode correctly * Make GT_ParallelHelper#setRecipe nonnull * Rework SimpleCheckRecipeResult to not require registration * Migrate charcoal pit and cleanroom * Fix result not being reset when turning off machine * Add API for BW to make recipemap sensitive to special slot on recipe search * Migrated PA * Migrated driller base * Make ProcessingLogic#duration int * Minor cleanup * missing recipe locking for long multi * Fix NPE * Show crash message and turn off machine * minor javadoc fix * Fixed power setting for extended power base * Integrate SingleRecipeCheck into ProcessingLogic, fix duration overflow, fix duration for batch mode, migrate PA for GT_MetaTileEntity_ExtendedPowerMultiBlockBase * Fixed ME stocking busses * Minor PA fixes * Cleanup item collecting logic & apply to normal multi as well * Oversight * Derp * Multiple voltage instead of amperage with recipe map amperage, since usually amperage is intended for parallel, not for recipe checking * Fix missing EU modifiers on PCB factory OC calculator * Removed left over OC method * Fixed duration calculation of PCB not applying roughness multiplier * Fixed OC parameters * Make createOverclockCalculator nonnull & more nonnull annotations * Fixed input processing voltage * Round down voltage for other machines too * Revert Nano Forge, return correct long voltage * Use region / endregion --------- Co-authored-by: miozune --- src/main/resources/assets/gregtech/lang/en_US.lang | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/main/resources') diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index a4daa974f2..5f33f49162 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -228,6 +228,31 @@ GT5U.gui.button.lock_recipe=Lock Recipe GT5U.gui.button.down_tier=Down Tier GT5U.gui.button.tier=Tier: GT5U.gui.button.forbidden=§4Cannot change mode for this machine +GT5U.gui.text.success=§aProcessing recipe +GT5U.gui.text.generating=§aGenerating power +GT5U.gui.text.no_recipe=§7No valid recipe found +GT5U.gui.text.output_full=§7Not enough output space +GT5U.gui.text.none= +GT5U.gui.text.crash=§4Machine turned off due to crash +GT5U.gui.text.no_fuel=§7No valid fuel found +GT5U.gui.text.no_turbine=§7No valid turbine found +GT5U.gui.text.no_lubricant=§7No lubricant found +GT5U.gui.text.fuel_quality_too_high=§7Fuel quality too high to run without boost +GT5U.gui.text.no_data_sticks=§7No Data Sticks found +GT5U.gui.text.bio_upgrade_missing=§7Recipe needs Bio Upgrade to start +GT5U.gui.text.cleanroom_running=§aCleanroom running +GT5U.gui.text.no_machine=§7No valid processing machine +GT5U.gui.text.machine_mismatch=§7Machine doesn't match to locked recipe +GT5U.gui.text.high_gravity=§7Recipe needs low gravity +GT5U.gui.text.no_mining_pipe=§7Missing Mining Pipe +GT5U.gui.text.drilling=§aDrilling +GT5U.gui.text.extracting_pipe=§aExtracting pipe +GT5U.gui.text.retracting_pipe=§aRetracting pipe +GT5U.gui.text.power_overflow=§7Power overflowed +GT5U.gui.text.duration_overflow=§7Processing time overflowed +GT5U.gui.text.insufficient_power=§7Recipe needs more power to start. Required: %s EU/t (%s§7) +GT5U.gui.text.insufficient_heat=§7Recipe needs more heat to start. Required: %s K (%s§7) +GT5U.gui.text.insufficient_machine_tier=§7Recipe needs higher structure tier. Required: %s GT5U.item.programmed_circuit.select.header=Reprogram Circuit -- cgit