Is there a way to access current mass stored in UI ?

Everything about mods can be found here.

Moderator: Morax

Is there a way to access current mass stored in UI ?

Postby Franck83 » 08 Nov 2017, 20:14

I need to know the current ressources stored in ui.

But GetEconomyStored function is a sim only function.

Is there an equivalent (not found it) in UI ?

Otherwise somebody got an idea how can i get it in ui ?
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

Re: Is there a way to access current mass stored in UI ?

Postby Uveso » 08 Nov 2017, 21:02

Maybe "GetEconomyTotals()" will fit your needs:

Code: Select all
local econData = GetEconomyTotals()
LOG(repr(econData))

Code: Select all
INFO: {
INFO:   income={ ENERGY=2, MASS=0.10000000149012 },
INFO:   lastUseActual={ ENERGY=0, MASS=0 },
INFO:   lastUseRequested={ ENERGY=0, MASS=0 },
INFO:   maxStorage={ ENERGY=4000, MASS=650 },
INFO:   reclaimed={ ENERGY=0, MASS=0 },
INFO:   stored={ ENERGY=4000, MASS=650 }
INFO: }
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Is there a way to access current mass stored in UI ?

Postby Franck83 » 08 Nov 2017, 21:11

Ty Uveso, this is perfect for my needs !
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest