I was looking around in the Wiki and couldn't find anything about it, so I thought I'd ask - is there any granularity of control in stockpile-based weapons? Any way to manipulate it from Lua, set a maximum stockpile, etc?
I can't find anything. Is it just one of those abandoned blind-alleys that nobody cares about, or am I missing something?
Stockpile API?
Moderator: Moderators
Re: Stockpile API?
There is Spring.SetUnitStockpile & Spring.GetUnitStockpile
The commandID is CMD.STOCKPILE ( http://springrts.com/wiki/Lua_CMDs ) in case you want to block the command or something.
The commandID is CMD.STOCKPILE ( http://springrts.com/wiki/Lua_CMDs ) in case you want to block the command or something.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Stockpile API?
http://imolarpg.dyndns.org/trac/balates ... _limit.lua is a stockpile limiter. It was one of this first things I wrote for Spring and could be done better, but that code works fineAny way to manipulate it from Lua, set a maximum stockpile, etc?
Re: Stockpile API?
Thanks everyone, no idea how I missed all that stuff.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Stockpile API?
The version in evo that I modified allows for more control over specific units and such:
https://github.com/EvolutionRTS/Evoluti ... EvoRTS.lua
Nothing special, but more useful.
https://github.com/EvolutionRTS/Evoluti ... EvoRTS.lua
Nothing special, but more useful.