Skip to content

Commit

Permalink
Generify message for camos with special handling
Browse files Browse the repository at this point in the history
  • Loading branch information
XFactHD committed Aug 21, 2024
1 parent fb84c22 commit d74a183
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ private void addMisc() {
add(MekanismModules.FROST_WALKER_UNIT, "Frost Walker Unit", "Uses liquid hydrogen to freeze any water the player walks on. Install multiple for a greater range.");
add(MekanismModules.SOUL_SURFER_UNIT, "Soul Surfer Unit", "Allows the user to surf effortlessly across the top of souls. Install multiple for a greater speed.");
// FramedBlocks integration
add(MekanismLang.FRAMEDBLOCKS_CAMO_RADIOACTIVE, "Radioactive chemicals cannot be inserted into framed blocks!");
add(MekanismLang.FRAMEDBLOCKS_CAMO_HAS_SPECIAL_HANDLING, "Chemicals which require special handling cannot be inserted into framed blocks!");
}

private void addOre(OreType type, String description) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mekanism/common/MekanismLang.java
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ public enum MekanismLang implements ILangEntry {
MODULE_MODE_CHANGE("module", "mode_change"),
MODULE_VISION_ENHANCEMENT("module", "vision_enhancement"),
//FramedBlocks integration
FRAMEDBLOCKS_CAMO_RADIOACTIVE("msg", "compat.framedblocks.camo.radioactive")
FRAMEDBLOCKS_CAMO_HAS_SPECIAL_HANDLING("msg", "compat.framedblocks.camo.has_special_handling")
;

private final String key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ final class ChemicalCamoContainerFactory extends CamoContainerFactory<ChemicalCa
.fieldOf("chemical");
private static final StreamCodec<RegistryFriendlyByteBuf, ChemicalCamoContainer> STREAM_CODEC =
Chemical.STREAM_CODEC.map(ChemicalCamoContainer::new, ChemicalCamoContainer::getChemical);
private static final Component MSG_RADIOACTIVE = TextComponentUtil.translate(
MekanismLang.FRAMEDBLOCKS_CAMO_RADIOACTIVE.getTranslationKey()
private static final Component MSG_HAS_SPECIAL_HANDLING = TextComponentUtil.translate(
MekanismLang.FRAMEDBLOCKS_CAMO_HAS_SPECIAL_HANDLING.getTranslationKey()
);

@Override
Expand Down Expand Up @@ -136,7 +136,7 @@ private static boolean isValidChemical(Chemical chemical, @Nullable Player playe
return false;
}
if (chemical.hasAttributesWithValidation()) {
displayValidationMessage(player, MSG_RADIOACTIVE, CamoMessageVerbosity.DEFAULT);
displayValidationMessage(player, MSG_HAS_SPECIAL_HANDLING, CamoMessageVerbosity.DEFAULT);
return false;
}
if (chemical.is(MekanismAPITags.Chemicals.FRAMEDBLOCKS_BLACKLISTED)) {
Expand Down

0 comments on commit d74a183

Please sign in to comment.