Merge lp:~widelands-dev/widelands/fh1-atlanteans1 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8579
Proposed branch: lp:~widelands-dev/widelands/fh1-atlanteans1
Merge into: lp:widelands
Diff against target: 253 lines (+68/-63)
3 files modified
data/campaigns/atl01.wmf/scripting/init.lua (+0/-18)
data/campaigns/atl01.wmf/scripting/mission_thread.lua (+15/-0)
data/campaigns/atl01.wmf/scripting/texts.lua (+53/-45)
To merge this branch: bzr merge lp:~widelands-dev/widelands/fh1-atlanteans1
Reviewer Review Type Date Requested Status
Klaus Halfmann review, compile, testplay Approve
Review via email: mp+336974@code.launchpad.net

Commit message

Converted Atlantean scenario to new font renderer

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3124. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/336126884.
Appveyor build 2931. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_atlanteans1-2931.

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

OK that code looks straig foreward, will compile and testplay this in the next day.
Hope I will not drown to fast :-)

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Ok- Did a testplay in German.
All Dialogs are fine.

@bunnybot merge

review: Approve (review, compile, testplay)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/campaigns/atl01.wmf/scripting/init.lua'
2--- data/campaigns/atl01.wmf/scripting/init.lua 2017-08-11 16:14:56 +0000
3+++ data/campaigns/atl01.wmf/scripting/init.lua 2018-02-01 13:54:46 +0000
4@@ -55,24 +55,6 @@
5 return rv
6 end
7
8-function send_building_lost_message(f)
9- set_textdomain("scenario_atl01.wmf")
10- send_message(
11- p1,
12- -- TRANSLATORS: Short message title. Translate as "Lost!" if you don't have enough space.
13- pgettext("message_short_title", "Building lost!"),
14- rt("image=".. f.immovable.descr.representative_image,
15- p(_"We lost a building to the ocean!")
16- ),
17- {
18- field = f,
19- popup = false,
20- icon = f.immovable.descr.representative_image,
21- heading = pgettext("message_heading", "Building lost!")
22- }
23- )
24-end
25-
26 -- starting conditions are included later in the intro
27 include "map:scripting/mission_thread.lua"
28 include "map:scripting/water_rising.lua"
29
30=== modified file 'data/campaigns/atl01.wmf/scripting/mission_thread.lua'
31--- data/campaigns/atl01.wmf/scripting/mission_thread.lua 2017-02-12 09:38:54 +0000
32+++ data/campaigns/atl01.wmf/scripting/mission_thread.lua 2018-02-01 13:54:46 +0000
33@@ -2,6 +2,21 @@
34 -- Atlanteans Tutorial Mission 01
35 -- =======================================================================
36
37+function send_building_lost_message(f)
38+ local icon = f.immovable.descr.representative_image
39+ local message = building_lost(icon)
40+ send_message(
41+ p1,
42+ message.title,
43+ message.text,
44+ {
45+ field = f,
46+ popup = false,
47+ icon = icon,
48+ message.title
49+ }
50+ )
51+end
52
53 -- ==============
54 -- Logic Threads
55
56=== modified file 'data/campaigns/atl01.wmf/scripting/texts.lua'
57--- data/campaigns/atl01.wmf/scripting/texts.lua 2017-03-04 18:35:02 +0000
58+++ data/campaigns/atl01.wmf/scripting/texts.lua 2018-02-01 13:54:46 +0000
59@@ -2,8 +2,7 @@
60 -- Texts for the Atlantean tutorial mission
61 -- =======================================================================
62
63-include "scripting/formatting.lua"
64-include "scripting/format_scenario.lua"
65+include "scripting/richtext_scenarios.lua"
66
67 function jundlina(title, text)
68 return speech("map:princess.png", "2F9131", title, text)
69@@ -31,12 +30,12 @@
70 name = "obj_ensure_build_wares_production",
71 title = _"Ensure the supply of building wares",
72 number = 6,
73- body = objective_text(_"Supply Building Wares", _
74-[[Supply basic building material for your economy:]] .. paragraphdivider() ..
75- listitem_bullet(_[[Build a quarry]]) ..
76- listitem_bullet(_[[Build two woodcutter’s houses]]) ..
77- listitem_bullet(_[[Build two forester’s houses]]) ..
78- listitem_bullet(_[[Build a sawmill]])
79+ body = objective_text(_"Supply Building Wares",
80+ p(_[[Supply basic building material for your economy:]]) ..
81+ li(_[[Build a quarry]]) ..
82+ li(_[[Build two woodcutter’s houses]]) ..
83+ li(_[[Build two forester’s houses]]) ..
84+ li(_[[Build a sawmill]])
85 ),
86 }
87
88@@ -45,8 +44,8 @@
89 title = _"Expand your territory and explore",
90 number = 1,
91 body = objective_text(_"Expand and Explore",
92- _([[The island is huge and as long as we are not sure that we are alone here, we cannot relax. Explore and conquer it, this is the only way to protect us from threats on the island and from Atlantis.]]) .. paragraphdivider() ..
93- listitem_bullet(_[[Build military sites to expand your territory]])
94+ p(_([[The island is huge and as long as we are not sure that we are alone here, we cannot relax. Explore and conquer it, this is the only way to protect us from threats on the island and from Atlantis.]])) ..
95+ li(_[[Build military sites to expand your territory]])
96 ),
97 }
98
99@@ -55,16 +54,16 @@
100 title = _"Establish a solid food production",
101 number = 10,
102 body = objective_text(_"Food Production",
103- _[[Food is very important for mines and military training areas. Establish a well working food environment by building at least one farm, one blackroot farm and a mill. The two kinds of flour together with water from a well will be baked into bread in a bakery, so build a bakery and a well, too.]] .. paragraphdivider() ..
104- _[[The other two important food wares are smoked fish and smoked meat. Raw meat is delivered from a hunter. A fisher gets the fish out of the sea while a fish breeder makes sure that a school of fish does not go extinct by breeding more. Make sure that there are always fish left, otherwise the fish breeder won’t be able to breed new ones. The smoking happens in a smokery, you will need at least two of those.]] .. paragraphdivider() ..
105- listitem_bullet(_[[Build a farm and a blackroot farm]]) ..
106- listitem_bullet(_[[Build a mill to make cornmeal and blackroot flour]]) ..
107- listitem_bullet(_[[Build a well]]) ..
108- listitem_bullet(_[[Build a bakery to bake bread from cornmeal, blackroot flour and water]]) ..
109- listitem_bullet(_[[Build a hunter’s house to get raw meat]]) ..
110- listitem_bullet(_[[Build a fisher’s house close to water to get raw fish]]) ..
111- listitem_bullet(_[[Build a fish breeder’s house close to the fisher to make sure the fish do not die out]]) ..
112- listitem_bullet(_[[Build two smokeries to smoke raw meat and fish]])
113+ p(_[[Food is very important for mines and military training areas. Establish a well working food environment by building at least one farm, one blackroot farm and a mill. The two kinds of flour together with water from a well will be baked into bread in a bakery, so build a bakery and a well, too.]]) ..
114+ p(_[[The other two important food wares are smoked fish and smoked meat. Raw meat is delivered from a hunter. A fisher gets the fish out of the sea while a fish breeder makes sure that a school of fish does not go extinct by breeding more. Make sure that there are always fish left, otherwise the fish breeder won’t be able to breed new ones. The smoking happens in a smokery, you will need at least two of those.]]) ..
115+ li(_[[Build a farm and a blackroot farm]]) ..
116+ li(_[[Build a mill to make cornmeal and blackroot flour]]) ..
117+ li(_[[Build a well]]) ..
118+ li(_[[Build a bakery to bake bread from cornmeal, blackroot flour and water]]) ..
119+ li(_[[Build a hunter’s house to get raw meat]]) ..
120+ li(_[[Build a fisher’s house close to water to get raw fish]]) ..
121+ li(_[[Build a fish breeder’s house close to the fisher to make sure the fish do not die out]]) ..
122+ li(_[[Build two smokeries to smoke raw meat and fish]])
123 )
124 }
125
126@@ -73,11 +72,11 @@
127 title = _"Build a spider farm and a weaving mill",
128 number = 3,
129 body = objective_text(_"Spidercloth Production",
130- _[[The weavers produce spidercloth and tabards in the weaving mill. Spidercloth is needed for the construction of some buildings and clothing, while tabards are the uniforms of soldiers. The weaving mill needs gold thread and spider silk as raw material. Spider silk is produced by the spider farm, while gold thread is produced by the gold spinning mill out of gold.]] .. paragraphdivider() ..
131- listitem_bullet(_[[Build a weaving mill]]) ..
132- listitem_bullet(_[[Build a spider farm]]) ..
133- listitem_bullet(_[[Build a gold spinning mill]])
134- )
135+ p(_[[The weavers produce spidercloth and tabards in the weaving mill. Spidercloth is needed for the construction of some buildings and clothing, while tabards are the uniforms of soldiers. The weaving mill needs gold thread and spider silk as raw material. Spider silk is produced by the spider farm, while gold thread is produced by the gold spinning mill out of gold.]]) ..
136+ li(_[[Build a weaving mill]]) ..
137+ li(_[[Build a spider farm]]) ..
138+ li(_[[Build a gold spinning mill]])
139+ )
140 }
141
142 obj_make_heavy_industry_and_mining = {
143@@ -85,12 +84,12 @@
144 title = _"Build industry and mines",
145 number = 5,
146 body = objective_text(_"Industry and Mines",
147- _[[Iron ore, gold ore and coal are mined in the respective mines. The crystal mine will dig for quartz and diamonds – all of them are precious materials and very rarely found. It will produce a lot of granite while searching for them.]] .. paragraphdivider() ..
148- listitem_bullet(_[[The ores have to be smelted at a smelting works before they can be used. The refined materials are then used in the weapon smithy, the armor smithy and the toolsmithy.]]) .. paragraphdivider() ..
149- listitem_bullet(_[[Build a mine of each type. Make sure to send geologists to the mountain first.]]) ..
150- listitem_bullet(_[[Build a smelting works]]) ..
151- listitem_bullet(_[[Build an armor smithy and a weapon smithy]]) ..
152- listitem_bullet(_[[Build a toolsmithy]])
153+ p(_[[Iron ore, gold ore and coal are mined in the respective mines. The crystal mine will dig for quartz and diamonds – all of them are precious materials and very rarely found. It will produce a lot of granite while searching for them.]]) ..
154+ li_arrow(_[[The ores have to be smelted at a smelting works before they can be used. The refined materials are then used in the weapon smithy, the armor smithy and the toolsmithy.]]) ..
155+ li(_[[Build a mine of each type. Make sure to send geologists to the mountain first.]]) ..
156+ li(_[[Build a smelting works]]) ..
157+ li(_[[Build an armor smithy and a weapon smithy]]) ..
158+ li(_[[Build a toolsmithy]])
159 )
160 }
161
162@@ -99,8 +98,8 @@
163 title = _"Build a barracks",
164 number = 1,
165 body = objective_text(_"Recruiting new soldiers",
166- _[[Now that weapons are being forged, new soldiers can be recruited. For this, we need to deliver light tridents and tabards to the barracks. Recruits will arrive from the warehouse and receive one of each and some basic training to become a soldier.]] .. paragraphdivider() ..
167- listitem_bullet(_[[Build a barracks]])
168+ p(_[[Now that weapons are being forged, new soldiers can be recruited. For this, we need to deliver light tridents and tabards to the barracks. Recruits will arrive from the warehouse and receive one of each and some basic training to become a soldier.]]) ..
169+ li(_[[Build a barracks]])
170 )
171 }
172
173@@ -109,8 +108,8 @@
174 title = _"Build training sites for soldiers",
175 number = 2,
176 body = objective_text(_"Soldier Training Sites",
177- _[[Like all other tribes, the Atlanteans are also able to train soldiers: the dungeon trains attack – the major attribute of the Atlanteans – and the labyrinth trains evasion, health and defense. The items produced by the industry are used to train better soldiers in the two training sites.]] .. paragraphdivider() ..
178- listitem_bullet(_[[Build a dungeon and a labyrinth]])
179+ p(_[[Like all other tribes, the Atlanteans are also able to train soldiers: the dungeon trains attack – the major attribute of the Atlanteans – and the labyrinth trains evasion, health and defense. The items produced by the industry are used to train better soldiers in the two training sites.]]) ..
180+ li(_[[Build a dungeon and a labyrinth]])
181 )
182 }
183
184@@ -119,9 +118,9 @@
185 title = _"Build a warehouse and a horse farm",
186 number = 2,
187 body = objective_text(_"Warehouse and Horse Farm",
188- _[[As your road network gets longer and more complicated, you should employ horses to help out your carriers. Horses are bred at horse farms using water and corn. A warehouse will also help to ensure that your transportation system does not collapse.]] .. paragraphdivider() ..
189- listitem_bullet(_[[Build a warehouse]]) ..
190- listitem_bullet(_[[Build a horse farm]])
191+ p(_[[As your road network gets longer and more complicated, you should employ horses to help out your carriers. Horses are bred at horse farms using water and corn. A warehouse will also help to ensure that your transportation system does not collapse.]]) ..
192+ li(_[[Build a warehouse]]) ..
193+ li(_[[Build a horse farm]])
194 )
195 }
196
197@@ -130,8 +129,8 @@
198 title = _"Build 3 ships to escape from the island",
199 number = 1,
200 body = objective_text(_"Escape From the Island",
201- _[[There is a lake at the top of the island. Build three ships in these waters and you might be able to rescue your people before the island is swallowed completely by the ocean.]] .. paragraphdivider() ..
202- listitem_bullet(_[[Build a shipyard close to the lake to start building ships]])
203+ p(_[[There is a lake at the top of the island. Build three ships in these waters and you might be able to rescue your people before the island is swallowed completely by the ocean.]]) ..
204+ li(_[[Build a shipyard close to the lake to start building ships]])
205 )
206 }
207
208@@ -143,7 +142,7 @@
209 initial_messages = {
210 {
211 title = _"Proud to the Death",
212- body = rt(
213+ body = (
214 h1(_"Favored by the God") ..
215 -- TRANSLATORS: Foreword
216 p(_([[On the hidden and lost island of Atlantis, a proud tribe settled since the world was very young. Ruled by the bloodline of King Ajanthul – the first human to be empowered by the sea god Lutas to breathe above sea level – and the wise clerics, who provided the link to Lutas – they prospered and became civilized.]])) ..
217@@ -153,7 +152,7 @@
218 },
219 {
220 title = _"Disgraced Before the God",
221- body = rt(
222+ body = (
223 h1(_"The God’s Punishment") ..
224 -- TRANSLATORS: Foreword
225 p(_([[But all seemed well. Only the horses seemed to feel something was wrong. During the nights, they went crazy and were full of fear. It was not long before the horse breeder Xydra figured out what was wrong with them: the sea level in front of their stable was rising with ever increasing speed.]])) ..
226@@ -163,7 +162,7 @@
227 },
228 {
229 title = _"Uproar and Confusion",
230- body = rt(
231+ body = (
232 h1(_"Emerging Chaos…") ..
233 -- TRANSLATORS: Foreword
234 p(_([[Guilt-ridden, the king committed suicide. Without a monarch, the people turned to the clerics, but they had no substantial help to offer. Most accepted their fate while others tried to change the god’s mind by offering animals in his temple. But to no avail…]])) ..
235@@ -476,7 +475,16 @@
236 .. paragraphdivider() ..
237 -- TRANSLATORS: Jundlina
238 _([[I expect a long journey, but we will find the land of Satul in the end. This is what I promised my people. And myself.]]))
239- .. rt("<p font-size=10> <br></p>" .. h1(_ "Congratulations") ..
240- p(_[[You have won this mission. Continue with the next one or keep playing for as long as you like.]]))
241+ .. objective_text(_"Congratulations",
242+ _[[You have won this mission. Continue with the next one or keep playing for as long as you like.]])
243 }
244 }
245+
246+function building_lost(icon)
247+ set_textdomain("scenario_atl01.wmf")
248+ return {
249+ -- TRANSLATORS: Short message title. Translate as "Lost!" if you don't have enough space.
250+ title = pgettext("message_short_title", "Building lost!"),
251+ text = li_image(icon, _"We lost a building to the ocean!")
252+ }
253+end

Subscribers

People subscribed via source and target branches

to status/vote changes: