Open
Conversation
# Conflicts: # dependencies.gradle # src/main/java/gregtech/api/enums/ItemList.java # src/main/resources/assets/gregtech/lang/en_US.lang
* The middle click trap event wasn't properly being canceled when the GUI was slated to be open, which caused the server in multiplayer to complete the block picking, potentially shifting the user's active item and leading to a client-side NPE * Various charging activities (battery charging internal items, wireless charger charging battery) were causing item updates to interrupt block harvesting if the stats of the selected tool were too low. Charging activities are now turned off if the current item is actively being used.
# Conflicts: # src/main/java/gregtech/api/modularui2/GTGuiTextures.java
…ficial into advanced-toolbox
Since this PR adds stuff in the same place where the IC2 crops stuff was removed, git interpreted it as this PR re-adding the removed lines. These are now gone in this PR too.
It was possible to potentially throw an unchecked exception when trying to pick block with an empty toolbox. I refactored the logic to be more defensive in this case.
# Conflicts: # src/main/java/gregtech/common/GTClient.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Field Engineer's Toolbox
This PR adds the new toolbox I've been working on for the last month and change. Intended to replace the IC2 toolbox, it adds several new quality of life features and is intended to be used heavily at all levels of play.
Suggested Recipe
I'm targeting mid-LV for the toolbox's gating.
Features
Tool storage
The field engineer's toolbox can hold the seven primary tools of GT5 in dedicated slots: the wrench, wire cutters, screwdriver, hard hammer, soft mallet, crowbar, and soldering iron. Only these types of tools can be assigned to these dedicated slots. There is also a dedicated battery slot (see below) and six generic slots for general storage. Dedicated slots have a silhouetted background and a tooltip explaining their restriction.
Active Tool Selection
Tools in the toolbox can be selected as the active tool by the user using a radial menu by pressing the pick block button. (Radial menu was stolen from matter manipulator.) When selected, the toolbox takes on the appearance of the selected tool, and can be used as if it was actually the tool you selected. All damage and power expenditure is applied to the tool.
java_Ev8210Nhvj.mp4
Pick Block Support
There is also limited pick block support for switching tools. Pressing pick block while looking at a compatible block will automatically pick an appropriate tool and skip the radial menu. It also has support for precise selection on a block face, allowing it to (for example) select a crowbar if it hovers over the side of a pipe with a cover attached, or otherwise pick a wrench. Pick Block functionality can also work on other mod items with a special defensive decider class; the PR ships with project red gates and ender IO conduits as potential targets.
java_GxoPDkxxuf.mp4
Battery Functionality
Adding a battery to the battery slot allows for the toolbox to handle electricity related functionality:
Any tier battery can be added to the toolbox, but charging mechanics are limited by the tier of the battery and the tier of the tools. The battery will never expend more than 1A of its tier per tick, and it will not charge a tool for more than 1A of the tool's tier per tick. This means that while you could add a Zero Point Module to the toolbox, it's not going to be drastically more effective at charging tools than a lapotron crystal is.
Other Stuff
java_FSdkH8Jy4v.mp4
Differences from Areas of Interest thread
Due to design decisions and feedback, some features were cut from the original design. These include:
Future Tasks
I've kept the number of pick block deciders small for now, because I want to get the bulk of the functionality out in a reasonable time frame. Adding new pick block deciders is easy and can be done in future PRs.
Changes Not Related to the Toolbox
I changed a few other things with the codebase while doing this as well.