widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #11586
[Merge] lp:~weedfreak/widelands/feature-village into lp:widelands
R M has proposed merging lp:~weedfreak/widelands/feature-village into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~weedfreak/widelands/feature-village/+merge/333794
Added alternative start condition for 3 existing tribes. For each tribe a new game will give an new start condition, adding a few basic buildings at the expense of fewer soldiers, to simulate a start where you have lived peacefully for some time.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~weedfreak/widelands/feature-village into lp:widelands.
=== modified file 'data/tribes/preload.lua'
--- data/tribes/preload.lua 2016-09-01 15:23:25 +0000
+++ data/tribes/preload.lua 2017-11-16 09:19:54 +0000
@@ -22,6 +22,7 @@
dirname .. "scripting/starting_conditions/barbarians/headquarters.lua";
dirname .. "scripting/starting_conditions/barbarians/fortified_village.lua";
dirname .. "scripting/starting_conditions/barbarians/trading_outpost.lua";
+ dirname .. "scripting/starting_conditions/barbarians/village.lua";
}
},
@@ -38,6 +39,7 @@
dirname .. "scripting/starting_conditions/empire/headquarters.lua";
dirname .. "scripting/starting_conditions/empire/fortified_village.lua";
dirname .. "scripting/starting_conditions/empire/trading_outpost.lua";
+ dirname .. "scripting/starting_conditions/empire/village.lua";
}
},
@@ -54,6 +56,7 @@
dirname .. "scripting/starting_conditions/atlanteans/headquarters.lua";
dirname .. "scripting/starting_conditions/atlanteans/fortified_village.lua";
dirname .. "scripting/starting_conditions/atlanteans/trading_outpost.lua";
+ dirname .. "scripting/starting_conditions/atlanteans/village.lua";
}
}
}
=== added file 'data/tribes/scripting/starting_conditions/atlanteans/village.lua'
--- data/tribes/scripting/starting_conditions/atlanteans/village.lua 1970-01-01 00:00:00 +0000
+++ data/tribes/scripting/starting_conditions/atlanteans/village.lua 2017-11-16 09:19:54 +0000
@@ -0,0 +1,89 @@
+-- =======================================================================
+-- Village Starting Conditions
+-- =======================================================================
+
+include "scripting/infrastructure.lua"
+
+set_textdomain("tribes")
+
+return {
+ -- TRANSLATORS: This is the name of a starting condition
+ descname = _ "Village",
+ -- TRANSLATORS: This is the tooltip for the "Village" starting condition
+ tooltip = _"Start the game with a village installation",
+ func = function(plr, shared_in_start)
+
+ local sf = wl.Game().map.player_slots[plr.number].starting_field
+ if shared_in_start then
+ sf = shared_in_start
+ else
+ plr:allow_workers("all")
+ end
+
+ prefilled_buildings(plr, { "atlanteans_headquarters", sf.x, sf.y,
+ wares = {
+ diamond = 7,
+ iron_ore = 5,
+ quartz = 9,
+ granite = 50,
+ spider_silk = 9,
+ log = 16,
+ coal = 12,
+ gold = 4,
+ 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_blackroot_farmer = 1,
+ atlanteans_builder = 10,
+ atlanteans_charcoal_burner = 1,
+ atlanteans_carrier = 38,
+ atlanteans_fishbreeder = 1,
+ atlanteans_geologist = 4,
+ atlanteans_miner = 4,
+ atlanteans_stonecutter = 2,
+ atlanteans_toolsmith = 1,
+ atlanteans_woodcutter = 3,
+ atlanteans_horse = 5,
+ atlanteans_trainer = 1,
+ },
+ soldiers = {
+ [{0,0,0,0}] = 5,
+ },
+ })
+
+ place_building_in_region(plr, "atlanteans_toolsmithy", sf:region(7), {
+ inputs = { log = 6 }
+ })
+
+ place_building_in_region(plr, "atlanteans_sawmill", sf:region(7), {
+ inputs = { log = 6 }
+ })
+ end
+}
=== added file 'data/tribes/scripting/starting_conditions/barbarians/village.lua'
--- data/tribes/scripting/starting_conditions/barbarians/village.lua 1970-01-01 00:00:00 +0000
+++ data/tribes/scripting/starting_conditions/barbarians/village.lua 2017-11-16 09:19:54 +0000
@@ -0,0 +1,84 @@
+-- =======================================================================
+-- Start conditions for Village
+-- =======================================================================
+
+include "scripting/infrastructure.lua"
+
+set_textdomain("tribes")
+
+return {
+ -- TRANSLATORS: This is the name of a starting condition
+ descname = _ "Village",
+ -- TRANSLATORS: This is the tooltip for the "Village" starting condition
+ tooltip = _"Start the game with a village installation",
+ func = function(plr, shared_in_start)
+
+ local sf = wl.Game().map.player_slots[plr.number].starting_field
+
+ if shared_in_start then
+ sf = shared_in_start
+ else
+ plr:allow_workers("all")
+ end
+
+ hq = prefilled_buildings(plr, { "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 = 4,
+ grout = 12,
+ hammer = 12,
+ hunting_spear = 2,
+ iron = 8,
+ 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_brewer = 1,
+ barbarians_builder = 10,
+ barbarians_charcoal_burner = 1,
+ barbarians_carrier = 38,
+ barbarians_gardener = 1,
+ barbarians_geologist = 4,
+ barbarians_lumberjack = 2,
+ barbarians_miner = 4,
+ barbarians_ranger = 1,
+ barbarians_stonemason = 2,
+ barbarians_ox = 5,
+ barbarians_trainer = 1,
+ },
+ soldiers = {
+ [{0,0,0,0}] = 5,
+ }
+ })
+
+ place_building_in_region(plr, "barbarians_metal_workshop", sf:region(8), {
+ inputs = { iron = 8 },
+ })
+
+ place_building_in_region(plr, "barbarians_wood_hardener", sf:region(8), {
+ inputs = { log = 6 },
+ })
+ place_building_in_region(plr, "barbarians_lime_kiln", sf:region(8), {
+ inputs = { granite = 6, coal = 3 },
+ })
+ end
+}
=== added file 'data/tribes/scripting/starting_conditions/empire/village.lua'
--- data/tribes/scripting/starting_conditions/empire/village.lua 1970-01-01 00:00:00 +0000
+++ data/tribes/scripting/starting_conditions/empire/village.lua 2017-11-16 09:19:54 +0000
@@ -0,0 +1,94 @@
+-- =======================================================================
+-- Empire Village Starting Conditions
+-- =======================================================================
+
+include "scripting/infrastructure.lua"
+
+set_textdomain("tribes")
+
+return {
+ -- TRANSLATORS: This is the name of a starting condition
+ descname = _ "Village",
+ -- TRANSLATORS: This is the tooltip for the "Village" starting condition
+ tooltip = _"Start the game with a village installation",
+ func = function(plr, shared_in_start)
+
+ local sf = wl.Game().map.player_slots[plr.number].starting_field
+
+ if shared_in_start then
+ sf = shared_in_start
+ else
+ plr:allow_workers("all")
+ end
+
+prefilled_buildings(plr, { "empire_headquarters", sf.x, sf.y,
+ wares = {
+ armor_helmet = 3,
+ 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 = 4,
+ grape = 4,
+ hammer = 14,
+ hunting_spear = 2,
+ iron = 9,
+ 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 = 29,
+ water = 12,
+ wheat = 4,
+ wine = 8,
+ planks = 45,
+ wool = 2,
+ },
+ workers = {
+ empire_brewer = 1,
+ empire_builder = 10,
+ empire_carrier = 39,
+ empire_charcoal_burner = 1,
+ empire_geologist = 4,
+ empire_lumberjack = 3,
+ empire_miner = 4,
+ empire_stonemason = 1,
+ empire_toolsmith = 1,
+ empire_trainer = 1,
+ empire_donkey = 5,
+ },
+ soldiers = {
+ [{0,0,0,0}] = 5,
+ }
+ })
+
+ place_building_in_region(plr, "empire_toolsmithy", sf:region(9), {
+ inputs = {
+ iron = 8,
+ }
+ })
+
+ place_building_in_region(plr, "empire_sawmill", sf:region(9), {
+ inputs = {
+ log = 6,
+ }
+ })
+
+ place_building_in_region(plr, "empire_stonemasons_house", sf:region(9))
+ end
+}