realtime metal extraction info

realtime metal extraction info

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
zoggop
Posts: 289
Joined: 07 Sep 2010, 18:47

realtime metal extraction info

Post by zoggop »

Is there a unit property of how much metal the unit is extracting? There is the unitDef "metalMake", but that only applies to metal makers and the commander. There is also the unitDef "extractsMetal", but that only tells me the fraction of the metal it extracts from a given spot. I'm making a widget that quantitatively assesses the economic importance of structures in a grid. (Eventually this function will be part of an AI.)
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: realtime metal extraction info

Post by Google_Frog »

Spring.GetUnitResources or Spring.GetUnitMetalExtraction depending on exactly what you want to do.
User avatar
zoggop
Posts: 289
Joined: 07 Sep 2010, 18:47

Re: realtime metal extraction info

Post by zoggop »

Google_Frog wrote:Spring.GetUnitResources or Spring.GetUnitMetalExtraction depending on exactly what you want to do.
Ah, thank you.
Post Reply

Return to “Lua Scripts”