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

Forge of the Gods continued #282

Merged
merged 58 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
53a1991
whole lotta plasmas
GDCloudstrike Mar 13, 2024
18fcaed
adjust plasma recipe times
GDCloudstrike Mar 14, 2024
fd135e6
fix up plasma nei page
GDCloudstrike Mar 14, 2024
411a424
change module names + very minor cleanup
GDCloudstrike Mar 14, 2024
a4c0cd5
refactor a bunch + add OC heat, energy discount, effective fuel facto…
GDCloudstrike Mar 15, 2024
43a5387
rework internal battery
GDCloudstrike Mar 16, 2024
a6b71cc
add graviton shard cost to upgrades
GDCloudstrike Mar 16, 2024
526ecdd
add module count restriction
GDCloudstrike Mar 17, 2024
14424e3
display module connection status in gui
GDCloudstrike Mar 17, 2024
f5c8797
add processing voltage calculations
GDCloudstrike Mar 17, 2024
d3fece4
add special overclock functionality
GDCloudstrike Mar 18, 2024
cf24c84
make nbt data sticky
GDCloudstrike Mar 18, 2024
959d59d
add exotic module bonuses & fix stacksize issue
GDCloudstrike Mar 19, 2024
18c1c4c
add module refresh and new logo
GDCloudstrike Mar 20, 2024
11afd00
add gorge logo and fix processing voltage
GDCloudstrike Mar 21, 2024
dd7fe9b
redo recipemap swapping
GDCloudstrike Mar 21, 2024
2851780
redo exotic module nei page
GDCloudstrike Mar 22, 2024
e5af2d4
add required upgrade check for modules
GDCloudstrike Mar 24, 2024
a666b4b
swap object types
GDCloudstrike Mar 24, 2024
0c83ab0
undo star import
GDCloudstrike Mar 24, 2024
f71cbbf
save milestone relevant stats
GDCloudstrike Mar 27, 2024
816f137
Merge branch 'master' into godforge_continued
GDCloudstrike Apr 4, 2024
dcc9fcc
add functionality and basic gui to milestones
GDCloudstrike Apr 18, 2024
857ed3b
undo star import
GDCloudstrike Apr 19, 2024
768c9b5
add new magmatter mechanic
GDCloudstrike Apr 20, 2024
4628c19
fix exotic module bonuses
GDCloudstrike Apr 20, 2024
6ed6c31
blacklist furnace mode from recipe milestone
GDCloudstrike Apr 21, 2024
0808a96
make milestones grant graviton shards
GDCloudstrike Apr 21, 2024
b909c7f
exotic module nei improvements
GDCloudstrike Apr 22, 2024
5965b51
new main and module structure
GDCloudstrike Apr 24, 2024
25a0f28
slight structure adjustment
GDCloudstrike Apr 25, 2024
5858f29
new module screen textures + fix furnace mode toggle sound
GDCloudstrike Apr 25, 2024
84b0d6f
add rings to structure
GDCloudstrike Apr 26, 2024
be2d0bd
small split upgrade check adjustment
GDCloudstrike Apr 26, 2024
bbe0e2c
lore dump v1 (thx deleno)
GDCloudstrike Apr 26, 2024
35dc7e1
add tooltip delay
GDCloudstrike Apr 27, 2024
9fb7e0e
base upgrade 101 off of new variable
GDCloudstrike Apr 27, 2024
84da9d2
technical text dump + some upgrade gui adjustments
GDCloudstrike Apr 27, 2024
7351aaf
minor structure adjustment
GDCloudstrike Apr 28, 2024
dca0cc8
structure adjustment followup + place button higher in upgrade window
GDCloudstrike Apr 28, 2024
440bc94
remove unused code
GDCloudstrike Apr 29, 2024
c946cce
rework milestone window & add inverted milestone + corresponding math
GDCloudstrike May 3, 2024
9e4be7f
minor structure adjustment
GDCloudstrike May 4, 2024
83782d4
add individual milestone windows + milestone symbol in upgrade BGs
GDCloudstrike May 4, 2024
fd6d046
fix long overflow in power tally
GDCloudstrike May 6, 2024
716a01d
more milestone ui work
GDCloudstrike May 7, 2024
f9aa9dd
fix input hatch npe
GDCloudstrike May 8, 2024
a330375
more milestone work
GDCloudstrike May 9, 2024
470b094
yet another structure adjustment
GDCloudstrike May 9, 2024
52f2a7a
add logic for structure milestone
GDCloudstrike May 10, 2024
517a3cf
add logic for structure milestone inversion
GDCloudstrike May 11, 2024
12aef47
small followup fixes
GDCloudstrike May 11, 2024
6ac8356
upgrade window text changes
GDCloudstrike May 11, 2024
501ab18
new debug button
GDCloudstrike May 11, 2024
9c9fd9f
lower max scroll distance to match the star
GDCloudstrike May 12, 2024
60ab30c
add startup cost
GDCloudstrike May 13, 2024
b43a0db
some startup cost fixes
GDCloudstrike May 15, 2024
f3b7d4a
primitive item insertion window
GDCloudstrike May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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