feat(goggles_overlay): add new overlay tooltips and toggle shortcut#10485
Open
TomasCabrita wants to merge 1 commit into
Open
feat(goggles_overlay): add new overlay tooltips and toggle shortcut#10485TomasCabrita wants to merge 1 commit into
TomasCabrita wants to merge 1 commit into
Conversation
This commit introduces the option to toggle the overlay exposed by the Engineer’s Goggles and adds new relevant information about several blocks. The improvements made are: Goggle Toggle: A new client-side keyboard shortcut (with no default key binding) that allows toggling the overlay on and off without removing the item from the helmet slot. Filter Display: Shows items inside a machine’s filter without having to take it out of the machine and hover in the inventory. Possible states: if there is nothing on the filter, this tooltip doesn’t show up; if there is a single item, shows “Allow Item” and the respective item; if there is an empty FilterItem, shows “Empty Filter”; if there is a FilterItem with at least one item, shows a summary of all filtered items. This overlay was added to the following block entities: Basin, Brass Funnel, Deployer, Mechanical Roller, Mechanical Saw, Smart Chute, Smart Fluid Pipe, Smart Observer, Threshold Switch, and Item Hatch. Kinetic Rotation Direction: Shows the direction the block is spinning, since it’s hard to tell when they are spinning at high speeds. Possible states: if the block isn’t spinning, this tooltip doesn't show up; if spinning clockwise, shows “Clockwise”; if spinning counter-clockwise, shows “Counter-Clockwise”. This overlay was added to the following block entities: Creative Motor, Shaft / Cogwheels, Gantry Shaft, Water Wheel, and Windmill Bearing. Encased Fan Direction: Shows whether the fan’s airflow direction is inwards or outwards, as well as the range it reaches. Possible states: if the fan isn’t working, shows “Not Spinning”; if working clockwise, shows “Outward” and the respective range; if working counter-clockwise, shows “Inward” and the respective range. Pulse Mechanisms Info: Shows how much time is left until Pulse Timers and Pulse Repeaters emit the next pulse, as well as how much active time remains on a Pulse Extender. Possible States: for a Pulse Timer or Pulse Repeater, shows a timer that begins at 0 and counts up to the max pulse time defined by the player; for a Pulse Extender, shows a timer that begins at the max pulse time remaining defined by the player and counts down to 0. Blaze Burner Fuel Time: Shows how much time a Blaze Burner has until it runs out of fuel. Possible States: if there is no fuel, shows “No Fuel”; if it consumed a Creative Blaze Cake and entered creative mode, shows “Infinite”; if it consumed normal fuel, shows a progress bar with an indicator (“Low”, “Medium”, or “High”), along with the remaining capacity percentage, and a timer counting down to 0. Added tests to all the implementations above. Note on test limitations: Goggle tooltip rendering is client-only, so tests instead invoke the underlying block entity methods directly in a server-safe path, using plain Component calls rather than the normal client-side formatting pipeline. Co-authored-by: Tiago Cachadinha <tiago.cachadinha@tecnico.ulisboa.pt>
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.
This commit introduces the option to toggle the overlay exposed by the Engineer’s Goggles and adds new relevant information about several blocks. The improvements made are:
Goggle Toggle: A new client-side keyboard shortcut (with no default key binding) that allows toggling the overlay on and off without removing the item from the helmet slot.
Filter Display: Shows items inside a machine’s filter without having to take it out of the machine and hover in the inventory. Possible states: if there is nothing on the filter, this tooltip doesn’t show up; if there is a single item, shows “Allow Item” and the respective item; if there is an empty FilterItem, shows “Empty Filter”; if there is a FilterItem with at least one item, shows a summary of all filtered items. This overlay was added to the following block entities: Basin, Brass Funnel, Deployer, Mechanical Roller, Mechanical Saw, Smart Chute, Smart Fluid Pipe, Smart Observer, Threshold Switch, and Item Hatch.
Kinetic Rotation Direction: Shows the direction the block is spinning, since it’s hard to tell when they are spinning at high speeds. Possible states: if the block isn’t spinning, this tooltip doesn't show up; if spinning clockwise, shows “Clockwise”; if spinning counter-clockwise, shows “Counter-Clockwise”. This overlay was added to the following block entities: Creative Motor, Shaft / Cogwheels, Gantry Shaft, Water Wheel, and Windmill Bearing. Encased Fan Direction: Shows whether the fan’s airflow direction is inwards or outwards, as well as the range it reaches. Possible states: if the fan isn’t working, shows “Not Spinning”; if working clockwise, shows “Outward” and the respective range; if working counter-clockwise, shows “Inward” and the respective range. Pulse Mechanisms Info: Shows how much time is left until Pulse Timers and Pulse Repeaters emit the next pulse, as well as how much active time remains on a Pulse Extender. Possible States: for a Pulse Timer or Pulse Repeater, shows a timer that begins at 0 and counts up to the max pulse time defined by the player; for a Pulse Extender, shows a timer that begins at the max pulse time remaining defined by the player and counts down to 0.
Blaze Burner Fuel Time: Shows how much time a Blaze Burner has until it runs out of fuel. Possible States: if there is no fuel, shows “No Fuel”; if it consumed a Creative Blaze Cake and entered creative mode, shows “Infinite”; if it consumed normal fuel, shows a progress bar with an indicator (“Low”, “Medium”, or “High”), along with the remaining capacity percentage, and a timer counting down to 0.
Added tests to all the implementations above.
Note on test limitations: Goggle tooltip rendering is client-only, so tests instead invoke the underlying block entity methods directly in a server-safe path, using plain Component calls rather than the normal client-side formatting pipeline.