Benedikt Straub has proposed merging lp:~widelands-dev/widelands/fri-02-fix 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1764154 in widelands: "Frisian scenario 2 fails on peace option"
  https://bugs.launchpad.net/widelands/+bug/1764154

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fri-02-fix/+merge/343280

Fixed a crash in the second frisian scenario.
Also, some buildings now use the requires_helper AI hint, which seems to have 
been overlooked somehow.

I didnĀ“t play the whole scenario, but I tested the fix in a script and there it 
works.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fri-02-fix into lp:widelands.
=== modified file 'data/campaigns/fri02.wmf/scripting/mission_thread.lua'
--- data/campaigns/fri02.wmf/scripting/mission_thread.lua	2018-03-06 09:50:54 +0000
+++ data/campaigns/fri02.wmf/scripting/mission_thread.lua	2018-04-15 18:49:40 +0000
@@ -207,11 +207,11 @@
    local hq = p2:get_buildings("empire_headquarters")[1]
 
    -- transfer all wares that frisians and empire have in common
-   for idx,name in ipairs(p1.tribe.wares) do
-      if p2.tribe:has_ware(name) then
-         local amount = wh:get_wares(name)
-         wh:set_wares(name, 0)
-         hq:set_wares(name, hq:get_wares(name) + amount)
+   for idx,ware in ipairs(p1.tribe.wares) do
+      if p2.tribe:has_ware(ware.name) then
+         local amount = wh:get_wares(ware.name)
+         wh:set_wares(ware.name, 0)
+         hq:set_wares(ware.name, hq:get_wares(ware.name) + amount)
       end
    end
    campaign_message_box(supply_murilius_thanks)

=== modified file 'data/tribes/buildings/productionsites/frisians/aqua_farm/init.lua'
--- data/tribes/buildings/productionsites/frisians/aqua_farm/init.lua	2018-02-23 07:18:54 +0000
+++ data/tribes/buildings/productionsites/frisians/aqua_farm/init.lua	2018-04-15 18:49:40 +0000
@@ -33,7 +33,7 @@
 
    aihints = {
       prohibited_till = 760,
-      supports_production_of = { "clay" },
+      requires_helper = true
    },
 
    working_positions = {

=== modified file 'data/tribes/buildings/productionsites/frisians/beekeepers_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/beekeepers_house/init.lua	2018-03-24 15:53:51 +0000
+++ data/tribes/buildings/productionsites/frisians/beekeepers_house/init.lua	2018-04-15 18:49:40 +0000
@@ -33,6 +33,7 @@
 
    aihints = {
       prohibited_till = 620,
+      requires_helper = true
    },
 
    working_positions = {

=== modified file 'data/tribes/buildings/productionsites/frisians/collectors_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/collectors_house/init.lua	2018-02-17 15:41:29 +0000
+++ data/tribes/buildings/productionsites/frisians/collectors_house/init.lua	2018-04-15 18:49:40 +0000
@@ -33,6 +33,7 @@
 
    aihints = {
       prohibited_till = 470,
+      requires_helper = true
    },
 
    working_positions = {

_______________________________________________
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

Reply via email to