Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Forge of the Gods continued (#282)
Browse files Browse the repository at this point in the history
* whole lotta plasmas

* adjust plasma recipe times

* fix up plasma nei page

* change module names + very minor cleanup

* refactor a bunch + add OC heat, energy discount, effective fuel factor and misc module functionality

* rework internal battery

* add graviton shard cost to upgrades

* add module count restriction

* display module connection status in gui

* add processing voltage calculations

* add special overclock functionality

* make nbt data sticky

* add exotic module bonuses & fix stacksize issue

* add module refresh and new logo

* add gorge logo and fix processing voltage

* redo recipemap swapping

* redo exotic module nei page

* add required upgrade check for modules

* swap object types

* undo star import

* save milestone relevant stats

* add functionality and basic gui to milestones

* undo star import

* add new magmatter mechanic

* fix exotic module bonuses

* blacklist furnace mode from recipe milestone

* make milestones grant graviton shards

* exotic module nei improvements

* new main and module structure

* slight structure adjustment

* new module screen textures + fix furnace mode toggle sound

* add rings to structure

* small split upgrade check adjustment

* lore dump v1 (thx deleno)

* add tooltip delay

* base upgrade 101 off of new variable

* technical text dump + some upgrade gui adjustments

* minor structure adjustment

* structure adjustment followup + place button higher in upgrade window

* remove unused code

* rework milestone window & add inverted milestone + corresponding math

* minor structure adjustment

* add individual milestone windows + milestone symbol in upgrade BGs

* fix long overflow in power tally

* more milestone ui work

* fix input hatch npe

* more milestone work

* yet another structure adjustment

* add logic for structure milestone

* add logic for structure milestone inversion

* small followup fixes

* upgrade window text changes

* new debug button

* lower max scroll distance to match the star

* add startup cost

* some startup cost fixes

* primitive item insertion window
  • Loading branch information
GDCloudstrike authored May 22, 2024
1 parent 686d951 commit e32c6e0
Show file tree
Hide file tree
Showing 53 changed files with 12,657 additions and 3,493 deletions.
211 changes: 172 additions & 39 deletions src/main/java/com/github/technus/tectech/loader/recipe/Godforge.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2041,19 +2041,25 @@ public void run() {
new GT_MetaTileEntity_EM_ForgeOfGods(15411, "multimachine.em.forge_of_gods", "Forge of the Gods")
.getStackForm(1L));
Machine_Multi_SmeltingModule.set(
new GT_MetaTileEntity_EM_SmeltingModule(15412, "multimachine.em.smelting_module", "Smelting Module")
.getStackForm(1L));
new GT_MetaTileEntity_EM_SmeltingModule(
15412,
"multimachine.em.smelting_module",
"Helioflare Power Forge").getStackForm(1L));
Machine_Multi_MoltenModule.set(
new GT_MetaTileEntity_EM_MoltenModule(15413, "multimachine.em.molten_module", "Molten Module")
.getStackForm(1L));
new GT_MetaTileEntity_EM_MoltenModule(
15413,
"multimachine.em.molten_module",
"Helioflux Melting Core").getStackForm(1L));
Machine_Multi_PlasmaModule.set(
new GT_MetaTileEntity_EM_PlasmaModule(15414, "multimachine.em.plasma_module", "Plasma Module")
.getStackForm(1L));
new GT_MetaTileEntity_EM_PlasmaModule(
15414,
"multimachine.em.plasma_module",
"Heliothermal Plasma Fabricator").getStackForm(1L));
Machine_Multi_QuarkGluonPlasmaModule.set(
new GT_MetaTileEntity_EM_ExoticModule(
15415,
"multimachine.em.exotic_module",
"Exotic Matter Module").getStackForm(1L));
"Heliofusion Exoticizer").getStackForm(1L));
}

// ===================================================================================================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package com.github.technus.tectech.recipe;

import static com.github.technus.tectech.loader.recipe.Godforge.magmatterItemsForNEI;
import static com.github.technus.tectech.loader.recipe.Godforge.magmatterSpaceFluidItemsForNEI;
import static com.github.technus.tectech.loader.recipe.Godforge.magmatterTimeFluidItemsForNEI;
import static com.github.technus.tectech.loader.recipe.Godforge.quarkGluonFluidItemsForNEI;
import static com.github.technus.tectech.loader.recipe.Godforge.quarkGluonItemsForNEI;
import static gregtech.api.util.GT_Utility.trans;

import java.util.Collections;
import java.util.List;

import javax.annotation.ParametersAreNonnullByDefault;

import com.github.technus.tectech.thing.gui.TecTechUITextures;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;

import codechicken.nei.PositionedStack;
import gregtech.api.enums.MaterialsUEVplus;
import gregtech.api.recipe.BasicUIPropertiesBuilder;
import gregtech.api.recipe.NEIRecipePropertiesBuilder;
import gregtech.api.recipe.RecipeMapFrontend;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.MethodsReturnNonnullByDefault;
import gregtech.nei.GT_NEI_DefaultHandler;
import gregtech.nei.RecipeDisplayInfo;

@ParametersAreNonnullByDefault
Expand All @@ -25,6 +36,25 @@ public GodforgeExoticFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder,
super(uiPropertiesBuilder, neiPropertiesBuilder);
}

@Override
public void addGregTechLogo(ModularWindow.Builder builder, Pos2d windowOffset) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_GODFORGE_LOGO).setSize(18, 18)
.setPos(new Pos2d(151, 63).add(windowOffset)));
}

@Override
public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) {
if (neiCachedRecipe.mRecipe.mFluidOutputs[0].equals(MaterialsUEVplus.QuarkGluonPlasma.getFluid(1000))) {
neiCachedRecipe.mInputs.set(0, new PositionedStack(quarkGluonItemsForNEI, 48, 23, true));
neiCachedRecipe.mInputs.set(1, new PositionedStack(quarkGluonFluidItemsForNEI, 48, 52, true));
} else {
neiCachedRecipe.mInputs.set(0, new PositionedStack(magmatterItemsForNEI, 48, 23, true));
neiCachedRecipe.mInputs.set(1, new PositionedStack(magmatterSpaceFluidItemsForNEI, 30, 52, true));
neiCachedRecipe.mInputs.set(2, new PositionedStack(magmatterTimeFluidItemsForNEI, 48, 52, true));
}
}

@Override
public List<Pos2d> getItemInputPositions(int itemInputCount) {
return Collections.singletonList(new Pos2d(52, 33));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

import javax.annotation.ParametersAreNonnullByDefault;

import com.github.technus.tectech.thing.gui.TecTechUITextures;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;

import gregtech.api.recipe.BasicUIPropertiesBuilder;
import gregtech.api.recipe.NEIRecipePropertiesBuilder;
Expand All @@ -26,6 +29,13 @@ public GodforgePlasmaFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder,
super(uiPropertiesBuilder, neiPropertiesBuilder);
}

@Override
public void addGregTechLogo(ModularWindow.Builder builder, Pos2d windowOffset) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_GODFORGE_LOGO).setSize(18, 18)
.setPos(new Pos2d(151, 63).add(windowOffset)));
}

@Override
public List<Pos2d> getItemInputPositions(int itemInputCount) {
return Collections.singletonList(new Pos2d(52, 33));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,51 +266,19 @@ public static boolean addFOGPlasmaRecipe(FluidStack[] fluidInputs, FluidStack[]
return true;
}

public static boolean addFOGExoticFakeRecipe(Object[] itemInputs, Object[] fluidInputs, FluidStack[] fluidOutputs,
int machineDuration, int machineEUt, int recipeTier) {

if (itemInputs == null) {
itemInputs = nullItem;
}

if (fluidInputs == null) {
fluidInputs = nullFluid;
}

ItemStack[] inputItems = new ItemStack[itemInputs.length];
ItemStack[][] itemAlts = new ItemStack[itemInputs.length][];
for (int i = 0; i < itemInputs.length; i++) {
Object obj = itemInputs[i];
if (obj instanceof ItemStack) {
inputItems[i] = (ItemStack) obj;
itemAlts[i] = null;
} else if (obj instanceof ItemStack[]stacks) {
if (stacks.length > 0) {
inputItems[i] = stacks[0];
itemAlts[i] = Arrays.copyOf(stacks, stacks.length);
}
}
}

FluidStack[] inputFluids = new FluidStack[fluidInputs.length];
for (int i = 0; i < fluidInputs.length; i++) {
Object obj = fluidInputs[i];
if (obj instanceof FluidStack[]stacks) {
inputFluids[i] = stacks[0];
}
}
public static boolean addFOGExoticFakeRecipe(ItemStack[] itemInputs, FluidStack[] fluidInputs,
FluidStack[] fluidOutputs, int machineDuration, int machineEUt, int recipeTier) {

TecTechRecipeMaps.godforgeExoticMatterRecipes.addFakeRecipe(
false,
inputItems,
itemInputs,
null,
null,
inputFluids,
fluidInputs,
fluidOutputs,
machineDuration,
machineEUt,
recipeTier,
itemAlts,
false);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public static void init() {}
.neiHandlerInfo(builder -> builder.setDisplayStack(CustomItemList.Machine_Multi_Research.get(1))).build();

public static final RecipeMap<RecipeMapBackend> godforgePlasmaRecipes = RecipeMapBuilder.of("gt.recipe.fog_plasma")
.maxIO(1, 1, 1, 1).progressBar(TecTechUITextures.OVERLAY_BUTTON_ARROW_BLUE_UP, ProgressBar.Direction.RIGHT)
.progressBarPos(86, 44).neiTransferRect(86, 44, 20, 20).frontend(GodforgePlasmaFrontend::new).build();
.maxIO(1, 1, 1, 1).progressBar(TecTechUITextures.PROGRESSBAR_GODFORGE_PLASMA, ProgressBar.Direction.RIGHT)
.progressBarPos(78, 33).neiTransferRect(78, 33, 20, 20).frontend(GodforgePlasmaFrontend::new).build();
public static final RecipeMap<RecipeMapBackend> godforgeExoticMatterRecipes = RecipeMapBuilder
.of("gt.recipe.fog_exotic").maxIO(1, 1, 1, 1)
.progressBar(TecTechUITextures.OVERLAY_BUTTON_ARROW_BLUE_UP, ProgressBar.Direction.RIGHT)
.progressBarPos(86, 44).neiTransferRect(86, 44, 20, 20).frontend(GodforgeExoticFrontend::new).build();
.of("gt.recipe.fog_exotic").maxIO(1, 1, 2, 1)
.progressBar(TecTechUITextures.PROGRESSBAR_GODFORGE_PLASMA, ProgressBar.Direction.RIGHT)
.progressBarPos(78, 33).neiTransferRect(78, 33, 20, 20).frontend(GodforgeExoticFrontend::new).build();

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class TecTechUITextures {
public static final UITexture BACKGROUND_GLOW_PURPLE = UITexture.fullImage(MODID, "gui/background/purple_glow");
public static final UITexture BACKGROUND_GLOW_BLUE = UITexture.fullImage(MODID, "gui/background/blue_glow");
public static final UITexture BACKGROUND_GLOW_GREEN = UITexture.fullImage(MODID, "gui/background/green_glow");
public static final UITexture BACKGROUND_GLOW_WHITE = UITexture.fullImage(MODID, "gui/background/white_glow");
public static final UITexture BACKGROUND_SPACE = UITexture.fullImage(MODID, "gui/background/space");

public static final UITexture BUTTON_STANDARD_16x16 = UITexture.fullImage(MODID, "gui/button/standard_16x16");
public static final UITexture BUTTON_STANDARD_LIGHT_16x16 = UITexture
Expand Down Expand Up @@ -69,6 +71,12 @@ public class TecTechUITextures {
.fullImage(MODID, "gui/overlay_button/parametrizer_if");
public static final UITexture OVERLAY_BUTTON_ARROW_BLUE_UP = UITexture
.fullImage(MODID, "gui/overlay_button/arrow_blue_up");
public static final UITexture OVERLAY_BUTTON_BATTERY_ON = UITexture
.fullImage(MODID, "gui/overlay_button/battery_on");
public static final UITexture OVERLAY_BUTTON_BATTERY_OFF = UITexture
.fullImage(MODID, "gui/overlay_button/battery_off");
public static final UITexture OVERLAY_BUTTON_FLAG = UITexture.fullImage(MODID, "gui/overlay_button/flag");
public static final UITexture OVERLAY_CYCLIC_BLUE = UITexture.fullImage(MODID, "gui/overlay_button/cyclic_blue");

public static final UITexture OVERLAY_SLOT_RACK = UITexture.fullImage(MODID, "gui/overlay_slot/rack");
public static final UITexture OVERLAY_SLOT_MESH = UITexture.fullImage(MODID, "gui/overlay_slot/mesh");
Expand All @@ -79,10 +87,31 @@ public class TecTechUITextures {
.fullImage(MODID, "gui/progressbar/research_station_2");
public static final UITexture PROGRESSBAR_RESEARCH_STATION_3 = UITexture
.fullImage(MODID, "gui/progressbar/research_station_3");
public static final UITexture PROGRESSBAR_GODFORGE_PLASMA = UITexture
.fullImage(MODID, "gui/progressbar/godforge_plasma");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_BACKGROUND = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_background");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_BLUE = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_blue");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_RED = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_red");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_PURPLE = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_purple");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_RAINBOW = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_rainbow");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_BLUE_INVERTED = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_blue_inverted");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_RED_INVERTED = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_red_inverted");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_PURPLE_INVERTED = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_purple_inverted");
public static final UITexture PROGRESSBAR_GODFORGE_MILESTONE_RAINBOW_INVERTED = UITexture
.fullImage(MODID, "gui/progressbar/godforge_progressbar_rainbow_inverted");

public static final UITexture PICTURE_TECTECH_LOGO = UITexture.fullImage(MODID, "gui/picture/tectech_logo");
public static final UITexture PICTURE_TECTECH_LOGO_DARK = UITexture
.fullImage(MODID, "gui/picture/tectech_logo_dark");
public static final UITexture PICTURE_GODFORGE_LOGO = UITexture.fullImage(MODID, "gui/picture/gorge_logo");
public static final UITexture PICTURE_RACK_LARGE = UITexture.fullImage(MODID, "gui/picture/rack_large");
public static final UITexture PICTURE_HEAT_SINK = UITexture.fullImage(MODID, "gui/picture/heat_sink");
public static final UITexture PICTURE_UNCERTAINTY_MONITOR = UITexture
Expand Down Expand Up @@ -123,4 +152,25 @@ public class TecTechUITextures {
public static final UITexture PICTURE_UPGRADE_CONNECTOR_SWITCH = UITexture
.fullImage(MODID, "gui/picture/connector_switch");
public static final UITexture SLOT_OUTLINE_GREEN = UITexture.fullImage(MODID, "gui/picture/green_selector");
public static final UITexture PICTURE_GODFORGE_MILESTONE_CHARGE = UITexture
.fullImage(MODID, "gui/picture/milestone_charge");
public static final UITexture PICTURE_GODFORGE_MILESTONE_CONVERSION = UITexture
.fullImage(MODID, "gui/picture/milestone_conversion");
public static final UITexture PICTURE_GODFORGE_MILESTONE_CATALYST = UITexture
.fullImage(MODID, "gui/picture/milestone_catalyst");
public static final UITexture PICTURE_GODFORGE_MILESTONE_COMPOSITION = UITexture
.fullImage(MODID, "gui/picture/milestone_composition");
public static final UITexture PICTURE_GODFORGE_MILESTONE_CHARGE_GLOW = UITexture
.fullImage(MODID, "gui/picture/milestone_charge_glow");
public static final UITexture PICTURE_GODFORGE_MILESTONE_CONVERSION_GLOW = UITexture
.fullImage(MODID, "gui/picture/milestone_conversion_glow");
public static final UITexture PICTURE_GODFORGE_MILESTONE_CATALYST_GLOW = UITexture
.fullImage(MODID, "gui/picture/milestone_catalyst_glow");
public static final UITexture PICTURE_GODFORGE_MILESTONE_COMPOSITION_GLOW = UITexture
.fullImage(MODID, "gui/picture/milestone_composition_glow");
public static final UITexture PICTURE_OVERLAY_BLUE = UITexture.fullImage(MODID, "gui/picture/overlay_blue");
public static final UITexture PICTURE_OVERLAY_ORANGE = UITexture.fullImage(MODID, "gui/picture/overlay_orange");
public static final UITexture PICTURE_OVERLAY_GREEN = UITexture.fullImage(MODID, "gui/picture/overlay_green");
public static final UITexture PICTURE_OVERLAY_PURPLE = UITexture.fullImage(MODID, "gui/picture/overlay_purple");

}
Loading

0 comments on commit e32c6e0

Please sign in to comment.