Skip to content

Commit

Permalink
More recipes, reactivated achievements.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSVK12 committed Jan 16, 2024
1 parent 09236e9 commit 317a61b
Show file tree
Hide file tree
Showing 7 changed files with 363 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import sunsetsatellite.signalindustries.items.containers.ItemSignalumSaber;
import sunsetsatellite.signalindustries.items.attachments.ItemPulsarAttachment;
import sunsetsatellite.signalindustries.items.attachments.ItemTieredAttachment;
import sunsetsatellite.signalindustries.misc.SignalIndustriesAchievementPage;
import sunsetsatellite.signalindustries.render.*;
import sunsetsatellite.signalindustries.util.AttachmentPoint;
import sunsetsatellite.signalindustries.util.BlockTexture;
Expand Down Expand Up @@ -749,7 +750,7 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint {
public static final ItemSignalumPowerSuit signalumPowerSuitLeggings = (ItemSignalumPowerSuit) ItemHelper.createItem(MOD_ID,new ItemSignalumPowerSuit("reinforced.signalumpowersuit.leggings",config.getInt("ItemIDs.signalumPowerSuitLeggings"),armorSignalumPowerSuit,2,Tier.REINFORCED),"reinforced.signalumpowersuit.leggings","signalumpowersuit_leggings.png");
public static final ItemSignalumPowerSuit signalumPowerSuitBoots = (ItemSignalumPowerSuit) ItemHelper.createItem(MOD_ID,new ItemSignalumPowerSuit("reinforced.signalumpowersuit.boots",config.getInt("ItemIDs.signalumPowerSuitBoots"),armorSignalumPowerSuit,3,Tier.REINFORCED),"reinforced.signalumpowersuit.boots","signalumpowersuit_boots.png");

public static final Item testingAttachment = ItemHelper.createItem(MOD_ID,new ItemAttachment(config.getInt("ItemIDs.testingAttachment"), listOf(AttachmentPoint.ANY)),"attachment.testingAttachment","energyorb.png");
//public static final Item testingAttachment = ItemHelper.createItem(MOD_ID,new ItemAttachment(config.getInt("ItemIDs.testingAttachment"), listOf(AttachmentPoint.ANY)),"attachment.testingAttachment","energyorb.png");
public static final Item pulsarAttachment = ItemHelper.createItem(MOD_ID,new ItemPulsarAttachment(config.getInt("ItemIDs.pulsarAttachment"), listOf(AttachmentPoint.ARM_FRONT), Tier.REINFORCED),"reinforced.attachment.pulsar","pulsar_attachment.png").setMaxStackSize(1);
public static final Item extendedEnergyPack = ItemHelper.createItem(MOD_ID,new ItemTieredAttachment(config.getInt("ItemIDs.extendedEnergyPack"), listOf(AttachmentPoint.CORE_BACK), Tier.REINFORCED),"reinforced.attachment.extendedEnergyPack","extended_energy_pack.png").setMaxStackSize(1);

Expand All @@ -759,7 +760,7 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint {
public static final SuitBaseAbility boostAbility = new BoostAbility();
public static final SuitBaseAbility projectileAbility = new ProjectileAbility();

public static final Item testingAbilityContainer = ItemHelper.createItem(MOD_ID,new ItemWithAbility(config.getInt("ItemIDs.testingAbilityContainer"),testEffectAbility),"testingAbilityItem","testingability.png");
//public static final Item testingAbilityContainer = ItemHelper.createItem(MOD_ID,new ItemWithAbility(config.getInt("ItemIDs.testingAbilityContainer"),testEffectAbility),"testingAbilityItem","testingability.png");
//public static final Item clockworkAbilityContainer = ItemHelper.createItem(MOD_ID,new ItemWithAbility(config.getInt("ItemIDs.clockworkAbilityContainer"),clockworkAbility),"clockworkAbilityContainer","ability12.png");
public static final Item boostAbilityContainer = ItemHelper.createItem(MOD_ID,new ItemWithAbility(config.getInt("ItemIDs.boostAbilityContainer"),boostAbility),"boostAbilityContainer","ability2.png");
public static final Item projectileAbilityContainer = ItemHelper.createItem(MOD_ID,new ItemWithAbility(config.getInt("ItemIDs.projectileAbilityContainer"),projectileAbility),"projectileAbilityContainer","ability1.png");
Expand Down Expand Up @@ -793,6 +794,7 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint {
public static final Item attachmentPoint = simpleItem("attachmentPoint","attachment_point.png");
public static final Item meteorTracker = ItemHelper.createItem(MOD_ID,new ItemMeteorTracker(config.getInt("ItemIDs.meteorTracker")),"meteorTracker","meteor_tracker_uncalibrated.png");
public static final Item blankAbilityModule = simpleItem("blankAbilityModule","blank_module.png");
public static final Item abilityContainerCasing = simpleItem("abilityContainerCasing","abilitycontainercasing.png");


public static final int[] energyOrbTex = TextureHelper.getOrCreateItemTexture(MOD_ID,"energyorb.png");
Expand All @@ -801,7 +803,7 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint {
public static final Weather weatherEclipse = new WeatherEclipse(11).setLanguageKey("solarEclipse");
public static final Weather weatherSolarApocalypse = new WeatherSolarApocalypse(12).setLanguageKey("solarApocalypse");

public static final AchievementPage ACHIEVEMENTS = null; //new SignalIndustriesAchievementPage();
public static final AchievementPage ACHIEVEMENTS = new SignalIndustriesAchievementPage();

public static final Biome biomeEternity = Biomes.register("signalindustries:eternity",new Biome().setFillerBlock(realityFabric.id).setTopBlock(realityFabric.id).setColor(0x808080));
public static final WorldType eternityWorld = WorldTypes.register("signalindustries:eternity",new WorldTypeEternity(key("eternity")));
Expand Down Expand Up @@ -864,8 +866,6 @@ public void onInitialize() {
}

public SignalIndustries(){

//AchievementHelper.addPage(ACHIEVEMENTS);
//RecipeFIleLoader.load("/assets/signalindustries/recipes/recipes.txt",mapOf(new String[]{"SignalIndustries"},new String[]{"sunsetsatellite.signalindustries.SignalIndustries"}));
BlockModelDispatcher.getInstance().addDispatch(dilithiumRail,new BlockModelRenderBlocks(9));
BlockModelDispatcher.getInstance().addDispatch(energyStill,new BlockModelRenderBlocks(4));
Expand Down Expand Up @@ -1119,6 +1119,7 @@ public void beforeGameStart() {

@Override
public void afterGameStart() {
AchievementHelper.addPage(ACHIEVEMENTS);
OptionsCategory category = new OptionsCategory("gui.options.page.controls.category.signalindustries");
category
.withComponent(new KeyBindingComponent(((IKeybinds) Minecraft.getMinecraft(Minecraft.class).gameSettings).signalIndustries$getKeyOpenSuit()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public CrystalCutterPage(GuidebookSection section, ArrayList<RecipeEntryMachine>
return false;
}).collect(Collectors.toList());

if(acceptedMachines.isEmpty()){
continue;
}

outputSymbol = new RecipeSymbol(recipe.getOutput());
recipeSlots.add(new SlotGuidebook(0, (width/2)-52, 36*(map.size()+1)-16, inputSymbol.get(0), false,recipe));
recipeSlots.add(new SlotGuidebook(1, (width/2)-32, 36*(map.size()+1)-16, inputSymbol.get(1), false,recipe));
Expand Down Expand Up @@ -112,6 +116,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
for (int i = 1; i <= recipes.size(); i++) {
RecipeEntryMachine recipe = recipes.get(i-1);
List<SlotGuidebook> list = map.get(recipe);
if(list == null || list.isEmpty()){
continue;
}
drawStringCenteredNoShadow(fr,recipe.getData().ticks+"t | ID: "+recipe.getData().id,x + list.get(list.size()-1).xDisplayPosition - 20, y + list.get(list.size()-1).yDisplayPosition + 18,0xFF202020);
drawStringCenteredNoShadow(fr,recipe.getData().cost+" sE",x + list.get(list.size()-1).xDisplayPosition - 20, y + list.get(list.size()-1).yDisplayPosition + 26,0xFFCC0000);

Expand All @@ -137,6 +144,9 @@ protected void renderBackground(RenderEngine re, int x, int y) {
for (int i = 1; i <= recipes.size(); i++) {
RecipeEntryMachine recipe = recipes.get(i-1);
List<SlotGuidebook> list = map.get(recipe);
if(list == null || list.isEmpty()){
continue;
}
drawTexturedModalRect(x + list.get(list.size()-1).xDisplayPosition - 32, y + list.get(list.size()-1).yDisplayPosition, 90, 35, 22, 15);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void addRecipes(RecipeGroup<RecipeEntryMachine> group) {
new RecipeExtendedSymbol(new ItemStack(SignalIndustries.signalumCrystal,1))
},
new ItemStack(SignalIndustries.pureCrystalChip,2,0),
new RecipeProperties(100,80,2, Tier.BASIC,false)
new RecipeProperties(100,80,2, Tier.REINFORCED,false)
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
import sunsetsatellite.signalindustries.recipes.entry.RecipeEntryMachineFluid;
import turniplabs.halplibe.util.RecipeEntrypoint;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class SIRecipes implements RecipeEntrypoint {
public static final RecipeNamespaceSI SIGNAL_INDUSTRIES = new RecipeNamespaceSI();
Expand All @@ -36,6 +38,10 @@ public void onRecipesReady() {
new SignalIndustriesFluidPlugin().initializePlugin(SignalIndustries.LOGGER);
Registries.RECIPE_TYPES.register("signalindustries:machine", RecipeEntryMachine.class);
Registries.RECIPE_TYPES.register("signalindustries:machine/fluid", RecipeEntryMachineFluid.class);
List<ItemStack> abilityGroup = new ArrayList<>();
abilityGroup.add(SignalIndustries.boostAbilityContainer.getDefaultStack());
abilityGroup.add(SignalIndustries.projectileAbilityContainer.getDefaultStack());
Registries.ITEM_GROUPS.register("signalindustries:ability_containers",abilityGroup);
new ExtractorRecipes().addRecipes(EXTRACTOR);
new CrusherRecipes().addRecipes(CRUSHER);
new AlloySmelterRecipes().addRecipes(ALLOY_SMELTER);
Expand Down
9 changes: 6 additions & 3 deletions src/main/resources/achievements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Find a meteor containing Dilithium Shards.
Interdimensional
Discover crystallized reality - the Dimensional Shard.

BOOST
BOOST BOOST BOOST
Craft the Dilithium Booster to speed up your machines.

New Horizons
Expand All @@ -70,7 +70,7 @@ Construct your first multiblock.
Anchored
Build the Dimensional Anchor multiblock to help you encode warp orbs.

Ticket to Everywhere and Nowhere
One-way Ticket To Anywhere
Create a Warp Orb.

Tearing Spacetime
Expand All @@ -83,13 +83,16 @@ Under a Dead Sky
Take a look around Eternity and find out what it has to offer.

False Eternity
Escape Eternity without dying.
Escape Eternity without dying by planning ahead.

System, activate!
Wear the entire Signalum Power Suit set for the first time.

...

Crimson Warrior
Walk through fire completing the Reinforced Wrath Beacon challenge.

Destroyer
Complete the Awakened Wrath Beacon challenge and receive an ancient artifact.

Expand Down
Loading

0 comments on commit 317a61b

Please sign in to comment.