Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

How to check if the electricity i'm reading from MyResourceSinkComponent is W, KW, MW etc.?

$
0
0
Hi there,

i'm reading wrong params from this method below because some are in W others in Kw etc.
How to convert them?

readonly MyDefinitionId electricityId = new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.Definitions.MyObjectBuilder_GasProperties), "Electricity");
MyResourceSinkComponent sink;
public void GetPowInOut()
{
terminalCurrentInput = 0;
terminalMaxRequiredInput = 0;
foreach (IMyTerminalBlock block in TerminalBlocks)
{
if (!block.IsWorking) continue;
if...

How to check if the electricity i'm reading from MyResourceSinkComponent is W, KW, MW etc.?

Viewing all articles
Browse latest Browse all 903

Trending Articles