Merge lp:~widelands-dev/widelands/forested_mountain_terrain into lp:widelands
- forested_mountain_terrain
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 7667 | ||||
Proposed branch: | lp:~widelands-dev/widelands/forested_mountain_terrain | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
454 lines (+235/-3) 4 files modified
src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc (+3/-0) src/logic/world/terrain_description.cc (+4/-0) src/logic/world/terrain_description.h (+5/-0) world/terrains/init.lua (+223/-3) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands/forested_mountain_terrain | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
GunChleoc | Approve | ||
kaputtnik (community) | Needs Resubmitting | ||
Review via email: mp+280198@code.launchpad.net |
Commit message
Description of the change
Added new terrain type "forested mountain", a mineable terrain where trees will grow.
I had some trouble with merging trunk related to the last changes to "is value". There where conflicts (as assumed :-) ) and the additional "tooltip" entry in /world/
TiborB (tiborb95) wrote : | # |
GunChleoc (gunchleoc) wrote : | # |
We could go with "likes trees" or "tree friendly".
I will look at the code. If you are unsure about C++ merge conflicts in the future, you can submit the branch without a merge and let me have a look. Most often, I will have been the one fiddling with the code, so I'll have the reason for the changes in my head.
GunChleoc (gunchleoc) wrote : | # |
Code LGTM - just 2 nits. I'll do some testing once the compiler has finished.
kaputtnik (franku) wrote : | # |
Thanks :-)
I've just overlooked to adjust the comment.
"Forested Mountain" is better.
I will change this and resubmit.
kaputtnik (franku) wrote : | # |
Changed "Mountain" into "Forested Mountain" for appropriate terrains and adjusted the comment.
GunChleoc (gunchleoc) wrote : | # |
Tested and LGTM. Will merge :)
Preview Diff
1 | === modified file 'src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc' | |||
2 | --- src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc 2015-12-04 13:12:50 +0000 | |||
3 | +++ src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc 2015-12-11 07:30:44 +0000 | |||
4 | @@ -62,6 +62,9 @@ | |||
5 | 62 | 62 | ||
6 | 63 | // Collect tooltips and blit small icons representing "is" values | 63 | // Collect tooltips and blit small icons representing "is" values |
7 | 64 | for (const TerrainDescription::Type& terrain_type : terrain_descr.get_types()) { | 64 | for (const TerrainDescription::Type& terrain_type : terrain_descr.get_types()) { |
8 | 65 | tooltips.insert(tooltips.end(), | ||
9 | 66 | terrain_descr.custom_tooltips().begin(), | ||
10 | 67 | terrain_descr.custom_tooltips().end()); | ||
11 | 65 | tooltips.push_back(terrain_type.descname); | 68 | tooltips.push_back(terrain_type.descname); |
12 | 66 | 69 | ||
13 | 67 | blit(Rect(pt.x, pt.y, terrain_type.icon->width(), terrain_type.icon->height()), | 70 | blit(Rect(pt.x, pt.y, terrain_type.icon->width(), terrain_type.icon->height()), |
14 | 68 | 71 | ||
15 | === modified file 'src/logic/world/terrain_description.cc' | |||
16 | --- src/logic/world/terrain_description.cc 2015-12-05 10:59:02 +0000 | |||
17 | +++ src/logic/world/terrain_description.cc 2015-12-11 07:30:44 +0000 | |||
18 | @@ -112,6 +112,10 @@ | |||
19 | 112 | fertility_(table.get_double("fertility")), | 112 | fertility_(table.get_double("fertility")), |
20 | 113 | humidity_(table.get_double("humidity")) { | 113 | humidity_(table.get_double("humidity")) { |
21 | 114 | 114 | ||
22 | 115 | if (table.has_key("tooltips")) { | ||
23 | 116 | custom_tooltips_ = table.get_table("tooltips")->array_entries<std::string>(); | ||
24 | 117 | } | ||
25 | 118 | |||
26 | 115 | if (!(0 < fertility_ && fertility_ < 1.)) { | 119 | if (!(0 < fertility_ && fertility_ < 1.)) { |
27 | 116 | throw GameDataError("%s: fertility is not in (0, 1).", name_.c_str()); | 120 | throw GameDataError("%s: fertility is not in (0, 1).", name_.c_str()); |
28 | 117 | } | 121 | } |
29 | 118 | 122 | ||
30 | === modified file 'src/logic/world/terrain_description.h' | |||
31 | --- src/logic/world/terrain_description.h 2015-12-05 10:59:02 +0000 | |||
32 | +++ src/logic/world/terrain_description.h 2015-12-11 07:30:44 +0000 | |||
33 | @@ -121,11 +121,16 @@ | |||
34 | 121 | /// Fertility in percent [0, 1]. | 121 | /// Fertility in percent [0, 1]. |
35 | 122 | double fertility() const; | 122 | double fertility() const; |
36 | 123 | 123 | ||
37 | 124 | /// Additional tooptip entries for the editor | ||
38 | 125 | const std::vector<std::string>& custom_tooltips() const {return custom_tooltips_;} | ||
39 | 126 | |||
40 | 127 | |||
41 | 124 | private: | 128 | private: |
42 | 125 | const std::string name_; | 129 | const std::string name_; |
43 | 126 | const std::string descname_; | 130 | const std::string descname_; |
44 | 127 | const EditorCategory* editor_category_; ///< not owned. | 131 | const EditorCategory* editor_category_; ///< not owned. |
45 | 128 | Is is_; | 132 | Is is_; |
46 | 133 | std::vector<std::string> custom_tooltips_; | ||
47 | 129 | std::vector<uint8_t> valid_resources_; | 134 | std::vector<uint8_t> valid_resources_; |
48 | 130 | int default_resource_index_; | 135 | int default_resource_index_; |
49 | 131 | int default_resource_amount_; | 136 | int default_resource_amount_; |
50 | 132 | 137 | ||
51 | === modified file 'world/terrains/init.lua' | |||
52 | --- world/terrains/init.lua 2015-12-05 10:59:02 +0000 | |||
53 | +++ world/terrains/init.lua 2015-12-11 07:30:44 +0000 | |||
54 | @@ -42,12 +42,18 @@ | |||
55 | 42 | -- The following properties are available: | 42 | -- The following properties are available: |
56 | 43 | -- "arable": Allows building of normal buildings and roads | 43 | -- "arable": Allows building of normal buildings and roads |
57 | 44 | -- "mineable": Allows building of mines and roads | 44 | -- "mineable": Allows building of mines and roads |
59 | 45 | -- "walkable": Allows building of roads only | 45 | -- "walkable": Allows building of roads only. |
60 | 46 | -- "water": Nothing can be built here, but ships and aquatic animals can pass | 46 | -- "water": Nothing can be built here, but ships and aquatic animals can pass |
62 | 47 | -- "unreachable": Nothing can be built here (not even immovables), and nothing can walk on it | 47 | -- "unreachable": Nothing can be built here, and nothing can walk on it, and nothing will grow. |
63 | 48 | -- "unwalkable": Nothing can be built here, and nothing can walk on it | 48 | -- "unwalkable": Nothing can be built here, and nothing can walk on it |
64 | 49 | is = "arable", | 49 | is = "arable", |
65 | 50 | 50 | ||
66 | 51 | -- You can add custom additional tooltip entries here. | ||
67 | 52 | tooltips = { | ||
68 | 53 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
69 | 54 | _"likes trees", | ||
70 | 55 | }, | ||
71 | 56 | |||
72 | 51 | -- The list resources that can be found in this terrain. | 57 | -- The list resources that can be found in this terrain. |
73 | 52 | valid_resources = {"water"}, | 58 | valid_resources = {"water"}, |
74 | 53 | 59 | ||
75 | @@ -80,6 +86,10 @@ | |||
76 | 80 | descname = _ "Meadow", | 86 | descname = _ "Meadow", |
77 | 81 | editor_category = "green", | 87 | editor_category = "green", |
78 | 82 | is = "arable", | 88 | is = "arable", |
79 | 89 | tooltips = { | ||
80 | 90 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
81 | 91 | _"likes trees", | ||
82 | 92 | }, | ||
83 | 83 | valid_resources = {"water"}, | 93 | valid_resources = {"water"}, |
84 | 84 | default_resource = "water", | 94 | default_resource = "water", |
85 | 85 | default_resource_amount = 10, | 95 | default_resource_amount = 10, |
86 | @@ -97,6 +107,10 @@ | |||
87 | 97 | descname = _ "Meadow", | 107 | descname = _ "Meadow", |
88 | 98 | editor_category = "green", | 108 | editor_category = "green", |
89 | 99 | is = "arable", | 109 | is = "arable", |
90 | 110 | tooltips = { | ||
91 | 111 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
92 | 112 | _"likes trees", | ||
93 | 113 | }, | ||
94 | 100 | valid_resources = {"water"}, | 114 | valid_resources = {"water"}, |
95 | 101 | default_resource = "water", | 115 | default_resource = "water", |
96 | 102 | default_resource_amount = 10, | 116 | default_resource_amount = 10, |
97 | @@ -113,6 +127,10 @@ | |||
98 | 113 | descname = _ "Meadow", | 127 | descname = _ "Meadow", |
99 | 114 | editor_category = "green", | 128 | editor_category = "green", |
100 | 115 | is = "arable", | 129 | is = "arable", |
101 | 130 | tooltips = { | ||
102 | 131 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
103 | 132 | _"likes trees", | ||
104 | 133 | }, | ||
105 | 116 | valid_resources = {"water"}, | 134 | valid_resources = {"water"}, |
106 | 117 | default_resource = "water", | 135 | default_resource = "water", |
107 | 118 | default_resource_amount = 10, | 136 | default_resource_amount = 10, |
108 | @@ -237,6 +255,46 @@ | |||
109 | 237 | 255 | ||
110 | 238 | 256 | ||
111 | 239 | world:new_terrain_type{ | 257 | world:new_terrain_type{ |
112 | 258 | name = "summer_forested_mountain1", | ||
113 | 259 | descname = _ "Forested Mountain", | ||
114 | 260 | editor_category = "green", | ||
115 | 261 | is = "mineable", | ||
116 | 262 | -- You can add custom additional tooltip entries here. | ||
117 | 263 | tooltips = { | ||
118 | 264 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
119 | 265 | _"likes trees", | ||
120 | 266 | }, | ||
121 | 267 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
122 | 268 | default_resource = "", | ||
123 | 269 | default_resource_amount = 0, | ||
124 | 270 | textures = { pics_dir .. "green/forested_mountain1_00.png" }, | ||
125 | 271 | dither_layer = 71, | ||
126 | 272 | temperature = 50, | ||
127 | 273 | humidity = 0.75, | ||
128 | 274 | fertility = 0.5, | ||
129 | 275 | } | ||
130 | 276 | |||
131 | 277 | world:new_terrain_type{ | ||
132 | 278 | name = "summer_forested_mountain2", | ||
133 | 279 | descname = _ "Forested Mountain", | ||
134 | 280 | editor_category = "green", | ||
135 | 281 | is = "mineable", | ||
136 | 282 | -- You can add custom additional tooltip entries here. | ||
137 | 283 | tooltips = { | ||
138 | 284 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
139 | 285 | _"likes trees", | ||
140 | 286 | }, | ||
141 | 287 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
142 | 288 | default_resource = "", | ||
143 | 289 | default_resource_amount = 0, | ||
144 | 290 | textures = { pics_dir .. "green/forested_mountain2_00.png" }, | ||
145 | 291 | dither_layer = 71, | ||
146 | 292 | temperature = 50, | ||
147 | 293 | humidity = 0.75, | ||
148 | 294 | fertility = 0.5, | ||
149 | 295 | } | ||
150 | 296 | |||
151 | 297 | world:new_terrain_type{ | ||
152 | 240 | name = "sumpf", | 298 | name = "sumpf", |
153 | 241 | descname = _ "Swamp", | 299 | descname = _ "Swamp", |
154 | 242 | editor_category = "green", | 300 | editor_category = "green", |
155 | @@ -252,7 +310,6 @@ | |||
156 | 252 | fertility = 0.1, | 310 | fertility = 0.1, |
157 | 253 | } | 311 | } |
158 | 254 | 312 | ||
159 | 255 | |||
160 | 256 | world:new_terrain_type{ | 313 | world:new_terrain_type{ |
161 | 257 | name = "strand", | 314 | name = "strand", |
162 | 258 | descname = _ "Beach", | 315 | descname = _ "Beach", |
163 | @@ -326,6 +383,10 @@ | |||
164 | 326 | descname = _ "Ashes", | 383 | descname = _ "Ashes", |
165 | 327 | editor_category = "wasteland", | 384 | editor_category = "wasteland", |
166 | 328 | is = "arable", | 385 | is = "arable", |
167 | 386 | tooltips = { | ||
168 | 387 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
169 | 388 | _"likes trees", | ||
170 | 389 | }, | ||
171 | 329 | valid_resources = { "water" }, | 390 | valid_resources = { "water" }, |
172 | 330 | default_resource = "water", | 391 | default_resource = "water", |
173 | 331 | default_resource_amount = 5, | 392 | default_resource_amount = 5, |
174 | @@ -342,6 +403,10 @@ | |||
175 | 342 | descname = _ "Ashes", | 403 | descname = _ "Ashes", |
176 | 343 | editor_category = "wasteland", | 404 | editor_category = "wasteland", |
177 | 344 | is = "arable", | 405 | is = "arable", |
178 | 406 | tooltips = { | ||
179 | 407 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
180 | 408 | _"likes trees", | ||
181 | 409 | }, | ||
182 | 345 | valid_resources = { "water" }, | 410 | valid_resources = { "water" }, |
183 | 346 | default_resource = "water", | 411 | default_resource = "water", |
184 | 347 | default_resource_amount = 4, | 412 | default_resource_amount = 4, |
185 | @@ -358,6 +423,10 @@ | |||
186 | 358 | descname = _ "Hard Ground", | 423 | descname = _ "Hard Ground", |
187 | 359 | editor_category = "wasteland", | 424 | editor_category = "wasteland", |
188 | 360 | is = "arable", | 425 | is = "arable", |
189 | 426 | tooltips = { | ||
190 | 427 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
191 | 428 | _"likes trees", | ||
192 | 429 | }, | ||
193 | 361 | valid_resources = { "water" }, | 430 | valid_resources = { "water" }, |
194 | 362 | default_resource = "water", | 431 | default_resource = "water", |
195 | 363 | default_resource_amount = 10, | 432 | default_resource_amount = 10, |
196 | @@ -374,6 +443,10 @@ | |||
197 | 374 | descname = _ "Hard Ground", | 443 | descname = _ "Hard Ground", |
198 | 375 | editor_category = "wasteland", | 444 | editor_category = "wasteland", |
199 | 376 | is = "arable", | 445 | is = "arable", |
200 | 446 | tooltips = { | ||
201 | 447 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
202 | 448 | _"likes trees", | ||
203 | 449 | }, | ||
204 | 377 | valid_resources = { "water" }, | 450 | valid_resources = { "water" }, |
205 | 378 | default_resource = "water", | 451 | default_resource = "water", |
206 | 379 | default_resource_amount = 10, | 452 | default_resource_amount = 10, |
207 | @@ -390,6 +463,10 @@ | |||
208 | 390 | descname = _ "Hard Ground", | 463 | descname = _ "Hard Ground", |
209 | 391 | editor_category = "wasteland", | 464 | editor_category = "wasteland", |
210 | 392 | is = "arable", | 465 | is = "arable", |
211 | 466 | tooltips = { | ||
212 | 467 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
213 | 468 | _"likes trees", | ||
214 | 469 | }, | ||
215 | 393 | valid_resources = { "water" }, | 470 | valid_resources = { "water" }, |
216 | 394 | default_resource = "water", | 471 | default_resource = "water", |
217 | 395 | default_resource_amount = 10, | 472 | default_resource_amount = 10, |
218 | @@ -406,6 +483,10 @@ | |||
219 | 406 | descname = _ "Hard Ground", | 483 | descname = _ "Hard Ground", |
220 | 407 | editor_category = "wasteland", | 484 | editor_category = "wasteland", |
221 | 408 | is = "arable", | 485 | is = "arable", |
222 | 486 | tooltips = { | ||
223 | 487 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
224 | 488 | _"likes trees", | ||
225 | 489 | }, | ||
226 | 409 | valid_resources = { "water" }, | 490 | valid_resources = { "water" }, |
227 | 410 | default_resource = "water", | 491 | default_resource = "water", |
228 | 411 | default_resource_amount = 10, | 492 | default_resource_amount = 10, |
229 | @@ -496,6 +577,43 @@ | |||
230 | 496 | fertility = 0.2, | 577 | fertility = 0.2, |
231 | 497 | } | 578 | } |
232 | 498 | 579 | ||
233 | 580 | world:new_terrain_type{ | ||
234 | 581 | name = "wasteland_forested_mountain1", | ||
235 | 582 | descname = _ "Forested Mountain", | ||
236 | 583 | editor_category = "wasteland", | ||
237 | 584 | is = "mineable", | ||
238 | 585 | tooltips = { | ||
239 | 586 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
240 | 587 | _"likes trees", | ||
241 | 588 | }, | ||
242 | 589 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
243 | 590 | default_resource = "", | ||
244 | 591 | default_resource_amount = 0, | ||
245 | 592 | textures = { pics_dir .. "wasteland/forested_mountain1_00.png" }, | ||
246 | 593 | dither_layer = 81, | ||
247 | 594 | temperature = 110, | ||
248 | 595 | humidity = 0.15, | ||
249 | 596 | fertility = 0.95, | ||
250 | 597 | } | ||
251 | 598 | |||
252 | 599 | world:new_terrain_type{ | ||
253 | 600 | name = "wasteland_forested_mountain2", | ||
254 | 601 | descname = _ "Forested Mountain", | ||
255 | 602 | editor_category = "wasteland", | ||
256 | 603 | is = "mineable", | ||
257 | 604 | tooltips = { | ||
258 | 605 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
259 | 606 | _"likes trees", | ||
260 | 607 | }, | ||
261 | 608 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
262 | 609 | default_resource = "", | ||
263 | 610 | default_resource_amount = 0, | ||
264 | 611 | textures = { pics_dir .. "wasteland/forested_mountain2_00.png" }, | ||
265 | 612 | dither_layer = 81, | ||
266 | 613 | temperature = 95, | ||
267 | 614 | humidity = 0.2, | ||
268 | 615 | fertility = 0.4, | ||
269 | 616 | } | ||
270 | 499 | 617 | ||
271 | 500 | world:new_terrain_type{ | 618 | world:new_terrain_type{ |
272 | 501 | name = "wasteland_beach", | 619 | name = "wasteland_beach", |
273 | @@ -574,6 +692,10 @@ | |||
274 | 574 | descname = _ "Tundra", | 692 | descname = _ "Tundra", |
275 | 575 | editor_category = "winter", | 693 | editor_category = "winter", |
276 | 576 | is = "arable", | 694 | is = "arable", |
277 | 695 | tooltips = { | ||
278 | 696 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
279 | 697 | _"likes trees", | ||
280 | 698 | }, | ||
281 | 577 | valid_resources = { "water" }, | 699 | valid_resources = { "water" }, |
282 | 578 | default_resource = "water", | 700 | default_resource = "water", |
283 | 579 | default_resource_amount = 10, | 701 | default_resource_amount = 10, |
284 | @@ -590,6 +712,10 @@ | |||
285 | 590 | descname = _ "Tundra", | 712 | descname = _ "Tundra", |
286 | 591 | editor_category = "winter", | 713 | editor_category = "winter", |
287 | 592 | is = "arable", | 714 | is = "arable", |
288 | 715 | tooltips = { | ||
289 | 716 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
290 | 717 | _"likes trees", | ||
291 | 718 | }, | ||
292 | 593 | valid_resources = { "water" }, | 719 | valid_resources = { "water" }, |
293 | 594 | default_resource = "water", | 720 | default_resource = "water", |
294 | 595 | default_resource_amount = 10, | 721 | default_resource_amount = 10, |
295 | @@ -606,6 +732,10 @@ | |||
296 | 606 | descname = _ "Tundra", | 732 | descname = _ "Tundra", |
297 | 607 | editor_category = "winter", | 733 | editor_category = "winter", |
298 | 608 | is = "arable", | 734 | is = "arable", |
299 | 735 | tooltips = { | ||
300 | 736 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
301 | 737 | _"likes trees", | ||
302 | 738 | }, | ||
303 | 609 | valid_resources = { "water" }, | 739 | valid_resources = { "water" }, |
304 | 610 | default_resource = "water", | 740 | default_resource = "water", |
305 | 611 | default_resource_amount = 10, | 741 | default_resource_amount = 10, |
306 | @@ -728,6 +858,43 @@ | |||
307 | 728 | fertility = 0.05, | 858 | fertility = 0.05, |
308 | 729 | } | 859 | } |
309 | 730 | 860 | ||
310 | 861 | world:new_terrain_type{ | ||
311 | 862 | name = "winter_forested_mountain1", | ||
312 | 863 | descname = _ "Forested Mountain", | ||
313 | 864 | editor_category = "winter", | ||
314 | 865 | is = "mineable", | ||
315 | 866 | tooltips = { | ||
316 | 867 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
317 | 868 | _"likes trees", | ||
318 | 869 | }, | ||
319 | 870 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
320 | 871 | default_resource = "", | ||
321 | 872 | default_resource_amount = 0, | ||
322 | 873 | textures = { pics_dir .. "winter/forested_mountain1_00.png" }, | ||
323 | 874 | dither_layer = 101, | ||
324 | 875 | temperature = 35, | ||
325 | 876 | humidity = 0.7, | ||
326 | 877 | fertility = 0.4, | ||
327 | 878 | } | ||
328 | 879 | |||
329 | 880 | world:new_terrain_type{ | ||
330 | 881 | name = "winter_forested_mountain2", | ||
331 | 882 | descname = _ "Forested Mountain", | ||
332 | 883 | editor_category = "winter", | ||
333 | 884 | is = "mineable", | ||
334 | 885 | tooltips = { | ||
335 | 886 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
336 | 887 | _"likes trees", | ||
337 | 888 | }, | ||
338 | 889 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
339 | 890 | default_resource = "", | ||
340 | 891 | default_resource_amount = 0, | ||
341 | 892 | textures = { pics_dir .. "winter/forested_mountain2_00.png" }, | ||
342 | 893 | dither_layer = 101, | ||
343 | 894 | temperature = 35, | ||
344 | 895 | humidity = 0.7, | ||
345 | 896 | fertility = 0.4, | ||
346 | 897 | } | ||
347 | 731 | 898 | ||
348 | 732 | world:new_terrain_type{ | 899 | world:new_terrain_type{ |
349 | 733 | name = "ice", | 900 | name = "ice", |
350 | @@ -852,6 +1019,10 @@ | |||
351 | 852 | descname = _ "Steppe", | 1019 | descname = _ "Steppe", |
352 | 853 | editor_category = "desert", | 1020 | editor_category = "desert", |
353 | 854 | is = "arable", | 1021 | is = "arable", |
354 | 1022 | tooltips = { | ||
355 | 1023 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
356 | 1024 | _"likes trees", | ||
357 | 1025 | }, | ||
358 | 855 | valid_resources = {"water"}, | 1026 | valid_resources = {"water"}, |
359 | 856 | default_resource = "water", | 1027 | default_resource = "water", |
360 | 857 | default_resource_amount = 5, | 1028 | default_resource_amount = 5, |
361 | @@ -868,6 +1039,10 @@ | |||
362 | 868 | descname = _ "Meadow", | 1039 | descname = _ "Meadow", |
363 | 869 | editor_category = "desert", | 1040 | editor_category = "desert", |
364 | 870 | is = "arable", | 1041 | is = "arable", |
365 | 1042 | tooltips = { | ||
366 | 1043 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
367 | 1044 | _"likes trees", | ||
368 | 1045 | }, | ||
369 | 871 | valid_resources = {"water"}, | 1046 | valid_resources = {"water"}, |
370 | 872 | default_resource = "water", | 1047 | default_resource = "water", |
371 | 873 | default_resource_amount = 10, | 1048 | default_resource_amount = 10, |
372 | @@ -884,6 +1059,10 @@ | |||
373 | 884 | descname = _ "Mountain Meadow", | 1059 | descname = _ "Mountain Meadow", |
374 | 885 | editor_category = "desert", | 1060 | editor_category = "desert", |
375 | 886 | is = "arable", | 1061 | is = "arable", |
376 | 1062 | tooltips = { | ||
377 | 1063 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
378 | 1064 | _"likes trees", | ||
379 | 1065 | }, | ||
380 | 887 | valid_resources = {"water"}, | 1066 | valid_resources = {"water"}, |
381 | 888 | default_resource = "", | 1067 | default_resource = "", |
382 | 889 | default_resource_amount = 0, | 1068 | default_resource_amount = 0, |
383 | @@ -900,6 +1079,10 @@ | |||
384 | 900 | descname = _ "High Mountain Meadow", | 1079 | descname = _ "High Mountain Meadow", |
385 | 901 | editor_category = "desert", | 1080 | editor_category = "desert", |
386 | 902 | is = "arable", | 1081 | is = "arable", |
387 | 1082 | tooltips = { | ||
388 | 1083 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
389 | 1084 | _"likes trees", | ||
390 | 1085 | }, | ||
391 | 903 | valid_resources = {"water"}, | 1086 | valid_resources = {"water"}, |
392 | 904 | default_resource = "", | 1087 | default_resource = "", |
393 | 905 | default_resource_amount = 0, | 1088 | default_resource_amount = 0, |
394 | @@ -974,6 +1157,43 @@ | |||
395 | 974 | fertility = 0.05, | 1157 | fertility = 0.05, |
396 | 975 | } | 1158 | } |
397 | 976 | 1159 | ||
398 | 1160 | world:new_terrain_type{ | ||
399 | 1161 | name = "desert_forested_mountain1", | ||
400 | 1162 | descname = _ "Forested Mountain", | ||
401 | 1163 | editor_category = "desert", | ||
402 | 1164 | is = "mineable", | ||
403 | 1165 | tooltips = { | ||
404 | 1166 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
405 | 1167 | _"likes trees", | ||
406 | 1168 | }, | ||
407 | 1169 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
408 | 1170 | default_resource = "", | ||
409 | 1171 | default_resource_amount = 0, | ||
410 | 1172 | textures = { pics_dir .. "desert/forested_mountain1_00.png" }, | ||
411 | 1173 | dither_layer = 71, | ||
412 | 1174 | temperature = 141, | ||
413 | 1175 | humidity = 0.5, | ||
414 | 1176 | fertility = 0.5, | ||
415 | 1177 | } | ||
416 | 1178 | |||
417 | 1179 | world:new_terrain_type{ | ||
418 | 1180 | name = "desert_forested_mountain2", | ||
419 | 1181 | descname = _ "Forested Mountain", | ||
420 | 1182 | editor_category = "desert", | ||
421 | 1183 | is = "mineable", | ||
422 | 1184 | tooltips = { | ||
423 | 1185 | -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible. | ||
424 | 1186 | _"likes trees", | ||
425 | 1187 | }, | ||
426 | 1188 | valid_resources = {"coal", "iron", "gold", "stones"}, | ||
427 | 1189 | default_resource = "", | ||
428 | 1190 | default_resource_amount = 0, | ||
429 | 1191 | textures = { pics_dir .. "desert/forested_mountain2_00.png" }, | ||
430 | 1192 | dither_layer = 141, | ||
431 | 1193 | temperature = 120, | ||
432 | 1194 | humidity = 0.5, | ||
433 | 1195 | fertility = 0.5, | ||
434 | 1196 | } | ||
435 | 977 | 1197 | ||
436 | 978 | world:new_terrain_type{ | 1198 | world:new_terrain_type{ |
437 | 979 | name = "desert1", | 1199 | name = "desert1", |
438 | 980 | 1200 | ||
439 | === added file 'world/terrains/pics/desert/forested_mountain1_00.png' | |||
440 | 981 | Binary files world/terrains/pics/desert/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/desert/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ | 1201 | Binary files world/terrains/pics/desert/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/desert/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ |
441 | === added file 'world/terrains/pics/desert/forested_mountain2_00.png' | |||
442 | 982 | Binary files world/terrains/pics/desert/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/desert/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ | 1202 | Binary files world/terrains/pics/desert/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/desert/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ |
443 | === added file 'world/terrains/pics/green/forested_mountain1_00.png' | |||
444 | 983 | Binary files world/terrains/pics/green/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/green/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ | 1203 | Binary files world/terrains/pics/green/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/green/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ |
445 | === added file 'world/terrains/pics/green/forested_mountain2_00.png' | |||
446 | 984 | Binary files world/terrains/pics/green/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/green/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ | 1204 | Binary files world/terrains/pics/green/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/green/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ |
447 | === added file 'world/terrains/pics/wasteland/forested_mountain1_00.png' | |||
448 | 985 | Binary files world/terrains/pics/wasteland/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/wasteland/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ | 1205 | Binary files world/terrains/pics/wasteland/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/wasteland/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ |
449 | === added file 'world/terrains/pics/wasteland/forested_mountain2_00.png' | |||
450 | 986 | Binary files world/terrains/pics/wasteland/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/wasteland/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ | 1206 | Binary files world/terrains/pics/wasteland/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/wasteland/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ |
451 | === added file 'world/terrains/pics/winter/forested_mountain1_00.png' | |||
452 | 987 | Binary files world/terrains/pics/winter/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/winter/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ | 1207 | Binary files world/terrains/pics/winter/forested_mountain1_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/winter/forested_mountain1_00.png 2015-12-11 07:30:44 +0000 differ |
453 | === added file 'world/terrains/pics/winter/forested_mountain2_00.png' | |||
454 | 988 | Binary files world/terrains/pics/winter/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/winter/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ | 1208 | Binary files world/terrains/pics/winter/forested_mountain2_00.png 1970-01-01 00:00:00 +0000 and world/terrains/pics/winter/forested_mountain2_00.png 2015-12-11 07:30:44 +0000 differ |
Is term "likes trees" proper from language point of view? I can not say if you resumed conflicts properly, but code looks good to me.