Skip to content

Derive tooltip rates from the cover scaling functions (single source of truth)#4969

Open
Cyber1551 wants to merge 1 commit into
GregTechCEu:1.20.1from
Cyber1551:fix/cover-rate-tooltips
Open

Derive tooltip rates from the cover scaling functions (single source of truth)#4969
Cyber1551 wants to merge 1 commit into
GregTechCEu:1.20.1from
Cyber1551:fix/cover-rate-tooltips

Conversation

@Cyber1551

Copy link
Copy Markdown

What

The rate tooltips on the cover items (Conveyor, Robot Arm, Pump, Fluid Regulator) are hardcoded numbers in GTItems, disconnected from the scaling functions that the covers actually use (ConveyorCover.CONVEYOR_SCALING and PumpCover.PUMP_SCALING).

Several are stale and currently display the wrong number, some examples:

Item Tooltip shows Scaling gives
HV Conveyor 64/s 128/s
EV Conveyor 3 stacks/s 8 stacks/s
LuV-OpV Conveyor 16 stacks/s 128 stacks/s
ZPM Electric Pump 262,144 mB/t 65,536 mB/t

this fix makes the tooltips use the scaling functions instead of a hardcoded value so they don't drift out of sync again.

Implementation Details

Two private helpers in GTItems replace the hardcoded values. Robot Arm reuses CONVEYOR_SCALING and Fluid Regulator reuses PUMP_SCALING, so only two helpers are needed for all cover types.

Also, I tweaked PUMP_SCALING to match CONVEYOR_SCALING's shape. The values are identical, but the old min(tier - 1, IV) looked like it capped at IV, when the rate actually caps at LuV. The new min(tier, LuV) - 1 is easier to follow imo.

AI Usage

  • No AI driven tools were used for this pull request.

Outcome

Cover rate tooltips now match the actual configurable rate at every tier, and are calculated from the scaling functions so they stay correct if the scaling ever changes.

How Was This Tested

I checked the cover items tooltips in game at all tiers and confirmed the displayed rate matches the cover's GUI transfer rates.

Potential Compatibility Issues

None. This is a tooltip text change only. I added no behavior, recipe, or API changes.

…of truth). Normalize PUMP_SCALING to match CONVEYOR_SCALING's format
@Cyber1551 Cyber1551 requested a review from a team as a code owner June 21, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants