Merge lp:~widelands-dev/widelands/empire04_bug_fix_enhance into lp:widelands
- empire04_bug_fix_enhance
- Merge into trunk
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 8815 | ||||||||||||
Proposed branch: | lp:~widelands-dev/widelands/empire04_bug_fix_enhance | ||||||||||||
Merge into: | lp:widelands | ||||||||||||
Diff against target: |
1222 lines (+466/-306) 16 files modified
data/campaigns/emp04.wmf/scripting/mission_thread.lua (+152/-108) data/campaigns/emp04.wmf/scripting/starting_conditions.lua (+12/-8) data/campaigns/emp04.wmf/scripting/texts.lua (+51/-8) data/campaigns/emp04.wmf/scripting/tribes/brewery1.lua (+8/-1) data/campaigns/emp04.wmf/scripting/tribes/brewery2.lua (+63/-0) data/campaigns/emp04.wmf/scripting/tribes/farm1.lua (+5/-6) data/campaigns/emp04.wmf/scripting/tribes/farm2.lua (+76/-0) data/campaigns/emp04.wmf/scripting/tribes/foresters_house1.lua (+0/-1) data/campaigns/emp04.wmf/scripting/tribes/foresters_house2.lua (+0/-44) data/campaigns/emp04.wmf/scripting/tribes/init.lua (+25/-10) data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house1.lua (+1/-1) data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house2.lua (+0/-54) data/campaigns/emp04.wmf/scripting/tribes/mill1.lua (+7/-2) data/campaigns/emp04.wmf/scripting/tribes/mill2.lua (+63/-0) data/campaigns/emp04.wmf/scripting/tribes/well1.lua (+3/-3) data/campaigns/emp04.wmf/scripting/tribes/well2.lua (+0/-60) |
||||||||||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands/empire04_bug_fix_enhance | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
hessenfarmer | Approve | ||
Review via email: mp+353742@code.launchpad.net |
Commit message
Empire 4 scenario has been hardened against unforeseen userinteraction.
some buildings have been changed
farms can now be upgraded after plans are found
same with mill and brewery their degraded version can be build by the player
added some soldiers to the temple and added p3 to the same team as p2 to prevent p2 from conquering
Description of the change
needs intensive testing
GunChleoc (gunchleoc) wrote : | # |
hessenfarmer (stephan-lutz) wrote : | # |
adressed the review comments.
Had hoped you would review the texts. Thanks a lot ;-)
have playtested the cooperative path. Ai is good but scenario is definitly winnable. Especially as the player now can increase beer and flour production before the deal with julia is done.
need to test the military path now
hessenfarmer (stephan-lutz) wrote : | # |
military route tested as well. no anomalies found.
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 3839. State: failed. Details: https:/
Appveyor build 3637. State: success. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
I have played the peaceful path, and I have also let the Barbarian sack me after first contact with the temple. all went well, so this can go in :)
I noticed one more thing: when a player doesn't listen to instructions and doesn't click on an unproductive farm when told to do so, there's no reminder in the objectives. Add an objective for that? Please feel free to merge this branch without it :)
MP (pagel-d) wrote : | # |
seems good to go to me as well.
GunChleoc (gunchleoc) wrote : | # |
Let's have it now then. An additional objective for opening the farm window can always be added later - I have created a bug: https:/
@bunnybot merge
hessenfarmer (stephan-lutz) wrote : | # |
Thanks for the Review.
will try to solve the 2 small issues identified (farm not dismantable, objective for clicking the farm) this evening. After a short Regression test I will ask bunnybot for merging.
bunnybot (widelandsofficial) wrote : | # |
Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.
Travis build 3839. State: failed. Details: https:/
hessenfarmer (stephan-lutz) wrote : | # |
Currently it's not possible to have the farms dismanteable after the plans are found as the objective to click on the farm window works fine I Think we should have this.
@bunnybot merge
GunChleoc (gunchleoc) wrote : | # |
Agreed - I have done the proofreading for the new string now.
hessenfarmer (stephan-lutz) wrote : | # |
@bunnybot merge
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 3913. State: passed. Details: https:/
Appveyor build 3711. State: success. Details: https:/
Preview Diff
1 | === modified file 'data/campaigns/emp04.wmf/scripting/mission_thread.lua' |
2 | --- data/campaigns/emp04.wmf/scripting/mission_thread.lua 2018-05-29 20:14:16 +0000 |
3 | +++ data/campaigns/emp04.wmf/scripting/mission_thread.lua 2018-09-08 11:25:40 +0000 |
4 | @@ -13,7 +13,7 @@ |
5 | local o = add_campaign_objective(obj_dismantle_buildings) |
6 | local buildmessage = false |
7 | sleep(5000) |
8 | - while count_buildings(p1, {"empire_fishers_house", "empire_quarry", "empire_lumberjacks_house2", "empire_well2"}) > 0 do |
9 | + while count_buildings(p1, {"empire_fishers_house", "empire_quarry", "empire_lumberjacks_house1", "empire_well1"}) > 0 do |
10 | if mv.windows.field_action and mv.windows.field_action.tabs.small and not buildmessage then |
11 | campaign_message_box(amalea_19) |
12 | buildmessage = true |
13 | @@ -22,7 +22,7 @@ |
14 | end |
15 | sleep(2000) |
16 | p1:allow_buildings("all") |
17 | - p1:forbid_buildings{"empire_farm", "empire_mill", "empire_brewery", "empire_trainingcamp", "empire_colosseum"} |
18 | + p1:forbid_buildings{"empire_farm", "empire_farm2", "empire_mill", "empire_brewery", "empire_mill2", "empire_brewery2","empire_trainingcamp", "empire_colosseum", "empire_lumberjacks_house1", "empire_well1", "empire_foresters_house1"} |
19 | o.done = true |
20 | |
21 | campaign_message_box(amalea_3) |
22 | @@ -35,36 +35,42 @@ |
23 | local f = map:get_field(47, 10) |
24 | local farmclick = false |
25 | local count = 0 |
26 | - while not farmclick do |
27 | + local o1 = add_campaign_objective(obj_click_farmbuilding) |
28 | + o1.done = true |
29 | + while not (farmclick or p1.defeated) do |
30 | if mv.windows.building_window and not mv.windows.building_window.buttons.dismantle and not mv.windows.building_window.tabs.wares and mv.windows.building_window.tabs.workers then |
31 | farmclick = true |
32 | end |
33 | count = count + 1 |
34 | if count == 1201 then |
35 | campaign_message_box(amalea_18) |
36 | + o1.done = false |
37 | end |
38 | sleep(500) |
39 | end |
40 | |
41 | - campaign_message_box(amalea_2) |
42 | - local o = add_campaign_objective(obj_find_farm_plans) |
43 | - while not (f.owner == p1) do |
44 | - sleep(4000) |
45 | - end |
46 | - if f.immovable then |
47 | - local prior_center = scroll_to_field(f) |
48 | - campaign_message_box(amalea_4) |
49 | - sleep(2000) |
50 | - f.immovable:remove() |
51 | - sleep(2000) |
52 | - scroll_to_map_pixel(prior_center) |
53 | - else |
54 | - print("Failed to remove artifact at (" .. f.x .. ", " .. f.y .. ")") |
55 | - end |
56 | + o1.done = true |
57 | + if not p1.defeated then |
58 | + campaign_message_box(amalea_2) |
59 | + local o = add_campaign_objective(obj_find_farm_plans) |
60 | + while not (f.owner == p1) do |
61 | + sleep(4000) |
62 | + end |
63 | + if f.immovable then |
64 | + local prior_center = scroll_to_field(f) |
65 | + campaign_message_box(amalea_4) |
66 | + sleep(2000) |
67 | + f.immovable:remove() |
68 | + sleep(2000) |
69 | + scroll_to_map_pixel(prior_center) |
70 | + else |
71 | + print("Failed to remove artifact at (" .. f.x .. ", " .. f.y .. ")") |
72 | + end |
73 | |
74 | - o.done = true |
75 | - p1:allow_buildings{"empire_farm"} |
76 | - run (wheat_chain) |
77 | + o.done = true |
78 | + p1:allow_buildings{"empire_farm", "empire_farm2"} |
79 | + run (wheat_chain) |
80 | + end |
81 | end |
82 | |
83 | -- the chaotic road network has to be cleared |
84 | @@ -98,12 +104,14 @@ |
85 | cleared = false |
86 | end |
87 | timer = timer + 1 |
88 | - if timer == 100 then |
89 | + if timer == 100 and not p1.defeated then |
90 | campaign_message_box(amalea_20) |
91 | end |
92 | end |
93 | - o.done = true |
94 | - campaign_message_box(amalea_6) |
95 | + if not p1.defeated then |
96 | + o.done = true |
97 | + campaign_message_box(amalea_6) |
98 | + end |
99 | end |
100 | |
101 | -- the foresters have to be replaced too |
102 | @@ -121,7 +129,7 @@ |
103 | end |
104 | end |
105 | end |
106 | - if #p1:get_buildings("empire_foresters_house2") > 0 then |
107 | + if #p1:get_buildings("empire_foresters_house1") > 0 then |
108 | local o = add_campaign_objective(obj_replace_foresters) |
109 | campaign_message_box(amalea_7) |
110 | while #p1:get_buildings("empire_foresters_house") < 2 do sleep(3249) end |
111 | @@ -134,19 +142,23 @@ |
112 | function quarries_lumberjacks() |
113 | local o = add_campaign_objective(obj_build_quarries_and_lumberjacks) |
114 | while not check_for_buildings(p1, { empire_lumberjacks_house = 3, empire_quarry = 2}) do sleep(3000) end |
115 | - o.done = true |
116 | - campaign_message_box(amalea_5) |
117 | - run(produce_food) |
118 | - run(no_trees) |
119 | + if not p1.defeated then |
120 | + o.done = true |
121 | + campaign_message_box(amalea_5) |
122 | + run(produce_food) |
123 | + run(no_trees) |
124 | + end |
125 | end |
126 | |
127 | -- now we can start to produce food for our miners |
128 | function produce_food() |
129 | local o = add_campaign_objective(obj_produce_fish) |
130 | while p1:get_produced_wares_count("ration") < 14 do sleep(3000) end |
131 | - o.done = true |
132 | - run(steel) |
133 | - run(charcoal) |
134 | + if not p1.defeated then |
135 | + o.done = true |
136 | + run(steel) |
137 | + run(charcoal) |
138 | + end |
139 | end |
140 | |
141 | -- after having started the metal production we need tools and later on we need soldiers |
142 | @@ -170,37 +182,17 @@ |
143 | ) < 10) do |
144 | sleep(2500) |
145 | end |
146 | - campaign_message_box(diary_page_2) |
147 | - o.done = true |
148 | - sleep(10000) |
149 | - run(check_enemy) |
150 | - |
151 | - -- enough tools produced now start to build weapons |
152 | - local o1 = add_campaign_objective(obj_recruit_soldiers) |
153 | - campaign_message_box(saledus_5) |
154 | - local number_soldiers = 0 |
155 | - local bld = array_combine( |
156 | - p1:get_buildings("empire_headquarters"), |
157 | - p1:get_buildings("empire_warehouse"), |
158 | - p1:get_buildings("empire_trainingcamp1"), |
159 | - p1:get_buildings("empire_arena"), |
160 | - p1:get_buildings("empire_sentry"), |
161 | - p1:get_buildings("empire_tower"), |
162 | - p1:get_buildings("empire_fortress"), |
163 | - p1:get_buildings("empire_outpost"), |
164 | - p1:get_buildings("empire_barrier"), |
165 | - p1:get_buildings("empire_blockhouse"), |
166 | - p1:get_buildings("empire_castle") |
167 | - ) |
168 | - for idx,site in ipairs(bld) do |
169 | - for descr,count in pairs(site:get_soldiers("all")) do |
170 | - number_soldiers = number_soldiers + count |
171 | - end |
172 | - end |
173 | - |
174 | - local enough_soldiers = false |
175 | - while not enough_soldiers do |
176 | - bld = array_combine( |
177 | + if not p1.defeated then |
178 | + campaign_message_box(diary_page_2) |
179 | + o.done = true |
180 | + sleep(10000) |
181 | + run(check_enemy) |
182 | + |
183 | + -- enough tools produced now start to build weapons |
184 | + local o1 = add_campaign_objective(obj_recruit_soldiers) |
185 | + campaign_message_box(saledus_5) |
186 | + local number_soldiers = 0 |
187 | + local bld = array_combine( |
188 | p1:get_buildings("empire_headquarters"), |
189 | p1:get_buildings("empire_warehouse"), |
190 | p1:get_buildings("empire_trainingcamp1"), |
191 | @@ -213,20 +205,44 @@ |
192 | p1:get_buildings("empire_blockhouse"), |
193 | p1:get_buildings("empire_castle") |
194 | ) |
195 | - local amount = 0 |
196 | for idx,site in ipairs(bld) do |
197 | for descr,count in pairs(site:get_soldiers("all")) do |
198 | - amount = amount + count |
199 | - end |
200 | - end |
201 | - if amount > number_soldiers + 9 then |
202 | - enough_soldiers = true |
203 | - end |
204 | - sleep(4273) |
205 | + number_soldiers = number_soldiers + count |
206 | + end |
207 | + end |
208 | + |
209 | + local enough_soldiers = false |
210 | + while not enough_soldiers do |
211 | + bld = array_combine( |
212 | + p1:get_buildings("empire_headquarters"), |
213 | + p1:get_buildings("empire_warehouse"), |
214 | + p1:get_buildings("empire_trainingcamp1"), |
215 | + p1:get_buildings("empire_arena"), |
216 | + p1:get_buildings("empire_sentry"), |
217 | + p1:get_buildings("empire_tower"), |
218 | + p1:get_buildings("empire_fortress"), |
219 | + p1:get_buildings("empire_outpost"), |
220 | + p1:get_buildings("empire_barrier"), |
221 | + p1:get_buildings("empire_blockhouse"), |
222 | + p1:get_buildings("empire_castle") |
223 | + ) |
224 | + local amount = 0 |
225 | + for idx,site in ipairs(bld) do |
226 | + for descr,count in pairs(site:get_soldiers("all")) do |
227 | + amount = amount + count |
228 | + end |
229 | + end |
230 | + if amount > number_soldiers + 9 then |
231 | + enough_soldiers = true |
232 | + end |
233 | + sleep(4273) |
234 | + end |
235 | + if not p1.defeated then |
236 | + o1.done = true |
237 | + campaign_message_box(saledus_6) |
238 | + run(training) |
239 | + end |
240 | end |
241 | - o1.done = true |
242 | - campaign_message_box(saledus_6) |
243 | - run(training) |
244 | end |
245 | |
246 | -- charcoal might be needed to support the metal production |
247 | @@ -345,16 +361,18 @@ |
248 | function check_enemy() |
249 | local en_see = {} |
250 | while not enemy do |
251 | - en_see = enemy_seen() |
252 | - if en_see then |
253 | - local prior_center = scroll_to_field(en_see) |
254 | - sleep(2000) |
255 | - campaign_message_box(saledus_11) |
256 | - enemy = true |
257 | - run(conquer) |
258 | - scroll_to_map_pixel(prior_center) |
259 | + if not p1.defeated then |
260 | + en_see = enemy_seen() |
261 | + if en_see then |
262 | + local prior_center = scroll_to_field(en_see) |
263 | + sleep(2000) |
264 | + campaign_message_box(saledus_11) |
265 | + enemy = true |
266 | + run(conquer) |
267 | + scroll_to_map_pixel(prior_center) |
268 | + end |
269 | + sleep(8000) |
270 | end |
271 | - sleep(8000) |
272 | end |
273 | end |
274 | |
275 | @@ -411,25 +429,36 @@ |
276 | scroll_to_map_pixel(prior_center) |
277 | |
278 | local hq = p1:get_buildings("empire_headquarters") |
279 | - local wh = p3:get_buildings("empire_temple_of_vesta") |
280 | - while not ((hq[1]:get_wares("wheat") > 34 and hq[1]:get_wares("wine") > 14) or p3.defeated) do sleep(4000) end |
281 | - if p3.defeated then |
282 | + while sf.immovable.descr.type_name == "warehouse" and (hq[1]:get_wares("wheat") < 35 or hq[1]:get_wares("wine") < 15) and not p3.defeated do |
283 | + sleep(4000) |
284 | + end |
285 | + if sf.immovable.descr.type_name ~= "warehouse" then |
286 | + if p1.defeated then |
287 | + campaign_message_box(amalea_21) |
288 | + p1.see_all = true |
289 | + else |
290 | + o1.done = true |
291 | + campaign_message_box(amalea_22) |
292 | + end |
293 | + elseif p3.defeated then |
294 | o1.done = true |
295 | julia_conquered = true |
296 | - p1:allow_buildings{"empire_mill", "empire_brewery"} |
297 | + p1:forbid_buildings{"empire_mill1", "empire_brewery1"} |
298 | + p1:allow_buildings{"empire_mill", "empire_brewery", "empire_mill2", "empire_brewery2"} |
299 | campaign_message_box(saledus_2) |
300 | campaign_message_box(julia_2) |
301 | campaign_message_box(amalea_11) |
302 | campaign_message_box(saledus_4) |
303 | + run(karma) |
304 | else |
305 | o1.done = true |
306 | - wh[1]:set_workers("empire_carrier", 0) |
307 | - wh[1]:set_workers("empire_recruit", 0) |
308 | + local wh = p3:get_buildings("empire_temple_of_vesta") |
309 | local wheat = hq[1]:get_wares("wheat") - 35 |
310 | local wine = hq[1]:get_wares("wine") - 15 |
311 | hq[1]:set_wares("wheat", wheat) |
312 | hq[1]:set_wares("wine", wine) |
313 | - p1:allow_buildings{"empire_mill", "empire_brewery"} |
314 | + p1:forbid_buildings{"empire_mill1", "empire_brewery1"} |
315 | + p1:allow_buildings{"empire_mill", "empire_brewery", "empire_mill2", "empire_brewery2"} |
316 | campaign_message_box(julia_1) |
317 | |
318 | --remove all workers from p3 to avoid having them wandering around |
319 | @@ -437,6 +466,7 @@ |
320 | field_mill.immovable:set_workers("empire_miller", 0) |
321 | wh[1]:set_workers("empire_carrier", 0) |
322 | wh[1]:set_workers("empire_recruit", 0) |
323 | + wh[1]:set_soldiers({0,0,0,0}, 0) |
324 | field_well.immovable:set_workers("empire_carrier", 0) |
325 | r1:set_workers("empire_carrier", 0) |
326 | r2:set_workers("empire_carrier", 0) |
327 | @@ -456,25 +486,27 @@ |
328 | connected_road(p1, field_mill.immovable.flag, "l, tl, tr", true) |
329 | connected_road(p1, field_mill.immovable.flag, "br, r", true) |
330 | |
331 | - |
332 | campaign_message_box(amalea_12) |
333 | campaign_message_box(saledus_3) |
334 | + run(karma) |
335 | end |
336 | obj_find_monastery_done = true |
337 | - run(karma) |
338 | end |
339 | |
340 | -- our actions have an effect positively or negatively |
341 | function karma() |
342 | + -- bad karma for 10 times every 20 minutes a medium building where at least 2 of this type exist will be destroyed |
343 | if julia_conquered then |
344 | - for count = 0, 10 do |
345 | + for count = 1, 11 do |
346 | sleep(1200000) |
347 | bld = { |
348 | "empire_stonemasons_house", |
349 | "empire_sawmill", |
350 | "empire_mill", |
351 | + "empire_mill2", |
352 | "empire_bakery", |
353 | "empire_brewery", |
354 | + "empire_brewery2", |
355 | "empire_vineyard", |
356 | "empire_winery", |
357 | "empire_tavern", |
358 | @@ -485,36 +517,46 @@ |
359 | "empire_armorsmithy", |
360 | "empire_barracks" |
361 | } |
362 | - local most = 1 |
363 | - local selc = 0 |
364 | + local cand = {} |
365 | for idx,site in ipairs(bld) do |
366 | - if #p1:get_buildings(site) > most then |
367 | - most = #p1:get_buildings(site) |
368 | + if #p1:get_buildings(site) > 1 then |
369 | local build = p1:get_buildings(site) |
370 | - selc = build[1] |
371 | + for idx,p in ipairs(build) do |
372 | + table.insert(cand, p) |
373 | + end |
374 | end |
375 | end |
376 | - if selc ~= 0 then |
377 | - local fields = selc.fields |
378 | - local prior_center = scroll_to_field(fields[1]) |
379 | - selc:destroy() |
380 | + if #cand > 1 then |
381 | + local i = (count * 1237) % (#cand) + 1 |
382 | + local field = cand[i].fields |
383 | + local prior_center = scroll_to_field(field[1]) |
384 | + cand[i]:destroy() |
385 | campaign_message_box(amalea_16) |
386 | scroll_to_map_pixel(prior_center) |
387 | end |
388 | end |
389 | + -- good karma for 10 times every 25 minutes the player will be gifted with 20 beer and 10 wine |
390 | else |
391 | for count = 0, 10 do |
392 | sleep(1500000) |
393 | - local hq = p1:get_buildings("empire_headquarters") |
394 | - local beer = hq[1]:get_wares("beer") + 20 |
395 | - local wine = hq[1]:get_wares("wine") + 10 |
396 | - hq[1]:set_wares("beer", beer) |
397 | - hq[1]:set_wares("wine", wine) |
398 | - campaign_message_box(amalea_17) |
399 | + local hq = p1:get_buildings("empire_temple_of_vesta") |
400 | + if hq then |
401 | + local beer = hq[1]:get_wares("beer") + 20 |
402 | + local wine = hq[1]:get_wares("wine") + 10 |
403 | + hq[1]:set_wares("beer", beer) |
404 | + hq[1]:set_wares("wine", wine) |
405 | + campaign_message_box(amalea_17) |
406 | + end |
407 | end |
408 | end |
409 | end |
410 | |
411 | +function check_defeat() |
412 | + while not p1.defeated do sleep(6000) end |
413 | + campaign_message_box(amalea_23) |
414 | + p1.see_all = true |
415 | +end |
416 | + |
417 | function mission_thread() |
418 | sleep(1000) |
419 | scroll_to_field(sf) --scroll to our headquarters |
420 | @@ -543,8 +585,10 @@ |
421 | |
422 | -- let's start with dismantling the unproductive buildings |
423 | campaign_message_box(amalea_1) |
424 | + |
425 | run(dismantle) |
426 | run(farm_plans) |
427 | + run(check_defeat) |
428 | end |
429 | |
430 | run(mission_thread) |
431 | |
432 | === modified file 'data/campaigns/emp04.wmf/scripting/starting_conditions.lua' |
433 | --- data/campaigns/emp04.wmf/scripting/starting_conditions.lua 2018-07-07 10:53:30 +0000 |
434 | +++ data/campaigns/emp04.wmf/scripting/starting_conditions.lua 2018-09-08 11:25:40 +0000 |
435 | @@ -12,7 +12,7 @@ |
436 | place_building_in_region(p3, "empire_mill", {field_mill}) |
437 | |
438 | field_warehouse = map:get_field(21, 186) |
439 | -place_building_in_region(p3, "empire_temple_of_vesta", {field_warehouse}, {workers = {empire_carrier = 0, empire_recruit = 0}, wares = {wheat = 200}}) |
440 | +place_building_in_region(p3, "empire_temple_of_vesta", {field_warehouse}, {workers = {empire_carrier = 0, empire_recruit = 0}, wares = {wheat = 200}, soldiers = {[{0,0,0,0}] = 3}}) |
441 | |
442 | r1 = p3:place_road(field_warehouse.immovable.flag, "l", "tl", true) |
443 | r2 = p3:place_road(field_mill.immovable.flag, "tr", "r", true) |
444 | @@ -66,15 +66,15 @@ |
445 | place_building_in_region(p1, "empire_fishers_house", {map:get_field(12, 43)}) |
446 | |
447 | -- Place well |
448 | -place_building_in_region(p1, "empire_well2", sf:region(15)) |
449 | -place_building_in_region(p1, "empire_well2", sf:region(15)) |
450 | +place_building_in_region(p1, "empire_well1", sf:region(15)) |
451 | +place_building_in_region(p1, "empire_well1", sf:region(15)) |
452 | |
453 | -- Place lumberjacks |
454 | -place_building_in_region(p1, "empire_lumberjacks_house2", sf:region(10)) |
455 | -place_building_in_region(p1, "empire_lumberjacks_house2", sf:region(10)) |
456 | -place_building_in_region(p1, "empire_lumberjacks_house2", sf:region(10)) |
457 | -place_building_in_region(p1, "empire_foresters_house2", {map:get_field(19, 10)}) |
458 | -place_building_in_region(p1, "empire_foresters_house2", {map:get_field(19, 18)}) |
459 | +place_building_in_region(p1, "empire_lumberjacks_house1", sf:region(10)) |
460 | +place_building_in_region(p1, "empire_lumberjacks_house1", sf:region(10)) |
461 | +place_building_in_region(p1, "empire_lumberjacks_house1", sf:region(10)) |
462 | +place_building_in_region(p1, "empire_foresters_house1", {map:get_field(19, 10)}) |
463 | +place_building_in_region(p1, "empire_foresters_house1", {map:get_field(19, 18)}) |
464 | |
465 | -- Mines |
466 | place_building_in_region(p1, "empire_ironmine", {map:get_field(33, 14)}) |
467 | @@ -246,3 +246,7 @@ |
468 | } |
469 | } |
470 | ) |
471 | + |
472 | +p1.team = 1 |
473 | +p2.team = 2 |
474 | +p3.team = 2 |
475 | |
476 | === modified file 'data/campaigns/emp04.wmf/scripting/texts.lua' |
477 | --- data/campaigns/emp04.wmf/scripting/texts.lua 2018-02-23 07:06:48 +0000 |
478 | +++ data/campaigns/emp04.wmf/scripting/texts.lua 2018-09-08 11:25:40 +0000 |
479 | @@ -59,6 +59,15 @@ |
480 | ), |
481 | } |
482 | |
483 | +obj_click_farmbuilding = { |
484 | + name = "click_farm_building", |
485 | + title=_"Click on one of the farms", |
486 | + number = 1, |
487 | + body = objective_text(_"Open the Building Window of a Farm", |
488 | + li(_[[Click on a farm building to open its building window. This will let you analyze the building.]]) |
489 | + ), |
490 | +} |
491 | + |
492 | obj_find_farm_plans = { |
493 | name = "find_farm_construction_plans", |
494 | title=_"Find the construction plans for the farms", |
495 | @@ -312,13 +321,16 @@ |
496 | title=_"Amalea has Bad News", |
497 | body= amalea3(_"Amalea recommends…", |
498 | -- TRANSLATORS: Amalea |
499 | - _([[Brother, I'm really worried that I have to deliver bad news again. As you can see, our farms aren’t producing anything and we can’t dismantle them. The only option is to destroy them.]]) |
500 | + _([[Brother, I'm really worried that I have to deliver bad news again. As you can see, our farms aren’t producing anything and we can’t dismantle them.]]) |
501 | .. paragraphdivider() .. |
502 | -- TRANSLATORS: Amalea |
503 | _([[This situation was caused by the sad fact that our people lost the instructions on how to construct and operate farms. Therefore they have zero productivity and the constructors don’t know how to dismantle them either.]]) |
504 | .. paragraphdivider() .. |
505 | -- TRANSLATORS: Amalea |
506 | - _([[So, we urgently need to recover the plans regarding the construction and operation of farms. One older constructor told me that they might have been concealed in a cave in the hills east of our border.]])) |
507 | + _([[So, we urgently need to recover the plans regarding the construction and operation of farms. One older constructor told me that they might have been concealed in a cave in the hills east of our border.]]) |
508 | + .. paragraphdivider() .. |
509 | + -- TRANSLATORS: Amalea |
510 | + _([[Until we have found the plans, the only option for our farms is to dismantle them.]])) |
511 | .. new_objectives(obj_find_farm_plans), |
512 | posy=1, |
513 | h=500, |
514 | @@ -347,7 +359,7 @@ |
515 | _([[Praise the gods, Lutius! We have found the plans on how to build and operate farms.]]) |
516 | .. paragraphdivider() .. |
517 | -- TRANSLATORS: Amalea |
518 | - _([[Now we can start building farms to produce the beer which our miners need so desperately.]]) |
519 | + _([[Now we can start building farms to produce the beer which our miners need so desperately. Furthermore, the plans have enabled us to upgrade our old farms to get to work again.]]) |
520 | .. paragraphdivider() .. |
521 | -- TRANSLATORS: Amalea |
522 | _([[But I’m afraid that this problem hasn’t been the last in our economy.]])), |
523 | @@ -451,7 +463,7 @@ |
524 | title=_"Amalea Looks Sad", |
525 | body= amalea1(_"Amalea is really sad…", |
526 | -- TRANSLATORS: Amalea |
527 | - _([[I’m not sure if that was the right thing to do. Yes, we have obtained the plans, but we will never know if and how Vesta and her priestesses could have helped us against the Barbarians.]]) |
528 | + _([[I’m not sure if that was the right thing to do. Yes, we have obtained the plans. But although we are now able to build and upgrade our mills and breweries with the improved technology, we will never know if and how Vesta and her priestesses could have helped us against the Barbarians.]]) |
529 | .. paragraphdivider() .. |
530 | -- TRANSLATORS: Amalea |
531 | _([[Furthermore, we will have to live with the guilt of destroying a temple of an Empire goddess on our souls.]])), |
532 | @@ -462,7 +474,10 @@ |
533 | title=_"Amalea is Very Content", |
534 | body= amalea2(_"Amalea claps her hands…", |
535 | -- TRANSLATORS: Amalea |
536 | - _([[Well done. Now we are able to build more efficient buildings to refine our wheat. And, best of all, we have a new ally who just provided us with lots of water, flour and beer. Now I really think that nothing can prevent us from getting stronger and conquering back our homeland.]])), |
537 | + _([[Well done. Now we are able to build more efficient buildings to refine our wheat. Furthermore, the plans enable us to upgrade our current mill and brewery with the improved technology.]]) |
538 | + .. paragraphdivider() .. |
539 | + -- TRANSLATORS: Amalea |
540 | + _([[And, best of all, we have a new ally who just provided us with lots of water, flour and beer. Now I really think that nothing can prevent us from getting stronger and taking back our homeland.]])), |
541 | posy=1, |
542 | } |
543 | |
544 | @@ -526,8 +541,10 @@ |
545 | _([[Look Lutius, I have just analyzed our economy somewhat further. I think there might be a problem with our farms. They don’t show any productivity although there is enough space to plant wheat.]]) |
546 | .. paragraphdivider() .. |
547 | -- TRANSLATORS: Amalea |
548 | - _([[I think we should have a deeper look into the issue and open the building window of one of them.]])), |
549 | + _([[I think we should have a deeper look into the issue and open the building window of one of them.]])) |
550 | + .. new_objectives(obj_click_farmbuilding), |
551 | posy=1, |
552 | + h=500, |
553 | } |
554 | |
555 | amalea_19 = { |
556 | @@ -552,6 +569,32 @@ |
557 | posy=1, |
558 | } |
559 | |
560 | +amalea_21 = { |
561 | + title=_"Defeated!", |
562 | + body= amalea2(_"Amalea reports our defeat…", |
563 | + -- TRANSLATORS: Amalea |
564 | + _([[Oh no Lutius, I don't know how this could have happened, but the Barbarians have sacked our headquarters. So, we have lost this battle and our empire!]])), |
565 | + posy=1, |
566 | +} |
567 | + |
568 | +amalea_22 = { |
569 | + title=_"Amalea has Bad News", |
570 | + body= amalea2(_"Amalea reports our headquarters lost…", |
571 | + -- TRANSLATORS: Amalea |
572 | + _([[Oh no Lutius, I don't know how this could have happened, but the Barbarians have destroyed our headquarters. So, we can't deliver the wares to Julia anymore.]]) |
573 | + .. paragraphdivider() .. |
574 | + -- TRANSLATORS: Amalea |
575 | + _([[Now we need to try to fulfil our duties without their technology. But this will not be an easy task at all.]])), |
576 | + posy=1, |
577 | +} |
578 | + |
579 | +amalea_23 = { |
580 | + title=_"Defeated!", |
581 | + body= amalea2(_"Amalea reports our defeat…", |
582 | + -- TRANSLATORS: Amalea |
583 | + _([[Oh no Lutius, I don't know how this could have happened, but the Barbarians have destroyed our last warehouse. So, we have lost this battle and our empire!]])), |
584 | + posy=1, |
585 | +} |
586 | |
587 | -- Saledus |
588 | |
589 | @@ -588,7 +631,7 @@ |
590 | title=_"Defiance", |
591 | body= saledus2(_"Saledus asserts his point…", |
592 | -- TRANSLATORS: Saledus |
593 | - _([[Sire, I admit this has been proven to be a very good deal, although we could have had the plans much earlier. Anyhow, we will not be able to make any deals with the Barbarians, so we better keep our soldiers in a good mood and train them adequately.]])), |
594 | + _([[Sire, I admit this has been proven to be a very good deal, although we could have had the plans much earlier. Anyhow, we will not be able to make any deals with the Barbarians, so, we better keep our soldiers in a good mood and train them adequately.]])), |
595 | posy=1, |
596 | } |
597 | |
598 | @@ -596,7 +639,7 @@ |
599 | title=_"Pride", |
600 | body= saledus2(_"Saledus asserts his point…", |
601 | -- TRANSLATORS: Saledus |
602 | - _([[Sire, I admit that we most probably courted the gods’ resentment, but in wartime, the end will sometimes justify the means. And we won’t be able to make any deals with the Barbarians either, so we better keep our soldiers in good mood and train them adequately.]])), |
603 | + _([[Sire, I admit that we most probably courted the gods’ resentment, but in wartime, the end will sometimes justify the means. And we won’t be able to make any deals with the Barbarians either, so, we better keep our soldiers in good mood and train them adequately.]])), |
604 | posy=1, |
605 | } |
606 | |
607 | |
608 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/brewery1.lua' |
609 | --- data/campaigns/emp04.wmf/scripting/tribes/brewery1.lua 2018-07-30 16:56:10 +0000 |
610 | +++ data/campaigns/emp04.wmf/scripting/tribes/brewery1.lua 2018-09-08 11:25:40 +0000 |
611 | @@ -3,16 +3,23 @@ |
612 | tribes:new_productionsite_type { |
613 | msgctxt = "empire_building", |
614 | name = "empire_brewery1", |
615 | - descname = "Brewery", |
616 | + descname = pgettext("empire_building", "Brewery"), |
617 | helptext_script = dirname .. "helptexts.lua", |
618 | icon = dirname .. "menu.png", |
619 | size = "medium", |
620 | + enhancement = "empire_brewery2", |
621 | |
622 | + buildcost = { |
623 | + log = 1, |
624 | + planks = 2, |
625 | + granite = 2 |
626 | + }, |
627 | return_on_dismantle = { |
628 | planks = 1, |
629 | granite = 1 |
630 | }, |
631 | |
632 | + |
633 | animations = { |
634 | idle = { |
635 | pictures = path.list_files(dirname .. "idle_??.png"), |
636 | |
637 | === added file 'data/campaigns/emp04.wmf/scripting/tribes/brewery2.lua' |
638 | --- data/campaigns/emp04.wmf/scripting/tribes/brewery2.lua 1970-01-01 00:00:00 +0000 |
639 | +++ data/campaigns/emp04.wmf/scripting/tribes/brewery2.lua 2018-09-08 11:25:40 +0000 |
640 | @@ -0,0 +1,63 @@ |
641 | +dirname = "tribes/buildings/productionsites/empire/brewery/" |
642 | + |
643 | +tribes:new_productionsite_type { |
644 | + msgctxt = "empire_building", |
645 | + name = "empire_brewery2", |
646 | + -- TRANSLATORS: This is a building name used in lists of buildings |
647 | + descname = pgettext("empire_building", "Brewery"), |
648 | + helptext_script = dirname .. "helptexts.lua", |
649 | + icon = dirname .. "menu.png", |
650 | + size = "medium", |
651 | + |
652 | + enhancement_cost = { |
653 | + planks = 1, |
654 | + granite = 1 |
655 | + }, |
656 | + return_on_dismantle_on_enhanced = { |
657 | + planks = 0, |
658 | + }, |
659 | + |
660 | + animations = { |
661 | + idle = { |
662 | + pictures = path.list_files(dirname .. "idle_??.png"), |
663 | + hotspot = { 39, 62 }, |
664 | + }, |
665 | + working = { |
666 | + pictures = path.list_files(dirname .. "idle_??.png"), -- TODO(GunChleoc): No animation yet. |
667 | + hotspot = { 39, 62 }, |
668 | + }, |
669 | + }, |
670 | + |
671 | + aihints = { |
672 | + prohibited_till = 790, |
673 | + very_weak_ai_limit = 1, |
674 | + weak_ai_limit = 2 |
675 | + }, |
676 | + |
677 | + working_positions = { |
678 | + empire_brewer = 1 |
679 | + }, |
680 | + |
681 | + inputs = { |
682 | + { name = "water", amount = 7 }, |
683 | + { name = "wheat", amount = 7 } |
684 | + }, |
685 | + outputs = { |
686 | + "beer" |
687 | + }, |
688 | + |
689 | + programs = { |
690 | + work = { |
691 | + -- TRANSLATORS: Completed/Skipped/Did not start brewing beer because ... |
692 | + descname = _"brewing beer", |
693 | + actions = { |
694 | + "sleep=30000", |
695 | + "return=skipped unless economy needs beer", |
696 | + "consume=water wheat", |
697 | + "playsound=sound/empire beerbubble 180", |
698 | + "animate=working 30000", |
699 | + "produce=beer" |
700 | + } |
701 | + }, |
702 | + }, |
703 | +} |
704 | |
705 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/farm1.lua' |
706 | --- data/campaigns/emp04.wmf/scripting/tribes/farm1.lua 2018-07-31 06:17:07 +0000 |
707 | +++ data/campaigns/emp04.wmf/scripting/tribes/farm1.lua 2018-09-08 11:25:40 +0000 |
708 | @@ -7,13 +7,13 @@ |
709 | helptext_script = dirname .. "helptexts.lua", |
710 | icon = dirname .. "menu.png", |
711 | size = "big", |
712 | - |
713 | + enhancement = "empire_farm2", |
714 | |
715 | return_on_dismantle = { |
716 | - planks = 1, |
717 | - granite = 1, |
718 | - marble = 1, |
719 | - marble_column = 1 |
720 | + planks = 0, |
721 | + granite = 0, |
722 | + marble = 0, |
723 | + marble_column = 0 |
724 | }, |
725 | |
726 | animations = { |
727 | @@ -24,7 +24,6 @@ |
728 | }, |
729 | |
730 | aihints = { |
731 | - |
732 | }, |
733 | |
734 | working_positions = { |
735 | |
736 | === added file 'data/campaigns/emp04.wmf/scripting/tribes/farm2.lua' |
737 | --- data/campaigns/emp04.wmf/scripting/tribes/farm2.lua 1970-01-01 00:00:00 +0000 |
738 | +++ data/campaigns/emp04.wmf/scripting/tribes/farm2.lua 2018-09-08 11:25:40 +0000 |
739 | @@ -0,0 +1,76 @@ |
740 | +dirname = "tribes/buildings/productionsites/empire/farm/" |
741 | + |
742 | +tribes:new_productionsite_type { |
743 | + msgctxt = "empire_building", |
744 | + name = "empire_farm2", |
745 | + -- TRANSLATORS: This is a building name used in lists of buildings |
746 | + descname = pgettext("empire_building", "Farm"), |
747 | + helptext_script = dirname .. "helptexts.lua", |
748 | + icon = dirname .. "menu.png", |
749 | + size = "big", |
750 | + |
751 | + enhancement_cost = { |
752 | + planks = 1, |
753 | + marble = 1, |
754 | + marble_column = 2 |
755 | + }, |
756 | + return_on_dismantle_on_enhanced = { |
757 | + planks = 1, |
758 | + granite = 1, |
759 | + marble = 1, |
760 | + marble_column = 1 |
761 | + }, |
762 | + |
763 | + animations = { |
764 | + idle = { |
765 | + pictures = path.list_files(dirname .. "idle_??.png"), |
766 | + hotspot = { 82, 74 }, |
767 | + }, |
768 | + }, |
769 | + |
770 | + aihints = { |
771 | + }, |
772 | + |
773 | + working_positions = { |
774 | + empire_farmer = 1 |
775 | + }, |
776 | + |
777 | + outputs = { |
778 | + "wheat" |
779 | + }, |
780 | + |
781 | + programs = { |
782 | + work = { |
783 | + -- TRANSLATORS: Completed/Skipped/Did not start working because ... |
784 | + descname = _"working", |
785 | + actions = { |
786 | + "call=plant", |
787 | + "call=harvest", |
788 | + "return=skipped" |
789 | + } |
790 | + }, |
791 | + plant = { |
792 | + -- TRANSLATORS: Completed/Skipped/Did not start planting wheat because ... |
793 | + descname = _"planting wheat", |
794 | + actions = { |
795 | + "sleep=14000", |
796 | + "callworker=plant" |
797 | + } |
798 | + }, |
799 | + harvest = { |
800 | + -- TRANSLATORS: Completed/Skipped/Did not start harvesting wheat because ... |
801 | + descname = _"harvesting wheat", |
802 | + actions = { |
803 | + "sleep=4000", |
804 | + "callworker=harvest" |
805 | + } |
806 | + }, |
807 | + }, |
808 | + out_of_resource_notification = { |
809 | + -- Translators: Short for "Out of ..." for a resource |
810 | + title = _"No Fields", |
811 | + heading = _"Out of Fields", |
812 | + message = pgettext("empire_building", "The farmer working at this farm has no cleared soil to plant his seeds."), |
813 | + productivity_threshold = 30 |
814 | + }, |
815 | +} |
816 | |
817 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/foresters_house1.lua' |
818 | --- data/campaigns/emp04.wmf/scripting/tribes/foresters_house1.lua 2018-07-30 17:31:02 +0000 |
819 | +++ data/campaigns/emp04.wmf/scripting/tribes/foresters_house1.lua 2018-09-08 11:25:40 +0000 |
820 | @@ -7,7 +7,6 @@ |
821 | helptext_script = dirname .. "helptexts.lua", |
822 | icon = dirname .. "menu.png", |
823 | size = "small", |
824 | - enhancement = "empire_foresters_house2", |
825 | |
826 | buildcost = { |
827 | log = 1, |
828 | |
829 | === removed file 'data/campaigns/emp04.wmf/scripting/tribes/foresters_house2.lua' |
830 | --- data/campaigns/emp04.wmf/scripting/tribes/foresters_house2.lua 2018-07-30 17:31:02 +0000 |
831 | +++ data/campaigns/emp04.wmf/scripting/tribes/foresters_house2.lua 1970-01-01 00:00:00 +0000 |
832 | @@ -1,44 +0,0 @@ |
833 | -dirname = "tribes/buildings/productionsites/empire/foresters_house/" |
834 | - |
835 | -tribes:new_productionsite_type { |
836 | - msgctxt = "empire_building", |
837 | - name = "empire_foresters_house2", |
838 | - descname = "Forester’s House", |
839 | - helptext_script = dirname .. "helptexts.lua", |
840 | - icon = dirname .. "menu.png", |
841 | - size = "small", |
842 | - |
843 | - enhancement_cost = { |
844 | - log = 2, |
845 | - planks = 1 |
846 | - }, |
847 | - |
848 | - return_on_dismantle_on_enhanced = { |
849 | - planks = 0 |
850 | - }, |
851 | - |
852 | - animations = { |
853 | - idle = { |
854 | - pictures = path.list_files(dirname .. "idle_??.png"), |
855 | - hotspot = { 52, 54 }, |
856 | - }, |
857 | - }, |
858 | - |
859 | - aihints = { |
860 | - |
861 | - }, |
862 | - |
863 | - working_positions = { |
864 | - empire_forester = 1 |
865 | - }, |
866 | - |
867 | - programs = { |
868 | - work = { |
869 | - descname = "planting trees", |
870 | - actions = { |
871 | - "sleep=66000", |
872 | - "callworker=plant" |
873 | - } |
874 | - }, |
875 | - }, |
876 | -} |
877 | |
878 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/init.lua' |
879 | --- data/campaigns/emp04.wmf/scripting/tribes/init.lua 2018-06-16 19:20:51 +0000 |
880 | +++ data/campaigns/emp04.wmf/scripting/tribes/init.lua 2018-09-08 11:25:40 +0000 |
881 | @@ -8,15 +8,15 @@ |
882 | -- =================================== |
883 | -- Empire Mission 4 |
884 | -- =================================== |
885 | + include "map:scripting/tribes/brewery2.lua" |
886 | include "map:scripting/tribes/brewery1.lua" |
887 | + include "map:scripting/tribes/farm2.lua" |
888 | include "map:scripting/tribes/farm1.lua" |
889 | - include "map:scripting/tribes/foresters_house2.lua" |
890 | include "map:scripting/tribes/foresters_house1.lua" |
891 | - include "map:scripting/tribes/lumberjacks_house2.lua" |
892 | include "map:scripting/tribes/lumberjacks_house1.lua" |
893 | + include "map:scripting/tribes/mill2.lua" |
894 | include "map:scripting/tribes/mill1.lua" |
895 | include "map:scripting/tribes/trainingcamp1.lua" |
896 | - include "map:scripting/tribes/well2.lua" |
897 | include "map:scripting/tribes/well1.lua" |
898 | include "map:scripting/tribes/temple_of_vesta.lua" |
899 | end) |
900 | @@ -28,17 +28,27 @@ |
901 | |
902 | tribes:add_custom_building { |
903 | tribename = "empire", |
904 | + buildingname = "empire_brewery2", |
905 | +} |
906 | + |
907 | +tribes:add_custom_building { |
908 | + tribename = "empire", |
909 | buildingname = "empire_farm1", |
910 | } |
911 | |
912 | tribes:add_custom_building { |
913 | tribename = "empire", |
914 | - buildingname = "empire_foresters_house2", |
915 | -} |
916 | - |
917 | -tribes:add_custom_building { |
918 | - tribename = "empire", |
919 | - buildingname = "empire_lumberjacks_house2", |
920 | + buildingname = "empire_farm2", |
921 | +} |
922 | + |
923 | +tribes:add_custom_building { |
924 | + tribename = "empire", |
925 | + buildingname = "empire_foresters_house1", |
926 | +} |
927 | + |
928 | +tribes:add_custom_building { |
929 | + tribename = "empire", |
930 | + buildingname = "empire_lumberjacks_house1", |
931 | } |
932 | |
933 | tribes:add_custom_building { |
934 | @@ -48,12 +58,17 @@ |
935 | |
936 | tribes:add_custom_building { |
937 | tribename = "empire", |
938 | + buildingname = "empire_mill2", |
939 | +} |
940 | + |
941 | +tribes:add_custom_building { |
942 | + tribename = "empire", |
943 | buildingname = "empire_trainingcamp1", |
944 | } |
945 | |
946 | tribes:add_custom_building { |
947 | tribename = "empire", |
948 | - buildingname = "empire_well2", |
949 | + buildingname = "empire_well1", |
950 | } |
951 | |
952 | tribes:add_custom_building { |
953 | |
954 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house1.lua' |
955 | --- data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house1.lua 2018-07-30 17:31:02 +0000 |
956 | +++ data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house1.lua 2018-09-08 11:25:40 +0000 |
957 | @@ -7,7 +7,6 @@ |
958 | helptext_script = dirname .. "helptexts.lua", |
959 | icon = dirname .. "menu.png", |
960 | size = "small", |
961 | - enhancement = "empire_lumberjacks_house2", |
962 | |
963 | buildcost = { |
964 | log = 2, |
965 | @@ -16,6 +15,7 @@ |
966 | |
967 | return_on_dismantle = { |
968 | log = 1, |
969 | + planks = 1, |
970 | }, |
971 | |
972 | animations = { |
973 | |
974 | === removed file 'data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house2.lua' |
975 | --- data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house2.lua 2018-07-30 17:31:02 +0000 |
976 | +++ data/campaigns/emp04.wmf/scripting/tribes/lumberjacks_house2.lua 1970-01-01 00:00:00 +0000 |
977 | @@ -1,54 +0,0 @@ |
978 | -dirname = "tribes/buildings/productionsites/empire/lumberjacks_house/" |
979 | - |
980 | -tribes:new_productionsite_type { |
981 | - msgctxt = "empire_building", |
982 | - name = "empire_lumberjacks_house2", |
983 | - descname = "Lumberjack’s House", |
984 | - helptext_script = dirname .. "helptexts.lua", |
985 | - icon = dirname .. "menu.png", |
986 | - size = "small", |
987 | - |
988 | - enhancement_cost = { |
989 | - log = 2, |
990 | - planks = 1 |
991 | - }, |
992 | - |
993 | - return_on_dismantle_on_enhanced = { |
994 | - planks = 1, |
995 | - }, |
996 | - |
997 | - animations = { |
998 | - idle = { |
999 | - pictures = path.list_files(dirname .. "idle_??.png"), |
1000 | - hotspot = { 40, 59 }, |
1001 | - }, |
1002 | - }, |
1003 | - |
1004 | - aihints = { |
1005 | - |
1006 | - }, |
1007 | - |
1008 | - working_positions = { |
1009 | - empire_lumberjack = 1 |
1010 | - }, |
1011 | - |
1012 | - outputs = { |
1013 | - "log" |
1014 | - }, |
1015 | - |
1016 | - programs = { |
1017 | - work = { |
1018 | - descname = "felling trees", |
1019 | - actions = { |
1020 | - "sleep=400000", -- Barbarian lumberjack sleeps 25000 |
1021 | - "callworker=harvest" |
1022 | - } |
1023 | - }, |
1024 | - }, |
1025 | - out_of_resource_notification = { |
1026 | - title = "No Trees", |
1027 | - heading = "Out of Trees", |
1028 | - message = "The lumberjack working at this lumberjack’s house can’t find any trees in his work area. You should consider dismantling or destroying the building or building a forester’s house.", |
1029 | - productivity_threshold = 60 |
1030 | - }, |
1031 | -} |
1032 | |
1033 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/mill1.lua' |
1034 | --- data/campaigns/emp04.wmf/scripting/tribes/mill1.lua 2018-07-30 16:56:10 +0000 |
1035 | +++ data/campaigns/emp04.wmf/scripting/tribes/mill1.lua 2018-09-08 11:25:40 +0000 |
1036 | @@ -3,11 +3,17 @@ |
1037 | tribes:new_productionsite_type { |
1038 | msgctxt = "empire_building", |
1039 | name = "empire_mill1", |
1040 | - descname = "Mill", |
1041 | + descname = pgettext("empire_building", "Mill"), |
1042 | helptext_script = dirname .. "helptexts.lua", |
1043 | icon = dirname .. "menu.png", |
1044 | size = "medium", |
1045 | + enhancement = "empire_mill2", |
1046 | |
1047 | + buildcost = { |
1048 | + log = 3, |
1049 | + granite = 3, |
1050 | + marble = 1 |
1051 | + }, |
1052 | return_on_dismantle = { |
1053 | log = 1, |
1054 | granite = 2, |
1055 | @@ -27,7 +33,6 @@ |
1056 | }, |
1057 | |
1058 | aihints = { |
1059 | - |
1060 | }, |
1061 | |
1062 | working_positions = { |
1063 | |
1064 | === added file 'data/campaigns/emp04.wmf/scripting/tribes/mill2.lua' |
1065 | --- data/campaigns/emp04.wmf/scripting/tribes/mill2.lua 1970-01-01 00:00:00 +0000 |
1066 | +++ data/campaigns/emp04.wmf/scripting/tribes/mill2.lua 2018-09-08 11:25:40 +0000 |
1067 | @@ -0,0 +1,63 @@ |
1068 | +dirname = "tribes/buildings/productionsites/empire/mill/" |
1069 | + |
1070 | +tribes:new_productionsite_type { |
1071 | + msgctxt = "empire_building", |
1072 | + name = "empire_mill2", |
1073 | + -- TRANSLATORS: This is a building name used in lists of buildings |
1074 | + descname = pgettext("empire_building", "Mill"), |
1075 | + helptext_script = dirname .. "helptexts.lua", |
1076 | + icon = dirname .. "menu.png", |
1077 | + size = "medium", |
1078 | + |
1079 | + enhancement_cost = { |
1080 | + log = 1, |
1081 | + granite = 1, |
1082 | + marble = 1 |
1083 | + }, |
1084 | + return_on_dismantle_on_enhanced = { |
1085 | + log = 0, |
1086 | + granite = 0, |
1087 | + marble = 0 |
1088 | + }, |
1089 | + |
1090 | + animations = { |
1091 | + idle = { |
1092 | + pictures = path.list_files(dirname .. "idle_??.png"), |
1093 | + hotspot = { 41, 87 }, |
1094 | + }, |
1095 | + working = { |
1096 | + pictures = path.list_files(dirname .. "working_??.png"), |
1097 | + hotspot = { 41, 87 }, |
1098 | + fps = 25 |
1099 | + }, |
1100 | + }, |
1101 | + |
1102 | + aihints = { |
1103 | + }, |
1104 | + |
1105 | + working_positions = { |
1106 | + empire_miller = 1 |
1107 | + }, |
1108 | + |
1109 | + inputs = { |
1110 | + { name = "wheat", amount = 6 } |
1111 | + }, |
1112 | + outputs = { |
1113 | + "flour" |
1114 | + }, |
1115 | + |
1116 | + programs = { |
1117 | + work = { |
1118 | + -- TRANSLATORS: Completed/Skipped/Did not start grinding wheat because ... |
1119 | + descname = _"grinding wheat", |
1120 | + actions = { |
1121 | + "sleep=5000", |
1122 | + "return=skipped unless economy needs flour", |
1123 | + "consume=wheat", |
1124 | + "playsound=sound/mill mill_turning 240", |
1125 | + "animate=working 10000", |
1126 | + "produce=flour" |
1127 | + } |
1128 | + }, |
1129 | + }, |
1130 | +} |
1131 | |
1132 | === modified file 'data/campaigns/emp04.wmf/scripting/tribes/well1.lua' |
1133 | --- data/campaigns/emp04.wmf/scripting/tribes/well1.lua 2017-12-17 13:25:46 +0000 |
1134 | +++ data/campaigns/emp04.wmf/scripting/tribes/well1.lua 2018-09-08 11:25:40 +0000 |
1135 | @@ -3,11 +3,10 @@ |
1136 | tribes:new_productionsite_type { |
1137 | msgctxt = "empire_building", |
1138 | name = "empire_well1", |
1139 | - descname = "Well", |
1140 | + descname = pgettext("empire_building", "Well"), |
1141 | helptext_script = dirname .. "helptexts.lua", |
1142 | icon = dirname .. "menu.png", |
1143 | size = "small", |
1144 | - enhancement = "empire_well2", |
1145 | |
1146 | buildcost = { |
1147 | log = 2, |
1148 | @@ -15,7 +14,8 @@ |
1149 | marble = 1 |
1150 | }, |
1151 | return_on_dismantle = { |
1152 | - marble = 1 |
1153 | + log = 1, |
1154 | + marble = 1, |
1155 | }, |
1156 | |
1157 | animations = { |
1158 | |
1159 | === removed file 'data/campaigns/emp04.wmf/scripting/tribes/well2.lua' |
1160 | --- data/campaigns/emp04.wmf/scripting/tribes/well2.lua 2017-12-17 13:25:46 +0000 |
1161 | +++ data/campaigns/emp04.wmf/scripting/tribes/well2.lua 1970-01-01 00:00:00 +0000 |
1162 | @@ -1,60 +0,0 @@ |
1163 | -dirname = "tribes/buildings/productionsites/empire/well/" |
1164 | - |
1165 | -tribes:new_productionsite_type { |
1166 | - msgctxt = "empire_building", |
1167 | - name = "empire_well2", |
1168 | - descname = "Well", |
1169 | - helptext_script = dirname .. "helptexts.lua", |
1170 | - icon = dirname .. "menu.png", |
1171 | - size = "small", |
1172 | - |
1173 | - enhancement_cost = { |
1174 | - log = 2, |
1175 | - granite = 1, |
1176 | - marble = 1 |
1177 | - }, |
1178 | - return_on_dismantle_on_enhanced = { |
1179 | - log = 1 |
1180 | - }, |
1181 | - |
1182 | - animations = { |
1183 | - idle = { |
1184 | - pictures = path.list_files(dirname .. "idle_??.png"), |
1185 | - hotspot = { 43, 43 }, |
1186 | - }, |
1187 | - working = { |
1188 | - pictures = path.list_files(dirname .. "idle_??.png"), -- TODO(GunChleoc): No animation yet. |
1189 | - hotspot = { 43, 43 }, |
1190 | - }, |
1191 | - }, |
1192 | - |
1193 | - aihints = { |
1194 | - |
1195 | - }, |
1196 | - |
1197 | - working_positions = { |
1198 | - empire_carrier = 1 |
1199 | - }, |
1200 | - |
1201 | - outputs = { |
1202 | - "water" |
1203 | - }, |
1204 | - |
1205 | - programs = { |
1206 | - work = { |
1207 | - descname = "working", |
1208 | - actions = { |
1209 | - "sleep=30000", |
1210 | - "animate=working 30000", |
1211 | - "mine=water 5 100 10 2", |
1212 | - "produce=water" |
1213 | - } |
1214 | - }, |
1215 | - }, |
1216 | - out_of_resource_notification = { |
1217 | - title = "No Water", |
1218 | - heading = "Out of Water", |
1219 | - message = "The carrier working at this well can’t find any water in his well.", |
1220 | - productivity_threshold = 15 |
1221 | - }, |
1222 | -} |
Some small nits