Skip to content

Commit

Permalink
Merge pull request #298 from Nxer/main
Browse files Browse the repository at this point in the history
sync from main
  • Loading branch information
Nxer authored Mar 11, 2024
2 parents 1624228 + 25395f9 commit 7cf3a9d
Show file tree
Hide file tree
Showing 15 changed files with 549 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public enum GTCMItemList {
MegaMacerator,
HephaestusAtelier,
DeployedNanoCore,
CoreDeviceOfHumanPowerGenerationFacility,

// MAX
HighDimensionalExtend,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ public boolean isCorrectMachinePart(ItemStack aStack) {
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
repairMachine();
coilLevel = HeatingCoilLevel.None;
// this.casingAmountActual = 0; // re-init counter
return checkPiece(STRUCTURE_PIECE_MAIN, horizontalOffSet, verticalOffSet, depthOffSet);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public RecipeMap<?> getRecipeMap() {
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
repairMachine();
coilLevel = HeatingCoilLevel.None;

this.piece = 0;

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.Nxer.TwistSpaceTechnology.common.machine;

import com.github.bartimaeusnek.crossmod.galacticgreg.GT_TileEntity_VoidMiner_Base;

import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;

public class TST_MegaVoidMiner extends GT_TileEntity_VoidMiner_Base {

// region Class Constructor
public TST_MegaVoidMiner(int aID, String aName, String aNameRegional, int tier) {
super(aID, aName, aNameRegional, tier);
}

public TST_MegaVoidMiner(String aName, int tier) {
super(aName, tier);
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new TST_MegaVoidMiner(this.mName, this.TIER_MULTIPLIER);
}
// endregion

// region Processing Logic

// endregion

// region Structure

// endregion

// region General

@Override
protected ItemList getCasingBlockItem() {
return null;
}

@Override
protected Materials getFrameMaterial() {
return null;
}

@Override
protected int getCasingTextureIndex() {
return 0;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class Config {
public static final String MegaMacerator = "HouseholdCellFragmentizer";
public static final String HephaestusAtelier = "HephaestusAtelier";
public static final String DeployedNanoCore = "DeployedNanoCore";
public static final String CoreDeviceOfHumanPowerGenerationFacility = "CoreDeviceOfHumanPowerGenerationFacility";
public static final String SingleBlocks = "SingleBlocks";

public static final String spaceStation="spaceStation";
Expand Down Expand Up @@ -260,6 +261,10 @@ public class Config {
public static int TickPerProgressing_WirelessMode_DeployedNanoCore = 128;
// endregion

// region CoreDeviceOfHumanPowerGenerationFacility
public static boolean Enable_CoreDeviceOfHumanPowerGenerationFacility = true;
// endregion

// region Infinite Air Hatch

public static double secondsOfInfiniteAirHatchFillFull = 1;
Expand All @@ -276,6 +281,10 @@ public static void synchronizeConfiguration(File configFile) {
MAX_PARALLEL_LIMIT = configuration.getInt("MAX_PARALLEL_LIMIT", GENERAL, MAX_PARALLEL_LIMIT, 1, Integer.MAX_VALUE, "Max parallel limit of normal machines.");
// endregion

// region CoreDeviceOfHumanPowerGenerationFacility
Enable_CoreDeviceOfHumanPowerGenerationFacility = configuration.getBoolean("Enable_CoreDeviceOfHumanPowerGenerationFacility", CoreDeviceOfHumanPowerGenerationFacility, Enable_CoreDeviceOfHumanPowerGenerationFacility, "Enable Core Device of Human Power Generation Facility.");
// endregion

// region DeployedNanoCore
Enable_DeployedNanoCore = configuration.getBoolean("Enable_DeployedNanoCore", DeployedNanoCore, Enable_DeployedNanoCore, "Enable Deployed Nano Core.");
TickPerProgressing_WirelessMode_DeployedNanoCore = configuration.getInt("TickPerProgressing_WirelessMode_DeployedNanoCore", DeployedNanoCore, TickPerProgressing_WirelessMode_DeployedNanoCore, 1, 65536, "How many ticks per progressing cost in Wireless mode of Deployed Nano Core. Type: int");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.Nxer.TwistSpaceTechnology.common.machine.TST_BiosphereIII;
import com.Nxer.TwistSpaceTechnology.common.machine.TST_CleanRoom;
import com.Nxer.TwistSpaceTechnology.common.machine.TST_Computer;
import com.Nxer.TwistSpaceTechnology.common.machine.TST_CoreDeviceOfHumanPowerGenerationFacility;
import com.Nxer.TwistSpaceTechnology.common.machine.TST_DeployedNanoCore;
import com.Nxer.TwistSpaceTechnology.common.machine.TST_EyeOfWood;
import com.Nxer.TwistSpaceTechnology.common.machine.TST_HephaestusAtelier;
Expand Down Expand Up @@ -55,6 +56,7 @@
import com.Nxer.TwistSpaceTechnology.system.DysonSphereProgram.machines.TST_DSPLauncher;
import com.Nxer.TwistSpaceTechnology.system.DysonSphereProgram.machines.TST_DSPReceiver;
import com.Nxer.TwistSpaceTechnology.system.OreProcess.machines.TST_OreProcessingFactory;
import com.Nxer.TwistSpaceTechnology.util.TextEnums;
import com.Nxer.TwistSpaceTechnology.util.TextLocalization;
import com.Nxer.TwistSpaceTechnology.util.Utils;

Expand Down Expand Up @@ -101,6 +103,7 @@ public class MachineLoader {
public static ItemStack MegaMacerator;
public static ItemStack HephaestusAtelier;
public static ItemStack DeployedNanoCore;
public static ItemStack CoreDeviceOfHumanPowerGenerationFacility;

// Single Block
public static ItemStack InfiniteAirHatch;
Expand Down Expand Up @@ -380,6 +383,15 @@ public static void loadMachines() {
GTCMItemList.DeployedNanoCore.set(DeployedNanoCore);
}

//
if (Config.Enable_CoreDeviceOfHumanPowerGenerationFacility) {
CoreDeviceOfHumanPowerGenerationFacility = new TST_CoreDeviceOfHumanPowerGenerationFacility(
19039,
"NameCoreDeviceOfHumanPowerGenerationFacility",
TextEnums.NameCoreDeviceOfHumanPowerGenerationFacility.toString()).getStackForm(1);
GTCMItemList.CoreDeviceOfHumanPowerGenerationFacility.set(CoreDeviceOfHumanPowerGenerationFacility);
}

// endregion

// region Single block Machine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,29 @@ public void loadRecipes() {
.addTo(GTCMRecipe.MiracleTopRecipes);
}
// endregion

// region CoreDeviceOfHumanPowerGenerationFacility
if (Config.Enable_CoreDeviceOfHumanPowerGenerationFacility) {
GT_Values.RA
.stdBuilder()
.itemInputs(
GT_Utility.getIntegratedCircuit(10),
CustomItemList.FluidHeaterUV.get(64),
ItemList.Electric_Pump_UV.get(64),

GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 64),
new Object[]{OrePrefixes.circuit.get(Materials.SuperconductorUHV), 32},
HighEnergyFlowCircuit.get(32),

GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 64)
)
.fluidInputs(new FluidStack(solderPlasma, 144*64))
.itemOutputs(GTCMItemList.CoreDeviceOfHumanPowerGenerationFacility.get(1))
.eut(RECIPE_UV)
.duration(20*900)
.addTo(assembler);
}
// endregion
}
// spotless:on
}
Original file line number Diff line number Diff line change
Expand Up @@ -894,15 +894,15 @@ public void loadRecipes() {
MyMaterial.wasteLiquid.getFluidOrGas(1000*160)
)
.specialValue(11700)
.eut(RECIPE_LuV)
.eut(RECIPE_ZPM)
.duration(20 * 1425)
.addTo(ICD);

// Enriched Naquadah
TST_RecipeBuilder
.builder()
.itemInputs(
copyAmount(0, Materials.Silver.getNanite(1)),
copyAmount(0, Materials.Neutronium.getNanite(1)),
setStackSize(MyMaterial.enrichedNaquadahEarth.get(OrePrefixes.dust,1), 220),
setStackSize(Materials.Sulfur.getDust(1), 102)
)
Expand All @@ -918,15 +918,15 @@ public void loadRecipes() {
MyMaterial.wasteLiquid.getFluidOrGas(1000*60)
)
.specialValue(11700)
.eut(RECIPE_LuV * 2)
.eut(RECIPE_ZPM)
.duration(20 * 228)
.addTo(ICD);

// Naquadria
TST_RecipeBuilder
.builder()
.itemInputs(
copyAmount(0, Materials.Silver.getNanite(1)),
copyAmount(0, Materials.Neutronium.getNanite(1)),
setStackSize(MyMaterial.naquadriaEarth.get(OrePrefixes.dust,1), 100),
setStackSize(Materials.Phosphorus.getDust(1), 95)
)
Expand All @@ -940,11 +940,87 @@ public void loadRecipes() {
Materials.Naquadria.getMolten(144*100),
Materials.Oxygen.getGas(1000*276)
)
.specialValue(12600)
.specialValue(11700)
.eut(RECIPE_ZPM)
.duration(20 * 100)
.addTo(ICD);

// Naquadah
TST_RecipeBuilder
.builder()
.itemInputs(
copyAmount(0, Materials.Gold.getNanite(1)),
setStackSize(MyMaterial.naquadahEarth.get(OrePrefixes.dust,1), 480),
setStackSize(Materials.Sodium.getDust(1), 112)
)
.fluidInputs(Materials.Fluorine.getGas(1000*800))
.itemOutputs(
MyMaterial.enrichedNaquadahEarth.get(OrePrefixes.dust, 25),
setStackSize(Materials.Gallium.getDust(1), 960),
setStackSize(Materials.Adamantium.getDust(1), 384),
setStackSize(Materials.Sulfur.getDust(1), 1210)
)
.fluidOutputs(
Materials.Naquadah.getMolten(144*960),
Materials.NaquadahEnriched.getMolten(144*225),
Materials.Naquadria.getMolten(144*30),
Materials.Titanium.getMolten(144*480),
Materials.Hydrogen.getGas(1000*3368),
Materials.Oxygen.getGas(1000*5816),
MyMaterial.wasteLiquid.getFluidOrGas(1000*160)
)
.specialValue(12600)
.eut(RECIPE_UV)
.duration(2 * 1425)
.addTo(ICD);

// Enriched Naquadah
TST_RecipeBuilder
.builder()
.itemInputs(
copyAmount(0, Materials.Gold.getNanite(1)),
setStackSize(MyMaterial.enrichedNaquadahEarth.get(OrePrefixes.dust,1), 220),
setStackSize(Materials.Sulfur.getDust(1), 10)
)
.fluidInputs(Materials.Oxygen.getGas(1000*288))
.itemOutputs(
MyMaterial.naquadahEarth.get(OrePrefixes.dust, 60),
Materials.Trinium.getDust(10)
)
.fluidOutputs(
Materials.NaquadahEnriched.getMolten(144*180),
Materials.Naquadria.getMolten(144*24),
Materials.Hydrogen.getGas(1000*600),
MyMaterial.wasteLiquid.getFluidOrGas(1000*60)
)
.specialValue(12600)
.eut(RECIPE_UV)
.duration(2 * 228)
.addTo(ICD);

// Naquadria
TST_RecipeBuilder
.builder()
.itemInputs(
copyAmount(0, Materials.Gold.getNanite(1)),
setStackSize(MyMaterial.naquadriaEarth.get(OrePrefixes.dust,1), 100),
setStackSize(Materials.Phosphorus.getDust(1), 9)
)
.itemOutputs(
MyMaterial.enrichedNaquadahEarth.get(OrePrefixes.dust, 50),
Materials.Barium.getDust(2),
Materials.Indium.getDust(5),
setStackSize(Materials.Sulfur.getDust(1), 102)
)
.fluidOutputs(
Materials.Naquadria.getMolten(144*100),
Materials.Oxygen.getGas(1000*276)
)
.specialValue(12600)
.eut(RECIPE_UV)
.duration(2 * 100)
.addTo(ICD);

// endregion

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public boolean tryDecreaseUsedPowerPoint(long amount){
* @return True means success; <p>False means nothing happened, request failed.</p>
*/
public boolean tryUsePowerPoint(long amount){
// TODO add Big Integer calculation
if (this.canUsePowerPoint(amount)){
markDataDirty();
this.markDirty();
Expand Down
20 changes: 19 additions & 1 deletion src/main/java/com/Nxer/TwistSpaceTechnology/util/TextEnums.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,28 @@
*/
public enum TextEnums {

// region General

// #tr AddByTwistSpaceTechnology
// # Added by {\GREEN}Twist Space Technology{\GRAY}
// #zh_CN 由 {\GREEN}Twist Space Technology{\GRAY} 添加
AddByTwistSpaceTechnology("AddByTwistSpaceTechnology");
AddByTwistSpaceTechnology("AddByTwistSpaceTechnology"),
SpeedMultiplier("MachineInfoData.SpeedMultiplier"),
Parallels("MachineInfoData.Parallels"),
EuModifier("MachineInfoData.EuModifier"),
GlassTier("MachineInfoData.GlassTier"),

// endregion

// region Core Device of Human Power Generation Facility

// #tr NameCoreDeviceOfHumanPowerGenerationFacility
// # Core Device of Human Power Generation Facility
// #zh_CN 人类能源设施的核心装置
NameCoreDeviceOfHumanPowerGenerationFacility("NameCoreDeviceOfHumanPowerGenerationFacility")
// endregion

;

public static String tr(String key) {
return translateToLocalFormatted(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

// spotless:off
/**
* See <a href="https://github.com/Nxer/Twist-Space-Technology-Mod/pull/284">This PR: Use a preprocessor to help complete the creation of language files</a>
* Use {@link com.Nxer.TwistSpaceTechnology.util.TextEnums}
* <p>See <a href="https://github.com/Nxer/Twist-Space-Technology-Mod/pull/284">This PR: Use a preprocessor to help complete the creation of language files</a>
*/
@Deprecated
public class TextLocalization {
Expand Down Expand Up @@ -378,7 +379,7 @@ public class TextLocalization {
public static final String Tooltip_DSPReceiver_02_05 = texter("Converted to remaining time of intensify mode.","Tooltip_DSPReceiver_02_05");
public static final String Tooltip_DSPReceiver_02_06 = texter("Requesting ratio = Integrated Circuit Number / Stack Size","Tooltip_DSPReceiver_02_06");
public static final String Tooltip_DSPReceiver_02_07 = texter("Put §b§l§oAstral Array Fabricator§7 into controller slot then this machine can request over 1024A Max power point.","Tooltip_DSPReceiver_02_07");
public static final String Tooltip_DSPReceiver_02_08 = texter("Final requesting power point limit = Astral Array Fabricator amount * 1024A Max","Tooltip_DSPReceiver_02_08");
public static final String Tooltip_DSPReceiver_02_08 = texter("Final requesting power point limit = Astral Array Fabricator amount * 2048A Max","Tooltip_DSPReceiver_02_08");

// endregion

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.Nxer.TwistSpaceTechnology.util.enums;

public class TierName {

public static final String[] VoltageName = { "ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV",
"UIV", "UMV", "UXV", "MAX", "ERROR" };

public static String getVoltageName(int tier) {
if (tier < 0) throw new IllegalArgumentException("tier < 0");
if (tier >= VoltageName.length) return "ERROR";
return VoltageName[tier];
}
}
7 changes: 6 additions & 1 deletion src/main/resources/assets/gtnhcommunitymod/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Tooltip_DSPReceiver_02_04=Graviton Lens will be consumed immediately upon input.
Tooltip_DSPReceiver_02_05=Converted to enhancement mode duration.
Tooltip_DSPReceiver_02_06=Request ratio = Programmed Circuit Number / Stack Size
Tooltip_DSPReceiver_02_07=Put §b§l§oAstral Array Fabricator§7 into controller slot then this machine can request over 1024A Max power point.
Tooltip_DSPReceiver_02_08=Final requesting power point limit = Astral Array Fabricator amount * 1024A Max
Tooltip_DSPReceiver_02_08=Final requesting power point limit = Astral Array Fabricator amount * 2048A Max
Tooltip_ArtificialStar_MachineType=Dyson Sphere Program: Annihilation Generator
Tooltip_ArtificialStar_00=§d§lAll you have to do is just let the positive and negative proton beams pass
Tooltip_ArtificialStar_01=§d§l silently through the magnetic field from both ends into the confining sphere, easy peasy!
Expand Down Expand Up @@ -843,3 +843,8 @@ BufferedEnergyHatch.Tooltips.01=Buffered Energy Injector for Multiblocks
BufferedEnergyHatch.Tooltips.02=Accepts up to 2 Amps
Slots=Slots
AddByTwistSpaceTechnology=Added by §aTwist Space Technology§7
NameCoreDeviceOfHumanPowerGenerationFacility=Core Device of Human Power Generation Facility
Tooltip_CoreDeviceOfHumanPowerGenerationFacility_MachineType=Fluid Heater
Tooltip_CoreDeviceOfHumanPowerGenerationFacility_Controller=Controller block for the Core Device of Human Power Generation Facility
Tooltip_CoreDeviceOfHumanPowerGenerationFacility_01=§cThe use of "The Fast-Heater" is prohibited in the dormitories.
Tooltip_CoreDeviceOfHumanPowerGenerationFacility_02=Upgrade coils for faster speeds.
Loading

0 comments on commit 7cf3a9d

Please sign in to comment.