Display Cable Overload warning in Jade#4899
Open
DilithiumThoride wants to merge 6 commits into
Open
Conversation
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.
What
When cables are fed excessive voltage or amperage they don't fail instantly, they build up heat for a few moments before catching fire.
This accumulation is not displayed or warned; cables simply either fail or don't, making intermittently or accidentally overloaded cables unclear to diagnose.
This PR adds a line to the Jade provider for cables to show when a cable is about to overload and burn.
Implementation Details
The overheat progress is calculated internally as a temperature from 293K (initial) to 3000K (failure). Cable fails instantly upon reaching 3000K; or at above 1500K it has a chance per tick to first lose its Insulation.
However, this temperature does not interact with any other parts of the world (thermal damage, cable material, etc.) so displaying it directly as a temperature is not really helpful to a player, and can be misleading as they may think the temperature is connected to other things.
As such I opted to display it as an integer calculated percentage where at 0% the Jade text is hidden, and at 100% the cable burns up.
AI Usage
Outcome
Cable is being fed power at 33V. Voltage drop is bringing it down to visibly 32V but because the connection is being overvolted the cable is heating up.

How Was This Tested
Jade visual readouts
Additional Information
Cable initial and melt temperatures are both now public static rather than private or local.
Potential Compatibility Issues
Uncertain if readout will work correctly if another mod tries to modify the initial or failure temperatures of a cable. Not that to my knowledge anyone does at present.