← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/new_starting_conditions into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/new_starting_conditions into lp:widelands.

Commit message:
New starting condition "Training Outpost" that will periodically give the player some wares if needed (cheat mode)

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/new_starting_conditions/+merge/288059

New starting condition "Training Outpost" that will periodically give the player some wares if needed (cheat mode)
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/new_starting_conditions into lp:widelands.
=== modified file 'data/tribes/preload.lua'
--- data/tribes/preload.lua	2015-11-02 17:19:44 +0000
+++ data/tribes/preload.lua	2016-03-04 07:08:11 +0000
@@ -18,6 +18,7 @@
       starting_conditions = {
          dirname .. "scripting/starting_conditions/barbarians/headquarters.lua";
          dirname .. "scripting/starting_conditions/barbarians/fortified_village.lua";
+         dirname .. "scripting/starting_conditions/barbarians/trading_outpost.lua";
       }
    },
 
@@ -33,6 +34,7 @@
       starting_conditions = {
          dirname .. "scripting/starting_conditions/empire/headquarters.lua";
          dirname .. "scripting/starting_conditions/empire/fortified_village.lua";
+         dirname .. "scripting/starting_conditions/empire/trading_outpost.lua";
       }
    },
 
@@ -48,6 +50,7 @@
       starting_conditions = {
          dirname .. "scripting/starting_conditions/atlanteans/headquarters.lua";
          dirname .. "scripting/starting_conditions/atlanteans/fortified_village.lua";
+         dirname .. "scripting/starting_conditions/atlanteans/trading_outpost.lua";
       }
    }
 }

=== modified file 'data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua'
--- data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua	2016-03-01 09:31:36 +0000
+++ data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua	2016-03-04 07:08:11 +0000
@@ -8,6 +8,7 @@
 
 return {
    descname = _ "Fortified Village",
+   tooltip = _" Start the game with a fortified military installation",
    func =  function(plr, shared_in_start)
 
       local sf = wl.Game().map.player_slots[plr.number].starting_field

=== modified file 'data/tribes/scripting/starting_conditions/atlanteans/headquarters.lua'
--- data/tribes/scripting/starting_conditions/atlanteans/headquarters.lua	2016-01-28 05:24:34 +0000
+++ data/tribes/scripting/starting_conditions/atlanteans/headquarters.lua	2016-03-04 07:08:11 +0000
@@ -8,6 +8,7 @@
 
 init = {
    descname = _ "Headquarters",
+   tooltip = _"Start the game with your headquarters only",
    func =  function(plr, shared_in_start)
 
    local sf = wl.Game().map.player_slots[plr.number].starting_field

=== added file 'data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua'
--- data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua	1970-01-01 00:00:00 +0000
+++ data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua	2016-03-04 07:08:11 +0000
@@ -0,0 +1,180 @@
+-- =======================================================================
+--              Headquarters Starting Conditions for Atlanteans
+-- =======================================================================
+
+include "scripting/infrastructure.lua"
+
+set_textdomain("tribes")
+
+return {
+   descname = _"Trading Outpost",
+   tooltip = _"If this player runs out of important wares, they will be replenished for free",
+   func =  function(player, shared_in_start)
+
+      local sf = wl.Game().map.player_slots[player.number].starting_field
+      if shared_in_start then
+         sf = shared_in_start
+      else
+         player:allow_workers("all")
+      end
+
+      prefilled_buildings(player, { "atlanteans_headquarters", sf.x, sf.y,
+         wares = {
+            diamond = 7,
+            iron_ore = 5,
+            quartz = 9,
+            granite = 50,
+            spider_silk = 9,
+            log = 80,
+            coal = 12,
+            gold = 14,
+            gold_thread = 6,
+            iron = 8,
+            planks = 45,
+            spidercloth = 5,
+            blackroot = 5,
+            blackroot_flour = 12,
+            atlanteans_bread = 8,
+            corn = 5,
+            cornmeal = 12,
+            fish = 3,
+            meat = 3,
+            smoked_fish = 6,
+            smoked_meat = 6,
+            water = 12,
+            bread_paddle = 2,
+            buckets = 2,
+            fire_tongs = 2,
+            fishing_net = 4,
+            hammer = 11,
+            hunting_bow = 1,
+            milking_tongs = 2,
+            hook_pole = 2,
+            pick = 8,
+            saw = 9,
+            scythe = 4,
+            shovel = 9,
+            tabard = 5,
+            trident_light = 5,
+         },
+         workers = {
+            atlanteans_armorsmith = 1,
+            atlanteans_blackroot_farmer = 1,
+            atlanteans_builder = 10,
+            atlanteans_charcoal_burner = 1,
+            atlanteans_carrier = 40,
+            atlanteans_fishbreeder = 1,
+            atlanteans_geologist = 4,
+            atlanteans_miner = 4,
+            atlanteans_sawyer = 1,
+            atlanteans_stonecutter = 2,
+            atlanteans_toolsmith = 2,
+            atlanteans_weaponsmith = 1,
+            atlanteans_woodcutter = 3,
+            atlanteans_horse = 5,
+         },
+         -- Max health: 1, Max attack: 4, Max defense: 2, Max evade: 2
+         soldiers = {
+            [{0,0,0,0}] = 25,
+            [{1,0,0,1}] = 5,
+            [{1,1,0,0}] = 5,
+         }
+      })
+
+      place_building_in_region(player, "atlanteans_toolsmithy", sf:region(11), {
+         wares = {
+            iron = 6,
+            log = 6,
+            spidercloth = 4
+         }
+      })
+
+      place_building_in_region(player, "atlanteans_sawmill", sf:region(11), {
+         wares = {
+            log = 8
+         }
+      })
+
+      place_building_in_region(player, "atlanteans_hunters_house", sf:region(11), {
+         wares = {}
+      })
+
+      place_building_in_region(player, "atlanteans_tower", sf:region(13), {
+         soldiers = {
+            [{0,0,0,0}] = 1,
+         },
+      })
+
+      -- Get all warehouse types
+      local plr = wl.Game().players[player.number]
+      local warehouse_types = {}
+      for i, building_name in ipairs(wl.Game():get_tribe_description(plr.tribe_name).buildings) do
+      if (wl.Game():get_building_description(building_name).type_name == "warehouse") then
+         table.insert(warehouse_types, building_name)
+      end
+      end
+
+      -- index of a warehouse we will add to. Used to 'rotate' warehouses
+      local idx = 1
+
+      for i=1,100000 do
+      sleep(300000)
+
+      -- collect all ~warehouses and pick one to insert the wares
+      local warehouses = {}
+      for i, building_name in ipairs(warehouse_types) do
+            warehouses = array_combine(warehouses, plr:get_buildings(building_name))
+      end
+
+      if #warehouses > 0 then
+
+         -- adding to a warehouse with index idx, if out of range, adding to wh 1
+          if idx > #warehouses then
+            idx = 1
+         end
+
+         local wh = warehouses[idx]
+         local added = 0
+
+         if wh:get_wares("water") < 100 then
+            wh:set_wares("water", wh:get_wares("water") + 20)
+            added = added + 1
+         end
+         if wh:get_wares("log") < 100 then
+            wh:set_wares("log", wh:get_wares("log") + 20)
+            added = added + 1
+         end
+         if wh:get_wares("granite") < 100 then
+            wh:set_wares("granite", wh:get_wares("granite") + 10)
+            added = added + 1
+         end
+         if wh:get_wares("coal") < 100 then
+            wh:set_wares("coal", wh:get_wares("coal") + 5)
+            added = added + 1
+         end
+         if wh:get_wares("iron_ore") < 100 then
+            wh:set_wares("iron_ore", wh:get_wares("iron_ore") + 5)
+            added = added + 1
+         end
+         if wh:get_wares("quartz") < 10 then
+            wh:set_wares("quartz", wh:get_wares("quartz") + 1)
+            added = added + 1
+         end
+         if wh:get_wares("meat") < 50 then
+            wh:set_wares("meat", wh:get_wares("meat") + 1)
+            added = added + 1
+         end
+         if wh:get_wares("gold") < 10 then
+            wh:set_wares("gold", wh:get_wares("gold") + 1)
+            added = added + 1
+         end
+
+         if (added > 0) then
+            print (player.number..": "..added.." types of ware added to warehouse "..idx.." of "..#warehouses.." (cheating mode)")
+         end
+
+         idx = idx + 1
+      end
+   end
+end
+}

=== modified file 'data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua'
--- data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua	2016-03-01 09:31:36 +0000
+++ data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua	2016-03-04 07:08:11 +0000
@@ -8,6 +8,7 @@
 
 return {
    descname = _ "Fortified Village",
+   tooltip = _" Start the game with a fortified military installation",
    func =  function(plr, shared_in_start)
 
       local sf = wl.Game().map.player_slots[plr.number].starting_field

=== modified file 'data/tribes/scripting/starting_conditions/barbarians/headquarters.lua'
--- data/tribes/scripting/starting_conditions/barbarians/headquarters.lua	2016-01-28 05:24:34 +0000
+++ data/tribes/scripting/starting_conditions/barbarians/headquarters.lua	2016-03-04 07:08:11 +0000
@@ -8,6 +8,7 @@
 
 init = {
    descname = _ "Headquarters",
+   tooltip = _"Start the game with your headquarters only",
    func = function(player, shared_in_start)
 
    local sf = wl.Game().map.player_slots[player.number].starting_field

=== added file 'data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua'
--- data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua	1970-01-01 00:00:00 +0000
+++ data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua	2016-03-04 07:08:11 +0000
@@ -0,0 +1,175 @@
+-- =======================================================================
+--                 Start conditions for Headquarters Medium
+-- =======================================================================
+
+include "scripting/infrastructure.lua"
+
+set_textdomain("tribes")
+
+return {
+   descname = _"Trading Outpost",
+   tooltip = _"If this player runs out of important wares, they will be replenished for free",
+   func = function(player, shared_in_start)
+
+      local sf = wl.Game().map.player_slots[player.number].starting_field
+      if shared_in_start then
+         sf = shared_in_start
+      else
+         player:allow_workers("all")
+      end
+
+      hq = prefilled_buildings(player, { "barbarians_headquarters", sf.x, sf.y,
+         wares = {
+            ax = 5,
+            bread_paddle = 2,
+            blackwood = 32,
+            cloth = 5,
+            coal = 12,
+            felling_ax = 4,
+            fire_tongs = 2,
+            fish = 6,
+            fishing_rod = 2,
+            gold = 14,
+            grout = 12,
+            hammer = 12,
+            hunting_spear = 2,
+            iron = 12,
+            iron_ore = 5,
+            kitchen_tools = 4,
+            meal = 4,
+            meat = 6,
+            pick = 8,
+            barbarians_bread = 8,
+            ration = 12,
+            granite = 40,
+            scythe = 6,
+            shovel = 4,
+            snack = 3,
+            thatch_reed = 24,
+            log = 80,
+         },
+         workers = {
+            barbarians_blacksmith = 2,
+            barbarians_blacksmith_master = 1,
+            barbarians_brewer = 1,
+            barbarians_brewer_master = 1,
+            barbarians_builder = 10,
+            barbarians_charcoal_burner = 1,
+            barbarians_carrier = 40,
+            barbarians_gardener = 1,
+            barbarians_geologist = 4,
+            barbarians_lime_burner = 1,
+            barbarians_lumberjack = 3,
+            barbarians_miner = 4,
+            barbarians_ranger = 1,
+            barbarians_stonemason = 2,
+            barbarians_ox = 5,
+         },
+         -- Max health: 3, Max attack: 5, Max defense: 0, Max evade: 2
+         soldiers = {
+            [{0,0,0,0}] = 35,
+            [{1,0,0,1}] = 5,
+            [{1,1,0,0}] = 5,
+         }
+      })
+
+      place_building_in_region(player, "barbarians_metal_workshop", sf:region(11), {
+         wares = {
+            iron = 8,
+            log = 8
+         }
+      })
+
+      place_building_in_region(player, "barbarians_wood_hardener", sf:region(11), {
+         wares = {
+            log = 8
+         }
+      })
+
+      place_building_in_region(player, "barbarians_hunters_hut", sf:region(11), {
+         wares = {}
+      })
+
+      place_building_in_region(player, "barbarians_tower", sf:region(13), {
+         soldiers = {
+            [{0,0,0,0}] = 1,
+         },
+      })
+
+      -- Get all warehouse types
+      local plr = wl.Game().players[player.number]
+      local warehouse_types = {}
+      for i, building_name in ipairs(wl.Game():get_tribe_description(plr.tribe_name).buildings) do
+      if (wl.Game():get_building_description(building_name).type_name == "warehouse") then
+         table.insert(warehouse_types, building_name)
+      end
+      end
+
+      -- index of a warehouse we will add to. Used to 'rotate' warehouses
+      local idx = 1
+
+      for i=1,100000 do
+      sleep(300000)
+
+      -- collect all ~warehouses and pick one to insert the wares
+      local warehouses = {}
+      for i, building_name in ipairs(warehouse_types) do
+            warehouses = array_combine(warehouses, plr:get_buildings(building_name))
+      end
+
+      if #warehouses > 0 then
+
+         -- adding to a warehouse with index idx, if out of range, adding to wh 1
+          if idx > #warehouses then
+            idx = 1
+         end
+
+         local wh = warehouses[idx]
+         local added = 0
+
+         if plr:get_wares("water") < 40 + #warehouses * 10 then
+            wh:set_wares("water", wh:get_wares("water") + 20 + #warehouses * 2)
+            added = added + 1
+         end
+         if plr:get_wares("log") < 40 + #warehouses * 10 then
+            wh:set_wares("log", wh:get_wares("log") + 20)
+            added = added + 1
+         end
+         if plr:get_wares("granite") < 30 + #warehouses * 10 then
+            wh:set_wares("granite", wh:get_wares("granite") +  10 + #warehouses * 2)
+            added = added + 1
+         end
+         if plr:get_wares("coal") < 70 + #warehouses * 10 then
+            wh:set_wares("coal", wh:get_wares("coal") + 25 + #warehouses * 5)
+            added = added + 1
+         end
+         if plr:get_wares("iron_ore") < 30 + #warehouses * 10 then
+            wh:set_wares("iron_ore", wh:get_wares("iron_ore") + 10 + #warehouses * 2)
+            added = added + 1
+         end
+         if wh:get_wares("fish") < 40 + #warehouses * 5 then
+            wh:set_wares("fish", wh:get_wares("fish") + 10)
+            added = added + 1
+         end
+         if plr:get_wares("gold") < 20 + #warehouses * 5 then
+            wh:set_wares("gold", wh:get_wares("gold") + 3)
+            added = added + 1
+         end
+         if plr:get_wares("wheat") < 60 + #warehouses * 10 then
+            wh:set_wares("wheat", wh:get_wares("wheat") + 15 + #warehouses * 2)
+            added = added + 1
+         end
+         if plr:get_wares("barbarians_bread") < 40 + #warehouses * 5 then
+            wh:set_wares("barbarians_bread", wh:get_wares("barbarians_bread") + 8 + #warehouses * 2)
+            added = added + 1
+         end
+
+         if (added > 0) then
+            print (player.number..": "..added.." types of ware added to warehouse "..idx.." of "..#warehouses.." (cheating mode)")
+         end
+
+         idx = idx + 1
+      end
+   end
+end
+}

=== modified file 'data/tribes/scripting/starting_conditions/empire/fortified_village.lua'
--- data/tribes/scripting/starting_conditions/empire/fortified_village.lua	2016-03-01 09:31:36 +0000
+++ data/tribes/scripting/starting_conditions/empire/fortified_village.lua	2016-03-04 07:08:11 +0000
@@ -8,6 +8,7 @@
 
 return {
    descname = _ "Fortified Village",
+   tooltip = _" Start the game with a fortified military installation",
    func =  function(plr, shared_in_start)
 
    local sf = wl.Game().map.player_slots[plr.number].starting_field

=== modified file 'data/tribes/scripting/starting_conditions/empire/headquarters.lua'
--- data/tribes/scripting/starting_conditions/empire/headquarters.lua	2016-01-28 05:24:34 +0000
+++ data/tribes/scripting/starting_conditions/empire/headquarters.lua	2016-03-04 07:08:11 +0000
@@ -8,6 +8,7 @@
 
 return {
    descname = _ "Headquarters",
+   tooltip = _"Start the game with your headquarters only",
    func =  function(p, shared_in_start)
 
    local sf = wl.Game().map.player_slots[p.number].starting_field

=== added file 'data/tribes/scripting/starting_conditions/empire/trading_outpost.lua'
--- data/tribes/scripting/starting_conditions/empire/trading_outpost.lua	1970-01-01 00:00:00 +0000
+++ data/tribes/scripting/starting_conditions/empire/trading_outpost.lua	2016-03-04 07:08:11 +0000
@@ -0,0 +1,177 @@
+-- =======================================================================
+--                Starting conditions for Headquarters Medium
+-- =======================================================================
+
+include "scripting/infrastructure.lua"
+
+set_textdomain("tribes")
+
+return {
+   descname = _"Trading Outpost",
+   tooltip = _"If this player runs out of important wares, they will be replenished for free",
+   func = function(player, shared_in_start)
+
+      local sf = wl.Game().map.player_slots[player.number].starting_field
+
+      if shared_in_start then
+         sf = shared_in_start
+      else
+         player:allow_workers("all")
+      end
+
+      prefilled_buildings(player, { "empire_headquarters", sf.x, sf.y,
+         wares = {
+            armor_helmet = 4,
+            spear_wooden = 5,
+            felling_ax = 6,
+            bread_paddle = 2,
+            basket = 2,
+            empire_bread = 8,
+            cloth = 5,
+            coal = 12,
+            fire_tongs = 2,
+            fish = 6,
+            fishing_rod = 2,
+            flour = 4,
+            gold = 14,
+            grape = 4,
+            hammer = 14,
+            hunting_spear = 2,
+            iron = 12,
+            iron_ore = 5,
+            kitchen_tools = 4,
+            marble = 25,
+            marble_column = 6,
+            meal = 4,
+            meat = 6,
+            pick = 8,
+            ration = 12,
+            saw = 2,
+            scythe = 5,
+            shovel = 6,
+            granite = 40,
+            log = 80,
+            water = 12,
+            wheat = 4,
+            wine = 8,
+            planks = 45,
+            wool = 2,
+         },
+         workers = {
+            empire_armorsmith = 1,
+            empire_brewer = 1,
+            empire_builder = 10,
+            empire_carrier = 40,
+            empire_charcoal_burner = 1,
+            empire_geologist = 4,
+            empire_lumberjack = 3,
+            empire_miner = 4,
+            empire_stonemason = 2,
+            empire_toolsmith = 2,
+            empire_weaponsmith = 1,
+            empire_donkey = 5,
+         },
+         -- Max health: 4, Max attack: 4, Max defense: 0, Max evade: 2
+         soldiers = {
+            [{0,0,0,0}] = 35,
+            [{1,0,0,1}] = 5,
+            [{1,1,0,0}] = 5,
+         }
+      })
+
+      place_building_in_region(player, "empire_toolsmithy", sf:region(11), {
+         wares = {
+            iron = 8,
+            log = 8
+         }
+      })
+
+      place_building_in_region(player, "empire_sawmill", sf:region(11), {
+         wares = {
+            log = 8
+         }
+      })
+
+      place_building_in_region(player, "empire_hunters_house", sf:region(11), {
+         wares = {}
+      })
+
+      place_building_in_region(player, "empire_tower", sf:region(13), {
+         soldiers = {
+            [{0,0,0,0}] = 1,
+         },
+      })
+
+      -- Get all warehouse types
+      local plr = wl.Game().players[player.number]
+      local warehouse_types = {}
+      for i, building_name in ipairs(wl.Game():get_tribe_description(plr.tribe_name).buildings) do
+      if (wl.Game():get_building_description(building_name).type_name == "warehouse") then
+         table.insert(warehouse_types, building_name)
+      end
+      end
+
+      -- index of a warehouse we will add to. Used to 'rotate' warehouses
+      local idx = 1
+
+      for i=1,100000 do
+      sleep(300000)
+
+      -- collect all ~warehouses and pick one to insert the wares
+      local warehouses = {}
+      for i, building_name in ipairs(warehouse_types) do
+            warehouses = array_combine(warehouses, plr:get_buildings(building_name))
+      end
+
+      if #warehouses > 0 then
+
+         -- adding to a warehouse with index idx, if out of range, adding to wh 1
+          if idx > #warehouses then
+            idx = 1
+         end
+
+         local wh = warehouses[idx]
+         local added = 0
+
+         if wh:get_wares("water") < 100 then
+            wh:set_wares("water", wh:get_wares("water") + 20)
+         end
+         if wh:get_wares("log") < 100 then
+            wh:set_wares("log", wh:get_wares("log") + 10)
+         end
+         if wh:get_wares("granite") < 100 then
+            wh:set_wares("granite", wh:get_wares("granite") + 5 + #warehouses)
+         end
+         if wh:get_wares("coal") < 100 then
+            wh:set_wares("coal", wh:get_wares("coal") + 5)
+         end
+         if wh:get_wares("iron_ore") < 100 then
+            wh:set_wares("iron_ore", wh:get_wares("iron_ore") + 5)
+         end
+         if wh:get_wares("marble") < 100 then
+            wh:set_wares("marble", wh:get_wares("marble") + 5)
+         end
+         if wh:get_wares("fish") < 50 then
+            wh:set_wares("fish", wh:get_wares("fish") + 1)
+         end
+         if wh:get_wares("gold") < 50 then
+            wh:set_wares("gold", wh:get_wares("gold") + 1)
+         end
+         if plr:get_wares("wheat") < 60 + #warehouses * 10 then
+            wh:set_wares("wheat", wh:get_wares("wheat") + 10 + #warehouses * 2)
+            added = added + 1
+         end
+         if plr:get_wares("flour") < 30 + #warehouses * 10 then
+            wh:set_wares("flour", wh:get_wares("flour") + #warehouses * 5)
+            added = added + 1
+         end
+
+         if (added > 0) then
+            print (player.number..": "..added.." types of ware added to warehouse "..idx.." of "..#warehouses.." (cheating mode)")
+         end
+
+         idx = idx + 1
+      end
+   end
+end
+}

=== modified file 'src/logic/map_objects/tribes/tribe_basic_info.cc'
--- src/logic/map_objects/tribes/tribe_basic_info.cc	2015-11-28 22:29:26 +0000
+++ src/logic/map_objects/tribes/tribe_basic_info.cc	2016-03-04 07:08:11 +0000
@@ -40,7 +40,9 @@
 		{
 			std::unique_ptr<LuaTable> script_table = lua.run_script(script_path);
 			script_table->do_not_warn_about_unaccessed_keys();
-			initializations.push_back(Initialization(script_path, script_table->get_string("descname")));
+			initializations.push_back(Initialization(script_path,
+																  script_table->get_string("descname"),
+																  script_table->get_string("tooltip")));
 		}
 	} catch (const WException & e) {
 		throw Widelands::GameDataError

=== modified file 'src/logic/map_objects/tribes/tribe_basic_info.h'
--- src/logic/map_objects/tribes/tribe_basic_info.h	2015-11-28 22:29:26 +0000
+++ src/logic/map_objects/tribes/tribe_basic_info.h	2016-03-04 07:08:11 +0000
@@ -34,11 +34,13 @@
 
 	/// Script path and localized name for a starting condition
 	struct Initialization {
-		Initialization(std::string init_script, std::string init_descname) :
+		Initialization(std::string init_script, std::string init_descname, std::string init_tooltip) :
 			script(init_script),
-			descname(init_descname) {}
+			descname(init_descname),
+			tooltip(init_tooltip) {}
 		std::string script;
 		std::string descname;
+		std::string tooltip;
 	};
 
 	TribeBasicInfo(std::unique_ptr<LuaTable> table);

=== modified file 'src/network/netclient.cc'
--- src/network/netclient.cc	2016-02-16 06:54:47 +0000
+++ src/network/netclient.cc	2016-03-04 07:08:11 +0000
@@ -784,7 +784,9 @@
 				std::unique_ptr<LuaTable> t = lua.run_script(initialization_script);
 				t->do_not_warn_about_unaccessed_keys();
 				info.initializations.push_back
-					(TribeBasicInfo::Initialization(initialization_script, t->get_string("descname")));
+					(TribeBasicInfo::Initialization(initialization_script,
+															  t->get_string("descname"),
+															  t->get_string("tooltip")));
 			}
 			d->settings.tribes.push_back(info);
 		}

=== modified file 'src/wui/multiplayersetupgroup.cc'
--- src/wui/multiplayersetupgroup.cc	2016-02-07 16:31:06 +0000
+++ src/wui/multiplayersetupgroup.cc	2016-03-04 07:08:11 +0000
@@ -377,6 +377,7 @@
 			for (const TribeBasicInfo& tribeinfo : settings.tribes) {
 				if (tribeinfo.name == player_setting.tribe) {
 					init->set_title(_(tribeinfo.initializations.at(player_setting.initialization_index).descname));
+					init->set_tooltip(_(tribeinfo.initializations.at(player_setting.initialization_index).tooltip));
 					break;
 				}
 			}

=== modified file 'src/wui/playerdescrgroup.cc'
--- src/wui/playerdescrgroup.cc	2016-01-28 05:24:34 +0000
+++ src/wui/playerdescrgroup.cc	2016-03-04 07:08:11 +0000
@@ -202,6 +202,11 @@
 								(tribeinfo.initializations.at
 									(player.initialization_index)
 								 .descname));
+						d->btnPlayerInit->set_tooltip
+							(_
+								(tribeinfo.initializations.at
+									(player.initialization_index)
+								 .tooltip));
 						break;
 					}
 				}


Follow ups