-
Notifications
You must be signed in to change notification settings - Fork 302
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
Refactor machine tool actions #3275
base: master
Are you sure you want to change the base?
Conversation
bf78ab5
to
f7d1072
Compare
src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialLaserEngraver.java
Show resolved
Hide resolved
How does this interact with hatches/buses which might have those features, like input separation? Also, how discoverable are those interactions? If they're standardized we might want that info on the tooltips for the tools themselves. |
This doesn't touch anything with the modes themselves, it only lets you toggle them. So input separation etc will behave the same. There are a few hatch-specific settings (sorting, 1 stack limiting, recipe map filtering) but I haven't touched those either.
The multi-specific logic is defined in the multi base class, so multis can override the methods to opt out. They're standardized enough, but it'd need a disclaimer that some multis might not support some tools. I'm going to add a quest for it since there are quite a few caveats. |
src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java
Outdated
Show resolved
Hide resolved
2f78d16
to
397b81b
Compare
By the way I had previously "hidden" some information on tool usage for single block in the tooltips for buttons on their UI, which was better than nothing but not great. That text would either need to be removed or be kept up to date: https://github.com/GTNewHorizons/GT5-Unofficial/pull/858/files#diff-0424401ca733037441e2d1b48951a5ae407801a53d4e84d2e87b8d65e51c3868 |
Drafting this because I need to take another look at all the machines affected |
This PR refactors tool interactions with machines and removes the deprecated onXRightClicked methods. The actions for single block machines were cleaned & polished up but untouched functionality-wise. The actions for multiblocks were slightly rearranged. Several new onXRightClicked methods were added to IMetaTileEntity to support the various multi toggle buttons (hard hammer and jack hammer).
These are the main multiblock actions:
Singleblock actions:
input from output side
is toggled (existing)Shared actions:
A lot of the changes are from removing the deprecated onXRightClicked methods. The return type of onScrewdriverRightClicked was changed to boolean to match the other right click methods.
Some machineMode code was cleaned up since a few multis relied on the default behaviour of nextMachineMode when they shouldn't have.
The chat messages for miner mode & radius changes (singleblock & multiblock) were also improved a bit.