widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02585
Re: [Merge] lp:~widelands-dev/widelands/furnace into lp:widelands
tl;dr: yes, your assumption is correct.
longer:
local rv = plr:get_buildings{"well", "burners_house"}
returns a lua table of tables (see https://wl.widelands.org/docs/wl/autogen_wl_game/#wl.game.Player.get_buildings). It will therefore return { "well": { b1,b2}, "burners_house": { b1}} and so on.
the # operator means length in lua. so #rv.well == 2, #rv.burners_house == 1.
the dot operator is just synthetic sugar in Lua. Ie. rv["well"] is the same as rv.well
--
https://code.launchpad.net/~widelands-dev/widelands/furnace/+merge/227810
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/furnace.
References