Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Material Working Tier #2429

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

serenibyss
Copy link
Member

@serenibyss serenibyss commented Mar 27, 2024

Adds a "working tier" field to all materials, which specifies the minimum voltage that any given working recipe (extruding, bending, solidifying, fluid extracting, wiremilling, etc.) should be. Currently this is just an API, as no materials specify anything above default. The field is publicly accessible and settable for existing materials by addons, groovyscript and crafttweaker, as well as for new materials in a material builder call.

Rather than blindly setting the voltage for carefully chosen EU/t recipes (like the bender being 24 EU/t) to the VA[tier] value, it attempts to scale the voltage to the appropriate adjusted amount at the provided tier. Examples:

  • 24 EU/t becomes 96 EU/t at MV working tier, or 384 EU/t at HV working tier
  • 16 EU/t becomes 64 EU/t at MV working tier, or 256 EU/t at HV working tier

Additionally, any material with a working tier above HV will no longer generate manual recipes for parts, such as using a Hammer to craft 2 ingots into plates or a File to craft an ingot into a rod.

Open questions on whether these should receive working tier scaling:

  • Gem crystallization in Autoclave
  • Gem compression in Implosion Compressor
  • Gem cutting from larger to smaller gems
  • Gem laser engraving from smaller to larger gems
  • Turbine Rotor assembling
  • Restrictive Pipe assembling
  • Quadruple/Nonuple pipe packing

As an additional larger question: should this feature include polarizing to remove our special cases for Neodymium (HV polarizer) and Samarium (IV polarizer)? Or should these continue to be special cases so that they do not need to also gain higher voltage working recipes apart from polarizing?

@serenibyss serenibyss added the type: feature New feature or request label Mar 27, 2024
@serenibyss serenibyss requested a review from a team as a code owner March 27, 2024 07:09
@serenibyss serenibyss added type: feature New feature or request and removed type: feature New feature or request labels Mar 27, 2024
@screret
Copy link
Member

screret commented Mar 27, 2024

woah.

// below a full amp but still increasing the tier. For instance, 24 EU/t with working tier of MV would become
// 96 EU/t rather than 120 EU/t with this logic.
while (voltage <= GTValues.V[workingTier - 1]) {
voltage *= 4;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this check for int overflow before multiplying?

@bruberu
Copy link
Member

bruberu commented Jun 5, 2024

As to answer your questions:
I could certainly imagine it taking more effort to operate on some gems than others, so those gem recipes should definitely have working tiers. Turbine rotors, restrictive pipes and packed pipes, on the other hand, sound like it would take approximately the same amount of work to do for each (you just solder some things together), so I don't think they deserve working tiers. As for the polarization, I think polarization tiering probably shouldn't be included within this particular framework (especially since getting an IV lathe for samarium seems quite extreme), but perhaps that could be added in a future API update.

I do agree with TechLord22 that ULV should be supported as a tier, for no other reason than that there isn't a reason not to give developers a way to autogen recipes under 8 EU/t.

- Enable ULV working tier
- Apply to gem crystallization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants