Space Engineers Feedback

0
Votes
Expose power usage informations to In-game API
Most of the blocks in game are draining power, but many of them are not displaying how much even in .DetailedInfo. Maybe create new interface (e.g. IMyPowerConsumer) with properties like CurrentPowerUsage, MaxPowerUsage, IdlePowerUsage. Maybe give it to IMyTerminalBlock interface. Optionally add some properties to IMyShipController for overall overview. (TotalPowerProduction, TotalPowerUsage)


Georgik shared this idea 25/09/17 14:20
Pharap 10/10/17 21:28
This is already possible. Here's an example of finding out this information made by Phoenix (one of the people who made the Stargate mod). On the workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=633376731 Or just the code: https://pastebin.com/26wFpSaH It's a bit fiddly and you'd have to work a lot of it out using maths, but it's possible at least.
Georgik 11/10/17 18:29
Great, never heard of this usage. Still I don't think such a simple thing should be available only through so difficult way.
Pharap 11/10/17 18:44
I agree that it's awkward, but unfortunately a lot of the Space Engineers code base is a bit backwards like that. That's actually almost 1:1 to how it's done in the game itself so to make it easier they'd have to either make a wrapper if possible or overhaul the system entirely. I think part of the complexity is to allow modders to add new gasses. Overall the whole API is poorly documented and there's a distinct lack of tutorials. If I knew more about the API I'd attempt to rally some of the more skilled/well known modders into providing more tutorials for people. I'm glad Phoenix took some initiative and made that demo.