-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: Returning a machine status in tickDisabled #9
fix: Returning a machine status in tickDisabled #9
Conversation
WRT 1296060: I need access to the redstone configuration on the client side for some fixes I am doing to the bubble distributor. To do this I am calling |
The redstone sync changes look good but I'm not exactly sure how the Disablement is effectively 'pausing' the machine - when the machine gets re-enabled, it should act like nothing happened. Setting the |
Yeah I can't think of any reason off the top of my head but I left it ambiguous so that when add-ons come along it's clear where they would integrate. I mean this variable could just as easily be called
Yeah so these changes are necessary for making the O2 sealer work (TeamGalacticraft/Galacticraft#277). In GC4 we had a button inside the o2 sealer where you could turn it off so that you would not kill your o2 storage and in GC5 this would be done by placing a lever next to the sealer so that you can flip the lever as needed to get oxygen. The reason I need these changes is that if you disable a machine then it does not update the UI since it is left with the same status. If you add the following code to the Generator Test Machine you will see that the status is not properly updated and thus may leave players confused as to why they are suffocating when the status is sealed. Further since the sealer doesn't have a visual effect on the world (unlike bubble distributor) it makes sense to have a dialog inside the machine which spits out the status like the code below but without these changes the machine will say it is safe to breath when it is not.
What do you mean here as why would one need to know the Status of a machine which has been disabled as there are no guarantees the player hasn't moved items around in the machine which would change the status when the Machine is flipped back on. |
I figured out how to do what I needed without these changes |
Presently, if you switch a machine to the high requirement for Redstone the machine will not change its status based on this selection. I have added the return type of
MachineStatus
to thetickDisabled
method. I have set the default behavior to return the status ofMachineStatuses.OFF
. I decided to do this rather than leavetickDisabled
alone since those that overidetickDisabled
may have disabled their machine for reasons other than Redstone and wish to set a different status for the machine.