widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02336
Re: [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands
I adressed the remaining comments in 6926.
One question was how to get a object from c++ to Lua. There is a template function to_lua<> for this. Usage is like this:
to_lua<L_WareDescription>(L, new L_WareDescription(tribe.get_ware_descr(ware_amount.first)));
This generates a L_WareDescription and pushes it at the top of the Lua stack.
> An array with pairs of int, worker_descr.name describing the worker positions of the productionsite
I would expect here to get back { "miner": 3 }, but what I get back is {"miner", "miner", "miner"}. You are right that the documentation is correct as it was, but we call the second form a "array of strings" in other places of the documentation. I suggested an alternative wording in my last commit.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1074353.
References