GunChleoc has proposed merging lp:~widelands-dev/widelands/casern into
lp:widelands.
Commit message:
Added WIP Barracks (casern) buildings.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #669699 in widelands: "trainer is only a carrier"
https://bugs.launchpad.net/widelands/+bug/669699
Bug #1075562 in widelands: "Implement a casern for soldier recruting"
https://bugs.launchpad.net/widelands/+bug/1075562
Bug #1422158 in widelands: "A trainer should be created before soldiers"
https://bugs.launchpad.net/widelands/+bug/1422158
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/casern/+merge/307647
This is another one that I would like to add early for Build 20.
In this branch, the Barracks work like the Cattle/Donkey/Horse farms. Notabilis
is working on allowing worker input queues in a separate branch.
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/casern into lp:widelands.
=== modified file 'data/tribes/atlanteans.lua'
--- data/tribes/atlanteans.lua 2016-09-01 15:43:01 +
+++ data/tribes/atlanteans.lua 2016-10-05 05:11:30 +
@@ -246,6 +246,7 @@
"atlanteans_weaponsmithy",
"atlanteans_armorsmithy",
"atlanteans_shipyard",
+ "atlanteans_barracks",
-- Big
"atlanteans_horsefarm",
=== modified file 'data/tribes/barbarians.lua'
--- data/tribes/barbarians.lua 2016-01-31 21:03:15 +
+++ data/tribes/barbarians.lua 2016-10-05 05:11:30 +
@@ -201,6 +201,7 @@
"barbarians_warmill",
"barbarians_ax_workshop",
"barbarians_shipyard",
+ "barbarians_barracks",
-- Big
"barbarians_cattlefarm",
=== added directory 'data/tribes/buildings/productionsites/atlanteans/barracks'
=== added file 'data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua'
--- data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua 1970-01-01 00:00:00 +
+++ data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua 2016-10-05 05:11:30 +
@@ -0,0 +1,27 @@
+-- This include can be removed when all help texts have been defined.
+include "tribes/scripting/help/global_helptexts.lua"
+
+function building_helptext_lore()
+ -- #TRANSLATORS: Lore helptext for a building
+ return no_lore_text_yet()
+end
+
+function building_helptext_lore_author()
+ -- #TRANSLATORS: Lore author helptext for a building
+ return no_lore_author_text_yet()
+end
+
+function building_helptext_purpose()
+ -- #TRANSLATORS: Purpose helptext for a building
+ return no_purpose_text_yet()
+end
+
+function building_helptext_note()
+ -- #TRANSLATORS: Note helptext for a building
+ return ""
+end
+
+function building_helptext_performance()
+ -- #TRANSLATORS: Performance helptext for a building
+ return no_performance_text_yet()
+end
=== added file 'data/tribes/buildings/productionsites/atlanteans/barracks/idle_00.png'
Binary files data/tribes/buildings/productionsites/atlanteans/barracks/idle_00.png 1970-01-01 00:00:00 + and data/tribes/buildings/productionsites/atlanteans/barracks/idle_00.png 2016-10-05 05:11:30 + differ
=== added file 'data/tribes/buildings/productionsites/atlanteans/barracks/idle_00_pc.png'
Binary files data/tribes/buildings/productionsites/atlanteans/barracks/idle_00_pc.png 1970-01-01 00:00:00 + and data/tribes/buildings/productionsites/atlanteans/barracks/idle_00_pc.png 2016-10-05 05:11:30 + differ
=== added file 'data/tribes/buildings/productionsites/atlanteans/barracks/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/barracks/init.lua 1970-01-01 00:00:00 +
+++ data/tribes/buildings/productionsites/atlanteans/barracks/init.lua 2016-10-05 05:11:30 +
@@ -0,0 +1,65 @@
+dirname = path.dirname(__file__)
+
+tribes:new_productionsite_type {
+ msgctxt = "atlanteans_building",
+ name = "atlanteans_barracks",
+ -- TRANSLATORS: This is a building name used in lists of buildings
+ descname = pgettext("atlanteans_building", "Barracks"),
+ helptext_script = dirname .. "helptexts.lua",
+ icon = dirname .. "menu.png",
+ size = "medium",
+
+ buildcost = {
+ log = 2,
+ granite = 2,
+ planks = 2,
+ spidercloth = 3,
+ },
+ return_on_dismantle = {
+ log = 1,
+ granite = 1,
+ planks = 1,
+ spidercloth = 1,
+ },
+
+ animations = {
+ idle = {
+ pictures = path.list_files(dirname .. "idle_??.png"),
+ hotspot = { 44, 65 },
+ },
+ working = { -- TODO(GunChleoc): make animations
+ pictures = path.list_files(dirname .. "idle_??.png"),
+ hotspot = { 44, 65 },
+ }
+ },
+
+ aihints = {
+ },
+
+ working_positions = {
+ atlanteans_trainer = 1
+ },
+
+ inputs = {
+ { name = "tabard", amount = 8 },
+ { name = "trident_light", amount = 8 }
+ },
+ outputs = {
+ "atlanteans_soldier",
+ },
+
+ programs = {
+ work = {
+ -- TRANSLATORS: Completed/Skipped/Did not start recruiting soldier because ...
+ -- TODO(GunChleoc): this should cost us a