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

Various Fission Reactor fixes #2338

Conversation

loxoDev
Copy link
Contributor

@loxoDev loxoDev commented Jan 6, 2024

What

This largly fixes numerous NPEs that stem from non robust code.

Implementation Details

Instead of a single boolean to represent the locking state of the reactor, an enum has been added that contains more detailed information. Now, internally, the reactor only counts as locked after the locking logic has correctly been run. Before, the boolean indicated that both the reactor should lock and it already is locked, which caused an issue when the reactor started ticking before the locking logic running.

Outcome

  • No longer allows invalid reactor configurations to lock to prevent NPEs
  • Makes the coolant export hatch create a fluid tank correctly
  • Circumvents a cyclical references with the coolant property for distilled water
  • Syncs up the fuel rod handling
  • The fuel depletion of the reactor is set to one initially to make it take rods after starting up
  • Non-square reactor layouts (reactors with an inner diameter > 3 blocks) no longer cause null pointer exceptions
    when working with the square layout array
  • The locking now correctly determines the area that it needs to check for calculation of the reactor layout
  • The heatRemoved attribute representing the cooling of the reactor no longer accumulates across multiple ticks.

@loxoDev loxoDev requested a review from a team as a code owner January 6, 2024 11:59
Copy link
Member

@htmlcsjs htmlcsjs left a comment

Choose a reason for hiding this comment

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

code looks good otherwise

@Zalgo239 Zalgo239 added the type: feature New feature or request label Jan 6, 2024
@ALongStringOfNumbers ALongStringOfNumbers merged commit 1e6425a into GregTechCEu:nuclear-fission Jan 8, 2024
3 checks passed
bruberu pushed a commit that referenced this pull request Jun 2, 2024
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