-
Notifications
You must be signed in to change notification settings - Fork 180
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 the Cleanroom #618
Add the Cleanroom #618
Conversation
0028d67
to
a573846
Compare
I haven't looked at the code yet (I want to save headaches for later), but here's what I can tell from the mechanics in-game:
|
So uh, it requires 60% of its volume to be plascrete, so a 7x7x7 cleanroom is actaully not possible, and hell a 15x15x15 cleanroom is not possible either. Was it designed to be 60% of the whole volume of the structure, including the hollow part? And also, maybe for some sort of compatibility reason it directly uses camelled Re-entering a world seems to be possibly causing formed cleanrooms to turn invalid, refreshing by making changes to the size configuration fixes this. |
src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityCleanroom.java
Outdated
Show resolved
Hide resolved
I added a commit which adds channels in hulls. At the moment, it is partially broken, as I am not calling the read/write NBT methods at the right time for the ME network. @PrototypeTrousers guidance on this issue (and general reviews of the commit d7a8258) would be greatly appreciated |
There be a log spam spamming
|
src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityHull.java
Show resolved
Hide resolved
JEI integration would be completely broken if AE2 is not present. |
20d1b7a
to
4350764
Compare
Would be even better to introduce a specific kind of door which behaves like iron doors only for the Cleanroom, using a texture with no, you know, holes in it. |
6d8d802
to
376d2e3
Compare
With my latest commit, 85ac6eb, the following has been changed: Primitive Multiblocks and Drills are now blacklisted from forming the cleanroom structure. |
66e3990
to
5f636ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea, how hard would it be to increase the time required for the cleanroom to become fully clean based on the internal size of the cleanroom?
Also, instead of decreasing the cleanliness by 1% per maintance issue, what do you think about decreasing cleanliness by 1% per maintenance issue, per cleanroom power draw cycle?
src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityCleanroom.java
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityDiode.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need more reviewers...
src/main/java/gregtech/api/metatileentity/multiblock/ICleanroomProvider.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone said cleanroom can be unformed by reloading the world in discord dev channel and I confirmed it happens in the latest commit
However, I don't know which line causes it
...regtech/common/metatileentities/multi/multiblockpart/MetaTileEntityPassthroughHatchItem.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/loaders/recipe/chemistry/GrowthMediumRecipes.java
Show resolved
Hide resolved
src/main/java/gregtech/loaders/recipe/chemistry/DistillationRecipes.java
Outdated
Show resolved
Hide resolved
…thout AE2 installed
f1c1785
to
4d9a14d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a funny issue with the JEI preview for the cleanroom. Since the door is in 2 block spaces, is is shown that 2 doors are required in the JEI components list.
This PR adds the Cleanroom. It requires many existing recipes to be run inside it, and serves as an HV progression step.
There are two configs concerning this PR: one to disable the cleanroom, and one to make multiblocks clean when not inside of it.
The structure has minimum dimensions of 5x5x5, and maximum of 15x15x15. The width and depth must be odd, while the height may be even. The size of the cleanroom is determined in the controller with GUI buttons. The structure requires plascrete in all of the borders, filter casings on the top panel (excluding the very center for the controller), allows up to 4 doors, and has a minimum number of Plascrete or Cleanroom Glass in the structure. This minimum is equal to 75% of the structure's wall's block amount. Any plascrete can be replaced with Cleanroom Glass.
The cleanroom's interior has a custom predicate which handles machines requiring cleanrooms. The default cleanroom bans any generator, muffler hatch, and any other cleanroom. When a machine meets these conditions, and it is able to "accept" a cleanroom, it is given the cleanroom it is located inside for use in running recipes.
It additionally allows the new Passthrough Item and Fluid hatches in the structure walls. These auto input items or fluids on one side into its inventory, and subsequently auto output out the opposite side. Power can be transmitted inside and out using Diodes or Hulls, which each adopt the proper casing textures in the structure as well. The cleanroom additionally has maintenance, which works as one expects except that the adjustable hatch adjustments make no change. Any hatch is allowed anywhere in the structure excluding the filter casings.
Machines running cleanroom required recipes outside the cleanroom do not run and do not consume inputs at all. Machines running recipes in the cleanroom will work as normal, except that the cleanroom becoming dirty during the recipe will cause progress to reverse. There is no voiding in the cleanroom when not clean.
The clean states work as follows: it is either clean or not clean, with no in between. Every 5 seconds, the multiblock will increase its progress towards being fully clean. The cleanliness increase is 5% at LV, 10% at MV, 15% at HV, and so on. During this time, if the cleanroom does not recieve enough power for its power draw, it will reverse its progress towards cleaning by subtracting 5% cleanliness. This means that the cleanroom must be continually powered whenever recipes are run inside it. It also constantly consumes power, regardless of whether machines are running inside it or not. The base power drain is 30 EU/t, but drops to 4 when fully cleaned. When there are maintenance problems, the cleanroom's cleanliness increase is reduced by 1% per problem, and its no power decrease is enlarged by 1% for each problem as well.
The cleanroom is designed to be easily extendable by other mods to add their own "cleanrooms." The CleanroomType system was designed in such a way that any amount of cleanrooms which provide their own unique type (or multiple) can be created and used in recipes.
Any RecipeBuilder accepts the cleanroom property, allowing Modpack Devs and Addons to use any machine they wish to inside the cleanroom. CT Support works by specifying a String name of the cleanroom type. An example of this for the default cleanroom:
.property("cleanroom", "cleanroom")
on a RecipeBuilder.