← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1661220-campaigns-barracks into lp:widelands

 

Notabilis has proposed merging lp:~widelands-dev/widelands/bug-1661220-campaigns-barracks into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1661220 in widelands: "Review campaigns in regard of needed barracks"
  https://bugs.launchpad.net/widelands/+bug/1661220

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1661220-campaigns-barracks/+merge/317033

Added an objective to build a barracks to the atlanteans campaign. Is triggered as soon as the mining industry is finished and before the training-objective is called.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1661220-campaigns-barracks into lp:widelands.
=== modified file 'data/campaigns/atl01.wmf/scripting/mission_thread.lua'
--- data/campaigns/atl01.wmf/scripting/mission_thread.lua	2016-11-30 08:32:29 +0000
+++ data/campaigns/atl01.wmf/scripting/mission_thread.lua	2017-02-11 20:25:29 +0000
@@ -94,6 +94,19 @@
    }) do sleep(3478) end
    set_objective_done(o)
 
+   run(build_barracks)
+end
+
+function build_barracks()
+
+   msg_boxes(barracks_story)
+
+   local o = add_campaign_objective(obj_build_barracks)
+   while not check_for_buildings(p1, {
+      atlanteans_barracks = 1,
+   }) do sleep(3784) end
+   set_objective_done(o)
+
    sleep(15 * 60 * 1000) -- sleep a while
    run(build_training)
 end

=== modified file 'data/campaigns/atl01.wmf/scripting/texts.lua'
--- data/campaigns/atl01.wmf/scripting/texts.lua	2016-12-28 22:11:45 +0000
+++ data/campaigns/atl01.wmf/scripting/texts.lua	2017-02-11 20:25:29 +0000
@@ -94,6 +94,16 @@
    )
 }
 
+obj_build_barracks = {
+   name = "obj_build_barracks",
+   title = _"Build a barracks",
+   number = 1,
+   body = objective_text(_"Recruiting new soldiers",
+      _[[Now that weapons are forged new soldiers can be recruited. For this, a light trident and a tabard have to be delivered to the barracks. There, a recruit from the warehouse receives them together with some basic training and becomes a soldier.]] .. paragraphdivider() ..
+      listitem_bullet(_[[Build a barracks]])
+   )
+}
+
 obj_make_training_buildings = {
    name = "obj_make_training_buildings",
    title = _"Build training sites for soldiers",
@@ -302,6 +312,16 @@
    },
 }
 
+barracks_story = {
+   {
+      title = _"Jundlina Writes a Letter",
+      body = jundlina(_"Jundlina",
+         -- TRANSLATORS: Jundlina
+         _([[I received words that our mining industry started working. Now that we are forging weapons, I will send a letter to Sidolus that its time to build a barracks and start training soldiers.]]))
+         .. new_objectives(obj_build_barracks)
+   }
+}
+
 training_story = {
    {
       title = _"Jundlina Summons Sidolus",


Follow ups