[Widelands-dev] [Merge] lp:~hjd/widelands/calculation into lp:widelands
Hans Joachim Desserud has proposed merging lp:~hjd/widelands/calculation into lp:widelands. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161 Discovered when translating -- https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161 Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/calculation into lp:widelands. === modified file 'tribes/atlanteans/foresters_house/help.lua' --- tribes/atlanteans/foresters_house/help.lua 2014-05-27 14:14:14 + +++ tribes/atlanteans/foresters_house/help.lua 2014-07-17 09:43:06 + @@ -27,6 +27,6 @@ building_help_building_section("atlanteans", building_description) .. --Production Section - building_help_production_section(_[[Calculaiton needed]]) + building_help_production_section(_[[Calculation needed]]) end } === modified file 'tribes/empire/foresters_house/help.lua' --- tribes/empire/foresters_house/help.lua 2014-05-26 20:36:01 + +++ tribes/empire/foresters_house/help.lua 2014-07-17 09:43:06 + @@ -27,6 +27,6 @@ building_help_building_section("empire", building_description) .. --Production Section - building_help_production_section(_[[Calculaiton needed]]) + building_help_production_section(_[[Calculation needed]]) end } ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342801 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1342801 into lp:widelands. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1342801 in widelands: "Building help is broken (get_worker_description string expected got table)" https://bugs.launchpad.net/widelands/+bug/1342801 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162 Applied changes in the Lua interface to format_help.lua + some refactoring -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1342801 into lp:widelands. === modified file 'scripting/format_help.lua' --- scripting/format_help.lua 2014-07-15 10:02:22 + +++ scripting/format_help.lua 2014-07-17 09:47:14 + @@ -155,8 +155,8 @@ --:returns: an rt string with images describing a chain of ware/building dependencies -- function building_help_dependencies_ware(tribename, items, warename) - local ware_descr = wl.Game():get_ware_description(tribename, warename) - return dependencies(tribename, items, ware_descr.descname) + local ware_description = wl.Game():get_ware_description(tribename, warename) + return dependencies(tribename, items, ware_description.descname) end @@ -172,8 +172,8 @@ --:returns: an rt string with images describing a chain of ware/building dependencies -- function building_help_dependencies_building(tribename, items, buildingname) - local building_descr = wl.Game():get_building_description(tribename,buildingname) - return dependencies(tribename, items, building_descr.descname) + local building_description = wl.Game():get_building_description(tribename,buildingname) + return dependencies(tribename, items, building_description.descname) end @@ -186,14 +186,13 @@ --:arg tribename: e.g. "barbarians". --:arg items: an array with ware and building names, --e.g. {"constructionsite", "trunk"} ---:arg warename: the internal name of the ware to use in the title. +--:arg ware_description: the description of the ware to use in the title. --:arg building: the internal name of the building to use in the title. --:returns: an rt string with images describing a chain of ware/building dependencies -- -function building_help_dependencies_ware_building(tribename, items, warename, buildingname) - local building_descr = wl.Game():get_building_description(tribename,buildingname) - local ware_descr = wl.Game():get_ware_description(tribename, warename) - return dependencies(tribename, items, _"%1$s from: %2$s":bformat(ware_descr.descname, building_descr.descname)) +function building_help_dependencies_ware_building(tribename, items, ware_description, building_description) + return dependencies(tribename, items, + _"%1$s from: %2$s":bformat(ware_description.descname, building_description.descname)) end @@ -209,8 +208,8 @@ --:returns: an rt string with images describing a chain of ware/building dependencies -- function building_help_dependencies_resi(tribename, items, warename) - local ware_descr = wl.Game():get_ware_description(tribename, warename) - return dependencies_resi(tribename, items, ware_descr.descname) + local ware_description = wl.Game():get_ware_description(tribename, warename) + return dependencies_resi(tribename, items, ware_description.descname) end -- RST @@ -254,14 +253,14 @@ local images = "" local text = "" for countfood, food in pairs(foodlist) do - local ware_descr = wl.Game():get_ware_description(tribename, food) + local ware_description = wl.Game():get_ware_description(tribename, food) if(countfood > 1) then images = images .. ";" -text = _"%1$s or %2$s":bformat(text, ware_descr.descname) +text = _"%1$s or %2$s":bformat(text, ware_description.descname) else -text = ware_descr.descname +text = ware_description.descname end - images = images .. "tribes/" .. tribename .. "/" .. ware_descr.name .. "/menu.png" + images = images .. "tribes/" .. tribename .. "/" .. ware_description.name .. "/menu.png" end if(countlist > 1) then text = _"%s and":bformat(text) @@ -285,7 +284,7 @@ --:returns: a list weapons images with the producing and receiving building -- function dependencies_training_weapons(tribename, building_description, and_or, weapons, manufacturer) - local manufacturer_descr = wl.Game():get_building_description(tribename, manufacturer) + local manufacturer_description = wl.Game():get_building_description(tribename, manufacturer) local weaponsstring = "" for count, weapon in pairs(weapons) do if(count > 1) then @@ -301,9 +300,9 @@ elseif (and_or == "or" ) then equipmentstring = _"or equipment from" end return rt(p(equipmentstring)) .. dependencies_basic({ - "tribes/" .. tribename .. "/" .. manufacturer_descr.name .. "/menu.png", + "tribes/" .. tribename .. "
[Widelands-dev] [Merge] lp:~hjd/widelands/calculation into lp:widelands
The proposal to merge lp:~hjd/widelands/calculation into lp:widelands has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161 -- https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161 Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/calculation into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~hjd/widelands/calculation into lp:widelands
The proposal to merge lp:~hjd/widelands/calculation into lp:widelands has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161 -- https://code.launchpad.net/~hjd/widelands/calculation/+merge/227161 Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/calculation into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] growth of trees
Hi, I have a feeling (can not provide numbers) that grow of trees on some maps or terrains is extremely slow, even if there are couple of rangers in a bunch and all of them shows 100%. Expansion of AI is then badly affected. Is it my feeling only or is it the case? F.e. I am testing Dry Riverbeds map... Regards Tibor ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] growth of trees
On 17.07.2014, at 12:59, Tibor Bamhor wrote: > Hi, > > I have a feeling (can not provide numbers) that grow of trees on some maps or > terrains is extremely slow, even if there are couple of rangers in a bunch > and all of them shows 100%. Expansion of AI is then badly affected. > > Is it my feeling only or is it the case? Likely. The tree growth feature has been changed recently. It is very likely that the numbers need tuning. Feel free to change the values and suggest the for merge in a separate branch. > > F.e. I am testing Dry Riverbeds map... > > Regards > > Tibor > ___ > Mailing list: https://launchpad.net/~widelands-dev > Post to : widelands-dev@lists.launchpad.net > Unsubscribe : https://launchpad.net/~widelands-dev > More help : https://help.launchpad.net/ListHelp smime.p7s Description: S/MIME cryptographic signature ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342801 into lp:widelands
Review: Approve -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1342801. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342801 into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/bug-1342801 into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162 -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342801/+merge/227162 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1342801. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands
Review: Needs Fixing > This avoids having to get the tribes' Immovable_Descr through the Lua > interface. If you think this is a problem, I can have a go at it though. > Otherwise, ready for merging. I do not think this is a problem. Wrapping those too might make sense in the future anyways though. Diff comments: > === modified file 'campaigns/atl01.wmf/scripting/init.lua' > --- campaigns/atl01.wmf/scripting/init.lua2014-07-15 10:02:22 + > +++ campaigns/atl01.wmf/scripting/init.lua2014-07-16 21:09:18 + > @@ -324,7 +324,7 @@ >if not f.immovable then return end > >-- Flags are not so interesting > - if f.immovable.type == "flag" and > + if f.immovable.name == "flag" and > (f.tln.immovable and is_building(f.tln.immovable)) then > f = f.tln >end > > === modified file 'campaigns/tutorial01.wmf/scripting/init.lua' > --- campaigns/tutorial01.wmf/scripting/init.lua 2014-07-15 10:02:22 > + > +++ campaigns/tutorial01.wmf/scripting/init.lua 2014-07-16 21:09:18 > + > @@ -311,7 +311,7 @@ > end > > -- buildings and constructionsite have a flag > - if is_building(i) or i.type == "constructionsite" then > + if is_building(i) or i.descr.type_name == "constructionsite" then >registered_player_immovables[_fmt(i.fields[1].brn)] = true > end > end > @@ -350,15 +350,15 @@ > -- Allows constructionsites for the given buildings, all others are invalid > -- as is any other immovable build by the player > function allow_constructionsite(i, buildings) > - if i.type == "constructionsite" then > + if i.descr.type_name == "constructionsite" then >if not buildings then return i end >for idx,n in ipairs(buildings) do > if i.building == n then return i end >end >return false > - elseif i.type == "flag" then > + elseif i.name == "flag" then >local tr = i.fields[1].tln.immovable > - if tr and tr.type == "constructionsite" then > + if tr and tr.descr.type_name == "constructionsite" then > return allow_constructionsite(tr, buildings) >end > end > @@ -442,7 +442,7 @@ > blocker:lift_blocks() > > -- Wait for flag > - while not (f.immovable and f.immovable.type == "flag") do sleep(300) end > + while not (f.immovable and f.immovable.name == "flag") do sleep(300) end > o.done = true > > sleep(300) > @@ -506,7 +506,7 @@ > > local function _rip_road() >for idx,f in ipairs(cs.fields[1].brn:region(2)) do > - if f.immovable and f.immovable.type == "road" then > + if f.immovable and f.immovable.name == "road" then > click_on_field(f) > click_on_panel(wl.ui.MapView().windows. > field_action.buttons.destroy_road, 300) > @@ -671,7 +671,7 @@ > local function _find_nearby_flag() >for i=2,8 do > for idx, f in ipairs(conquer_field:region(i)) do > -if f.immovable and f.immovable.type == "flag" then > +if f.immovable and f.immovable.name == "flag" then > return f > end > end > > === modified file 'scripting/format_help.lua' > --- scripting/format_help.lua 2014-07-15 10:02:22 + > +++ scripting/format_help.lua 2014-07-16 21:09:18 + > @@ -331,23 +331,23 @@ > image_line("tribes/" .. tribename .. "/" .. resourcename .. > "/menu.png", 1, p(purpose)) > if (note) then result = result .. rt(h3(_"Note:")) .. rt(p(note)) end > > - if(building_description.type == "productionsite") then > + if(building_description.type_name == "productionsite") then > if(building_description.workarea_radius and > building_description.workarea_radius > 0) then > result = result .. text_line(_"Working radius:", > building_description.workarea_radius) > end > > - elseif(building_description.type == "warehouse") then > + elseif(building_description.type_name == "warehouse") then > result = result .. rt(h3(_"Healing:") > .. p(_"Garrisoned soldiers heal %s per > second":bformat(building_description.heal_per_second))) > result = result .. text_line(_"Conquer range:", > building_description.conquers) > > - elseif(building_description.type == "militarysite") then > + elseif(building_description.type_name == "militarysite") then > result = result .. rt(h3(_"Healing:") > .. p(_"Garrisoned soldiers heal %s per > second":bformat(building_description.heal_per_second))) > result = result .. text_line(_"Capacity:", > building_description.max_number_of_soldiers) > result = result .. text_line(_"Conquer range:", > building_description.conquers) > > - elseif(building_description.type == "trainingsite") then > + elseif(building_description.type_name == "trainingsite") then >
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341081 into lp:widelands
There is also a diff comment buried in my last comment. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1341081/+merge/227107 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1341081. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342563 into lp:widelands
Review: Needs Fixing Rename the lua files too for consistency - so that all are named the same. Might need to grep() for the filenames to get all uses. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1342563. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/map_information into lp:widelands
I'll go ahead and merge this now. -- https://code.launchpad.net/~widelands-dev/widelands/map_information/+merge/226572 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/map_information. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/map_information into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/map_information into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/map_information/+merge/226572 -- https://code.launchpad.net/~widelands-dev/widelands/map_information/+merge/226572 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/map_information. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342563 into lp:widelands
Done :) -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1342563. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342563 into lp:widelands
Review: Approve -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1342563. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1342563 into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/bug-1342563 into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981 -- https://code.launchpad.net/~widelands-dev/widelands/bug-1342563/+merge/226981 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1342563. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] growth of trees
On 17.07.2014, at 19:51, Tibor Bamhor wrote: > where are those numbers that can be tuned? Is it coding work or just change > in conf files? It is lua files only. https://bugs.launchpad.net/widelands/+bug/1328635 has all the informations. Mainly it is world/terrains/init.lua and the tree immovables. > > > 2014-07-17 13:57 GMT+02:00 Holger Rapp : > > On 17.07.2014, at 12:59, Tibor Bamhor wrote: > > > Hi, > > > > I have a feeling (can not provide numbers) that grow of trees on some maps > > or terrains is extremely slow, even if there are couple of rangers in a > > bunch and all of them shows 100%. Expansion of AI is then badly affected. > > > > Is it my feeling only or is it the case? > > Likely. The tree growth feature has been changed recently. It is very likely > that the numbers need tuning. Feel free to change the values and suggest the > for merge in a separate branch. > > > > > > F.e. I am testing Dry Riverbeds map... > > > > Regards > > > > Tibor > > ___ > > Mailing list: https://launchpad.net/~widelands-dev > > Post to : widelands-dev@lists.launchpad.net > > Unsubscribe : https://launchpad.net/~widelands-dev > > More help : https://help.launchpad.net/ListHelp > > smime.p7s Description: S/MIME cryptographic signature ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp