Latest Posts

Topic: How to find out how many of a ware a player has available/produced?


Topic Opener
Joined: 2012-01-06, 11:19
Posts: 236
Posted at: 2013-10-20, 15:50

It seems, I can check for the stock in warehouses from Lua, but I'd prefer to know the total of wares available or produced.

A callback that triggers each time a ware is produced would be one option. But having Player.get_wares would be useful, too.


P.S.: I'm considering evaluating my income tax idea in a scenario. So I need a somehwat working (doesn't have to be accurate) way to get player income.

Top Quote

Joined: 2009-02-19, 14:18
Posts: 1445
One Elder of Players
Location: Germany - Munich
Posted at: 2013-10-20, 16:39

I agree, get_wares and get_workers would be very useful to have on workers as would be a hook. Unfortunately, none of them are implemented (well, except for get_workers, but only a significantly cheaper version than what is implemented for warehouses and producitonsites.). I have my hands very full right now, so I will not have the time implementing this, but I can give you guidance how to do and where to add test code if you are interested.

Top Quote