Merge lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 9095
Proposed branch: lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr
Merge into: lp:widelands
Diff against target: 2782 lines (+527/-409)
101 files modified
src/CMakeLists.txt (+1/-0)
src/ai/CMakeLists.txt (+3/-0)
src/ai/ai_help_structs.h (+1/-1)
src/ai/defaultai.cc (+3/-3)
src/economy/CMakeLists.txt (+4/-0)
src/economy/input_queue.h (+0/-1)
src/economy/test/CMakeLists.txt (+1/-0)
src/economy/ware_instance.h (+0/-1)
src/economy/wares_queue.h (+0/-1)
src/economy/workers_queue.h (+0/-1)
src/editor/CMakeLists.txt (+3/-0)
src/editor/map_generator.cc (+1/-1)
src/editor/tools/set_origin_tool.h (+0/-1)
src/editor/tools/set_port_space_tool.h (+0/-1)
src/editor/tools/set_resources_tool.h (+0/-1)
src/editor/tools/set_starting_pos_tool.h (+0/-1)
src/editor/ui_menus/categorized_item_selection_menu.h (+6/-6)
src/editor/ui_menus/main_menu_new_map.cc (+1/-1)
src/editor/ui_menus/main_menu_new_map.h (+1/-1)
src/editor/ui_menus/tool_change_resources_options_menu.cc (+0/-1)
src/game_io/CMakeLists.txt (+4/-0)
src/graphic/CMakeLists.txt (+9/-2)
src/graphic/gl/dither_program.cc (+2/-2)
src/graphic/gl/dither_program.h (+3/-3)
src/graphic/gl/fields_to_draw.h (+2/-3)
src/graphic/gl/grid_program.h (+1/-1)
src/graphic/gl/terrain_program.cc (+1/-1)
src/graphic/gl/terrain_program.h (+2/-2)
src/graphic/gl/workarea_program.h (+1/-1)
src/graphic/render_queue.h (+2/-2)
src/logic/CMakeLists.txt (+99/-149)
src/logic/editor_game_base.cc (+1/-1)
src/logic/game_controller.h (+0/-1)
src/logic/map.cc (+2/-2)
src/logic/map.h (+1/-2)
src/logic/map_objects/CMakeLists.txt (+152/-0)
src/logic/map_objects/backtrace.cc (+1/-1)
src/logic/map_objects/backtrace.h (+3/-3)
src/logic/map_objects/bob.cc (+2/-2)
src/logic/map_objects/description_maintainer.cc (+1/-0)
src/logic/map_objects/description_maintainer.h (+9/-5)
src/logic/map_objects/findbob.cc (+1/-1)
src/logic/map_objects/findbob.h (+3/-3)
src/logic/map_objects/findimmovable.cc (+1/-1)
src/logic/map_objects/findimmovable.h (+3/-3)
src/logic/map_objects/findnode.cc (+1/-1)
src/logic/map_objects/findnode.h (+2/-2)
src/logic/map_objects/terrain_affinity.cc (+1/-1)
src/logic/map_objects/terrain_affinity.h (+1/-1)
src/logic/map_objects/tribes/building.cc (+10/-10)
src/logic/map_objects/tribes/building.h (+2/-3)
src/logic/map_objects/tribes/carrier.cc (+2/-2)
src/logic/map_objects/tribes/carrier.h (+1/-1)
src/logic/map_objects/tribes/constructionsite.cc (+2/-2)
src/logic/map_objects/tribes/constructionsite.h (+1/-1)
src/logic/map_objects/tribes/dismantlesite.cc (+2/-2)
src/logic/map_objects/tribes/dismantlesite.h (+1/-1)
src/logic/map_objects/tribes/market.cc (+4/-4)
src/logic/map_objects/tribes/market.h (+1/-1)
src/logic/map_objects/tribes/militarysite.cc (+3/-3)
src/logic/map_objects/tribes/militarysite.h (+1/-1)
src/logic/map_objects/tribes/production_program.cc (+9/-9)
src/logic/map_objects/tribes/production_program.h (+5/-3)
src/logic/map_objects/tribes/productionsite.cc (+20/-19)
src/logic/map_objects/tribes/productionsite.h (+3/-2)
src/logic/map_objects/tribes/ship.cc (+1/-1)
src/logic/map_objects/tribes/soldier.cc (+5/-5)
src/logic/map_objects/tribes/soldier.h (+1/-1)
src/logic/map_objects/tribes/trainingsite.cc (+2/-2)
src/logic/map_objects/tribes/trainingsite.h (+1/-1)
src/logic/map_objects/tribes/tribe_descr.cc (+0/-1)
src/logic/map_objects/tribes/tribe_descr.h (+1/-3)
src/logic/map_objects/tribes/tribes.cc (+22/-22)
src/logic/map_objects/tribes/tribes.h (+28/-28)
src/logic/map_objects/tribes/warehouse.cc (+4/-4)
src/logic/map_objects/tribes/warehouse.h (+1/-1)
src/logic/map_objects/tribes/worker.cc (+3/-3)
src/logic/map_objects/tribes/worker_descr.cc (+9/-10)
src/logic/map_objects/tribes/worker_descr.h (+4/-4)
src/logic/map_objects/tribes/worker_program.cc (+1/-1)
src/logic/map_objects/world/world.h (+1/-3)
src/logic/player.cc (+1/-1)
src/logic/player_area.h (+0/-1)
src/logic/widelands.h (+1/-1)
src/map_io/CMakeLists.txt (+5/-0)
src/map_io/map_elemental_packet.cc (+0/-1)
src/map_io/map_object_loader.h (+0/-1)
src/network/CMakeLists.txt (+1/-1)
src/network/gamehost.h (+0/-1)
src/network/network_player_settings_backend.h (+0/-1)
src/scripting/CMakeLists.txt (+3/-0)
src/scripting/lua_map.cc (+1/-1)
src/scripting/lua_root.cc (+12/-21)
src/ui_fsmenu/CMakeLists.txt (+2/-0)
src/website/CMakeLists.txt (+2/-0)
src/wui/CMakeLists.txt (+10/-3)
src/wui/building_statistics_menu.h (+0/-1)
src/wui/debugconsole.cc (+0/-1)
src/wui/gamedetails.h (+1/-0)
src/wui/interactive_gamebase.cc (+1/-1)
src/wui/multiplayersetupgroup.cc (+0/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/split_up_liblogic_2_mapobjectdescr
Reviewer Review Type Date Requested Status
GunChleoc Approve
Benedikt Straub code Approve
Review via email: mp+366332@code.launchpad.net

Commit message

Some small refactorings to the logic code structure
- Pull out some libraries from liblogic
- Remove EditorGameBase from MapObjectDescr constructors
- Delete the unused struct SoldierStrength in widelands.h
- Put DescriptionMaintainer in Widelands namespace

Description of the change

Some code cleanup to make the circular dependencies more visible for future refactoring. There will be 1 more branch in the series after this one.

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

Continuous integration builds have changed state:

Travis build 4743. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/522405720.
Appveyor build 4528. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_split_up_liblogic_2_mapobjectdescr-4528.

8502. By GunChleoc

Add draw_text.h to CMakeLists.txt.

8503. By GunChleoc

Merged trunk.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4807. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/524804629.
Appveyor build 4588. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_split_up_liblogic_2_mapobjectdescr-4588.

8504. By GunChleoc

Merged trunk.

8505. By GunChleoc

Fixed codecheck.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4885. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/528202612.
Appveyor build 4666. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_split_up_liblogic_2_mapobjectdescr-4666.

Revision history for this message
Benedikt Straub (nordfriese) wrote :

Code LGTM, not tested.

review: Approve (code)
Revision history for this message
GunChleoc (gunchleoc) wrote :

Retested Thanks for the review :)

@bunnybot merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CMakeLists.txt'
2--- src/CMakeLists.txt 2018-09-06 09:06:55 +0000
3+++ src/CMakeLists.txt 2019-05-04 15:38:00 +0000
4@@ -115,6 +115,7 @@
5 logic_filesystem_constants
6 logic_game_controller
7 logic_game_settings
8+ logic_map
9 logic_single_player_game_settings
10 map_io_map_loader
11 network
12
13=== modified file 'src/ai/CMakeLists.txt'
14--- src/ai/CMakeLists.txt 2017-02-28 12:59:39 +0000
15+++ src/ai/CMakeLists.txt 2019-05-04 15:38:00 +0000
16@@ -19,5 +19,8 @@
17 economy
18 logic
19 logic_constants
20+ logic_commands
21+ logic_map
22+ logic_map_objects
23 scripting_lua_table
24 )
25
26=== modified file 'src/ai/ai_help_structs.h'
27--- src/ai/ai_help_structs.h 2019-02-23 11:00:49 +0000
28+++ src/ai/ai_help_structs.h 2019-05-04 15:38:00 +0000
29@@ -28,7 +28,7 @@
30 #include "economy/flag.h"
31 #include "economy/road.h"
32 #include "logic/ai_dna_handler.h"
33-#include "logic/findnode.h"
34+#include "logic/map_objects/findnode.h"
35 #include "logic/game.h"
36 #include "logic/map.h"
37 #include "logic/map_objects/checkstep.h"
38
39=== modified file 'src/ai/defaultai.cc'
40--- src/ai/defaultai.cc 2019-04-10 16:39:31 +0000
41+++ src/ai/defaultai.cc 2019-05-04 15:38:00 +0000
42@@ -35,10 +35,10 @@
43 #include "economy/flag.h"
44 #include "economy/portdock.h"
45 #include "economy/road.h"
46-#include "logic/findbob.h"
47-#include "logic/findimmovable.h"
48-#include "logic/findnode.h"
49 #include "logic/map.h"
50+#include "logic/map_objects/findbob.h"
51+#include "logic/map_objects/findimmovable.h"
52+#include "logic/map_objects/findnode.h"
53 #include "logic/map_objects/tribes/constructionsite.h"
54 #include "logic/map_objects/tribes/militarysite.h"
55 #include "logic/map_objects/tribes/productionsite.h"
56
57=== modified file 'src/economy/CMakeLists.txt'
58--- src/economy/CMakeLists.txt 2017-11-20 13:50:51 +0000
59+++ src/economy/CMakeLists.txt 2019-05-04 15:38:00 +0000
60@@ -52,9 +52,13 @@
61 base_macros
62 io_fileread
63 logic
64+ logic_commands
65 logic_constants
66 logic_exceptions
67+ logic_map
68+ logic_map_objects
69 logic_widelands_geometry
70+ logic_widelands_geometry_io
71 map_io
72 notifications
73 )
74
75=== modified file 'src/economy/input_queue.h'
76--- src/economy/input_queue.h 2019-02-23 11:00:49 +0000
77+++ src/economy/input_queue.h 2019-05-04 15:38:00 +0000
78@@ -24,7 +24,6 @@
79
80 #include "logic/map_objects/immovable.h"
81 #include "logic/map_objects/tribes/wareworker.h"
82-#include "logic/widelands.h"
83
84 namespace Widelands {
85
86
87=== modified file 'src/economy/test/CMakeLists.txt'
88--- src/economy/test/CMakeLists.txt 2018-09-06 09:06:55 +0000
89+++ src/economy/test/CMakeLists.txt 2019-05-04 15:38:00 +0000
90@@ -9,5 +9,6 @@
91 economy
92 io_filesystem
93 logic
94+ logic_map_objects
95 logic_widelands_geometry
96 )
97
98=== modified file 'src/economy/ware_instance.h'
99--- src/economy/ware_instance.h 2019-02-23 11:00:49 +0000
100+++ src/economy/ware_instance.h 2019-05-04 15:38:00 +0000
101@@ -23,7 +23,6 @@
102 #include "economy/transfer.h"
103 #include "logic/map_objects/map_object.h"
104 #include "logic/map_objects/tribes/ware_descr.h"
105-#include "logic/widelands.h"
106 #include "map_io/tribes_legacy_lookup_table.h"
107
108 namespace Widelands {
109
110=== modified file 'src/economy/wares_queue.h'
111--- src/economy/wares_queue.h 2019-02-23 11:00:49 +0000
112+++ src/economy/wares_queue.h 2019-05-04 15:38:00 +0000
113@@ -22,7 +22,6 @@
114
115 #include "economy/input_queue.h"
116 #include "logic/map_objects/immovable.h"
117-#include "logic/widelands.h"
118
119 namespace Widelands {
120
121
122=== modified file 'src/economy/workers_queue.h'
123--- src/economy/workers_queue.h 2019-02-23 11:00:49 +0000
124+++ src/economy/workers_queue.h 2019-05-04 15:38:00 +0000
125@@ -22,7 +22,6 @@
126
127 #include "economy/input_queue.h"
128 #include "logic/map_objects/immovable.h"
129-#include "logic/widelands.h"
130
131 namespace Widelands {
132
133
134=== modified file 'src/editor/CMakeLists.txt'
135--- src/editor/CMakeLists.txt 2019-04-03 13:22:14 +0000
136+++ src/editor/CMakeLists.txt 2019-05-04 15:38:00 +0000
137@@ -104,6 +104,9 @@
138 logic_constants
139 logic_filesystem_constants
140 logic_generic_save_handler
141+ logic_map
142+ logic_map_objects
143+ logic_map_objects_description_maintainer
144 logic_tribe_basic_info
145 logic_widelands_geometry
146 map_io
147
148=== modified file 'src/editor/map_generator.cc'
149--- src/editor/map_generator.cc 2019-02-23 11:00:49 +0000
150+++ src/editor/map_generator.cc 2019-05-04 15:38:00 +0000
151@@ -26,8 +26,8 @@
152 #include "base/wexception.h"
153 #include "editor/tools/increase_resources_tool.h"
154 #include "logic/editor_game_base.h"
155-#include "logic/findnode.h"
156 #include "logic/map.h"
157+#include "logic/map_objects/findnode.h"
158 #include "logic/map_objects/tribes/tribe_basic_info.h"
159 #include "logic/map_objects/world/map_gen.h"
160 #include "logic/map_objects/world/world.h"
161
162=== modified file 'src/editor/tools/set_origin_tool.h'
163--- src/editor/tools/set_origin_tool.h 2019-02-23 11:00:49 +0000
164+++ src/editor/tools/set_origin_tool.h 2019-05-04 15:38:00 +0000
165@@ -21,7 +21,6 @@
166 #define WL_EDITOR_TOOLS_SET_ORIGIN_TOOL_H
167
168 #include "editor/tools/tool.h"
169-#include "logic/widelands.h"
170
171 /// Sets the starting position of players.
172 struct EditorSetOriginTool : public EditorTool {
173
174=== modified file 'src/editor/tools/set_port_space_tool.h'
175--- src/editor/tools/set_port_space_tool.h 2019-02-23 11:00:49 +0000
176+++ src/editor/tools/set_port_space_tool.h 2019-05-04 15:38:00 +0000
177@@ -21,7 +21,6 @@
178 #define WL_EDITOR_TOOLS_SET_PORT_SPACE_TOOL_H
179
180 #include "editor/tools/tool.h"
181-#include "logic/widelands.h"
182
183 #define FSEL_ESPS_FILENAME "images/wui/editor/fsel_editor_set_port_space.png"
184 #define FSEL_EUPS_FILENAME "images/wui/editor/fsel_editor_unset_port_space.png"
185
186=== modified file 'src/editor/tools/set_resources_tool.h'
187--- src/editor/tools/set_resources_tool.h 2019-02-23 11:00:49 +0000
188+++ src/editor/tools/set_resources_tool.h 2019-05-04 15:38:00 +0000
189@@ -22,7 +22,6 @@
190
191 #include "editor/tools/tool.h"
192 #include "logic/mapregion.h"
193-#include "logic/widelands.h"
194
195 Widelands::NodeCaps resource_tools_nodecaps(const Widelands::FCoords& fcoords,
196 const Widelands::EditorGameBase& egbase,
197
198=== modified file 'src/editor/tools/set_starting_pos_tool.h'
199--- src/editor/tools/set_starting_pos_tool.h 2019-02-23 11:00:49 +0000
200+++ src/editor/tools/set_starting_pos_tool.h 2019-05-04 15:38:00 +0000
201@@ -24,7 +24,6 @@
202
203 #include "editor/tools/tool.h"
204 #include "graphic/playercolor.h"
205-#include "logic/widelands.h"
206
207 // How much place should be left around a player position
208 // where no other player can start
209
210=== modified file 'src/editor/ui_menus/categorized_item_selection_menu.h'
211--- src/editor/ui_menus/categorized_item_selection_menu.h 2019-02-23 11:00:49 +0000
212+++ src/editor/ui_menus/categorized_item_selection_menu.h 2019-05-04 15:38:00 +0000
213@@ -28,7 +28,7 @@
214
215 #include "base/i18n.h"
216 #include "graphic/image.h"
217-#include "logic/description_maintainer.h"
218+#include "logic/map_objects/description_maintainer.h"
219 #include "logic/map_objects/world/editor_category.h"
220 #include "ui_basic/box.h"
221 #include "ui_basic/checkbox.h"
222@@ -47,8 +47,8 @@
223 // not take ownership.
224 CategorizedItemSelectionMenu(
225 UI::Panel* parent,
226- const DescriptionMaintainer<Widelands::EditorCategory>& categories,
227- const DescriptionMaintainer<DescriptionType>& descriptions,
228+ const Widelands::DescriptionMaintainer<Widelands::EditorCategory>& categories,
229+ const Widelands::DescriptionMaintainer<DescriptionType>& descriptions,
230 std::function<UI::Checkbox*(UI::Panel* parent, const DescriptionType& descr)> create_checkbox,
231 const std::function<void()> select_correct_tool,
232 ToolType* const tool);
233@@ -60,7 +60,7 @@
234 // Update the label with the currently selected object names.
235 void update_label();
236
237- const DescriptionMaintainer<DescriptionType>& descriptions_;
238+ const Widelands::DescriptionMaintainer<DescriptionType>& descriptions_;
239 std::function<void()> select_correct_tool_;
240 bool protect_against_recursive_select_;
241 UI::TabPanel tab_panel_;
242@@ -72,8 +72,8 @@
243 template <typename DescriptionType, typename ToolType>
244 CategorizedItemSelectionMenu<DescriptionType, ToolType>::CategorizedItemSelectionMenu(
245 UI::Panel* parent,
246- const DescriptionMaintainer<Widelands::EditorCategory>& categories,
247- const DescriptionMaintainer<DescriptionType>& descriptions,
248+ const Widelands::DescriptionMaintainer<Widelands::EditorCategory>& categories,
249+ const Widelands::DescriptionMaintainer<DescriptionType>& descriptions,
250 const std::function<UI::Checkbox*(UI::Panel* parent, const DescriptionType& descr)>
251 create_checkbox,
252 const std::function<void()> select_correct_tool,
253
254=== modified file 'src/editor/ui_menus/main_menu_new_map.cc'
255--- src/editor/ui_menus/main_menu_new_map.cc 2019-04-24 07:09:29 +0000
256+++ src/editor/ui_menus/main_menu_new_map.cc 2019-05-04 15:38:00 +0000
257@@ -154,7 +154,7 @@
258 */
259 void MainMenuNewMap::fill_list() {
260 list_.clear();
261- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains =
262+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains =
263 eia().egbase().world().terrains();
264
265 for (Widelands::DescriptionIndex index = 0; index < terrains.size(); ++index) {
266
267=== modified file 'src/editor/ui_menus/main_menu_new_map.h'
268--- src/editor/ui_menus/main_menu_new_map.h 2019-04-10 10:42:22 +0000
269+++ src/editor/ui_menus/main_menu_new_map.h 2019-05-04 15:38:00 +0000
270@@ -20,7 +20,7 @@
271 #ifndef WL_EDITOR_UI_MENUS_MAIN_MENU_NEW_MAP_H
272 #define WL_EDITOR_UI_MENUS_MAIN_MENU_NEW_MAP_H
273
274-#include "logic/description_maintainer.h"
275+#include "logic/widelands.h"
276 #include "ui_basic/box.h"
277 #include "ui_basic/button.h"
278 #include "ui_basic/dropdown.h"
279
280=== modified file 'src/editor/ui_menus/tool_change_resources_options_menu.cc'
281--- src/editor/ui_menus/tool_change_resources_options_menu.cc 2019-02-23 11:00:49 +0000
282+++ src/editor/ui_menus/tool_change_resources_options_menu.cc 2019-05-04 15:38:00 +0000
283@@ -33,7 +33,6 @@
284 #include "logic/map.h"
285 #include "logic/map_objects/world/resource_description.h"
286 #include "logic/map_objects/world/world.h"
287-#include "logic/widelands.h"
288 #include "logic/widelands_geometry.h"
289
290 constexpr int kMaxValue = 63;
291
292=== modified file 'src/game_io/CMakeLists.txt'
293--- src/game_io/CMakeLists.txt 2018-02-13 10:14:35 +0000
294+++ src/game_io/CMakeLists.txt 2019-05-04 15:38:00 +0000
295@@ -34,8 +34,12 @@
296 io_fileread
297 io_filesystem
298 logic
299+ logic_commands
300 logic_exceptions
301 logic_game_controller
302+ logic_map
303+ logic_map_objects
304+ logic_widelands_geometry_io
305 map_io
306 map_io_map_loader
307 profile
308
309=== modified file 'src/graphic/CMakeLists.txt'
310--- src/graphic/CMakeLists.txt 2019-04-25 06:31:33 +0000
311+++ src/graphic/CMakeLists.txt 2019-05-04 15:38:00 +0000
312@@ -176,7 +176,8 @@
313 graphic_draw_programs
314 graphic_fields_to_draw
315 graphic_terrain_programs
316- logic
317+ logic_map_objects
318+ logic_map_objects_description_maintainer
319 )
320
321 wl_library(graphic_game_renderer
322@@ -192,6 +193,7 @@
323 graphic_render_queue
324 graphic_surface
325 logic
326+ logic_map_objects
327 wui
328 wui_mapview_pixelfunctions
329 )
330@@ -206,6 +208,8 @@
331 economy
332 graphic_surface
333 logic
334+ logic_map
335+ logic_map_objects
336 wui_mapview_pixelfunctions
337 )
338
339@@ -218,7 +222,7 @@
340 graphic
341 graphic_gl_utils
342 logic
343- logic_constants
344+ logic_map_objects
345 logic_widelands_geometry
346 wui_mapview_pixelfunctions
347 )
348@@ -246,6 +250,9 @@
349 graphic_surface
350 io_filesystem
351 logic
352+ logic_constants
353+ logic_map_objects
354+ logic_map_objects_description_maintainer
355 )
356
357
358
359=== modified file 'src/graphic/gl/dither_program.cc'
360--- src/graphic/gl/dither_program.cc 2019-02-23 11:00:49 +0000
361+++ src/graphic/gl/dither_program.cc 2019-05-04 15:38:00 +0000
362@@ -86,7 +86,7 @@
363
364 void DitherProgram::maybe_add_dithering_triangle(
365 const uint32_t gametime,
366- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
367+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
368 const FieldsToDraw& fields_to_draw,
369 const int idx1,
370 const int idx2,
371@@ -140,7 +140,7 @@
372 }
373
374 void DitherProgram::draw(const uint32_t gametime,
375- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
376+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
377 const FieldsToDraw& fields_to_draw,
378 const float z_value) {
379 // This method expects that all terrains have the same dimensions and that
380
381=== modified file 'src/graphic/gl/dither_program.h'
382--- src/graphic/gl/dither_program.h 2019-02-23 11:00:49 +0000
383+++ src/graphic/gl/dither_program.h 2019-05-04 15:38:00 +0000
384@@ -25,7 +25,7 @@
385 #include "base/vector.h"
386 #include "graphic/gl/fields_to_draw.h"
387 #include "graphic/gl/utils.h"
388-#include "logic/description_maintainer.h"
389+#include "logic/map_objects/description_maintainer.h"
390 #include "logic/map_objects/world/terrain_description.h"
391
392 class Texture;
393@@ -37,7 +37,7 @@
394
395 // Draws the terrain.
396 void draw(uint32_t gametime,
397- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
398+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
399 const FieldsToDraw& fields_to_draw,
400 float z_value);
401
402@@ -53,7 +53,7 @@
403 // agree.
404 void maybe_add_dithering_triangle(
405 uint32_t gametime,
406- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
407+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
408 const FieldsToDraw& fields_to_draw,
409 int idx1,
410 int idx2,
411
412=== modified file 'src/graphic/gl/fields_to_draw.h'
413--- src/graphic/gl/fields_to_draw.h 2019-02-23 11:00:49 +0000
414+++ src/graphic/gl/fields_to_draw.h 2019-05-04 15:38:00 +0000
415@@ -30,7 +30,6 @@
416 #include "base/vector.h"
417 #include "graphic/rendertarget.h"
418 #include "logic/editor_game_base.h"
419-#include "logic/widelands.h"
420 #include "logic/widelands_geometry.h"
421
422 // Helper struct that contains the data needed for drawing all fields.
423@@ -61,7 +60,7 @@
424 Widelands::Vision vision;
425 Widelands::Player* owner; // can be nullptr.
426
427- // Index of neighbors in this 'FieldsToDraw'. kInvalidIndex if this
428+ // Index of neighbors in this 'FieldsToDraw'. INVALID_INDEX if this
429 // neighbor is not contained.
430 int ln_index;
431 int rn_index;
432@@ -99,7 +98,7 @@
433
434 private:
435 // Calculates the index of the given field with ('fx', 'fy') being geometric
436- // coordinates in the map. Returns kInvalidIndex if this field is not in the
437+ // coordinates in the map. Returns INVALID_INDEX if this field is not in the
438 // fields_to_draw.
439 inline int calculate_index(int fx, int fy) const {
440 uint16_t xidx = fx - min_fx_;
441
442=== modified file 'src/graphic/gl/grid_program.h'
443--- src/graphic/gl/grid_program.h 2019-04-25 21:48:17 +0000
444+++ src/graphic/gl/grid_program.h 2019-05-04 15:38:00 +0000
445@@ -25,7 +25,7 @@
446 #include "base/vector.h"
447 #include "graphic/gl/fields_to_draw.h"
448 #include "graphic/gl/utils.h"
449-#include "logic/description_maintainer.h"
450+#include "logic/map_objects/description_maintainer.h"
451 #include "logic/map_objects/world/terrain_description.h"
452
453 class GridProgram {
454
455=== modified file 'src/graphic/gl/terrain_program.cc'
456--- src/graphic/gl/terrain_program.cc 2019-02-23 11:00:49 +0000
457+++ src/graphic/gl/terrain_program.cc 2019-05-04 15:38:00 +0000
458@@ -84,7 +84,7 @@
459 }
460
461 void TerrainProgram::draw(uint32_t gametime,
462- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
463+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
464 const FieldsToDraw& fields_to_draw,
465 float z_value) {
466 // This method expects that all terrains have the same dimensions and that
467
468=== modified file 'src/graphic/gl/terrain_program.h'
469--- src/graphic/gl/terrain_program.h 2019-02-23 11:00:49 +0000
470+++ src/graphic/gl/terrain_program.h 2019-05-04 15:38:00 +0000
471@@ -25,7 +25,7 @@
472 #include "base/vector.h"
473 #include "graphic/gl/fields_to_draw.h"
474 #include "graphic/gl/utils.h"
475-#include "logic/description_maintainer.h"
476+#include "logic/map_objects/description_maintainer.h"
477 #include "logic/map_objects/world/terrain_description.h"
478
479 class TerrainProgram {
480@@ -35,7 +35,7 @@
481
482 // Draws the terrain.
483 void draw(uint32_t gametime,
484- const DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
485+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>& terrains,
486 const FieldsToDraw& fields_to_draw,
487 float z_value);
488
489
490=== modified file 'src/graphic/gl/workarea_program.h'
491--- src/graphic/gl/workarea_program.h 2019-04-25 00:03:42 +0000
492+++ src/graphic/gl/workarea_program.h 2019-05-04 15:38:00 +0000
493@@ -25,7 +25,7 @@
494 #include "base/vector.h"
495 #include "graphic/gl/fields_to_draw.h"
496 #include "graphic/gl/utils.h"
497-#include "logic/description_maintainer.h"
498+#include "logic/map_objects/description_maintainer.h"
499 #include "logic/map_objects/world/terrain_description.h"
500
501 class WorkareaProgram {
502
503=== modified file 'src/graphic/render_queue.h'
504--- src/graphic/render_queue.h 2019-03-13 12:53:34 +0000
505+++ src/graphic/render_queue.h 2019-05-04 15:38:00 +0000
506@@ -32,7 +32,7 @@
507 #include "graphic/color.h"
508 #include "graphic/gl/draw_line_program.h"
509 #include "graphic/gl/fields_to_draw.h"
510-#include "logic/description_maintainer.h"
511+#include "logic/map_objects/description_maintainer.h"
512 #include "logic/map_objects/world/terrain_description.h"
513
514 class DitherProgram;
515@@ -121,7 +121,7 @@
516 int gametime = 0;
517 int renderbuffer_width = 0;
518 int renderbuffer_height = 0;
519- const DescriptionMaintainer<Widelands::TerrainDescription>* terrains = nullptr;
520+ const Widelands::DescriptionMaintainer<Widelands::TerrainDescription>* terrains = nullptr;
521 const FieldsToDraw* fields_to_draw = nullptr;
522 Workareas workareas;
523 float scale = 1.f;
524
525=== modified file 'src/logic/CMakeLists.txt'
526--- src/logic/CMakeLists.txt 2019-04-24 06:01:37 +0000
527+++ src/logic/CMakeLists.txt 2019-05-04 15:38:00 +0000
528@@ -13,6 +13,17 @@
529 widelands_geometry.h
530 )
531
532+wl_library(logic_widelands_geometry_io
533+ SRCS
534+ widelands_geometry_io.cc
535+ widelands_geometry_io.h
536+ DEPENDS
537+ io_fileread
538+ io_stream
539+ logic_constants
540+ logic_widelands_geometry
541+)
542+
543 wl_library(logic_game_settings
544 SRCS
545 game_settings.cc
546@@ -49,7 +60,7 @@
547 DEPENDS
548 ai
549 logic
550- logic_constants
551+ logic_commands
552 logic_game_settings
553 profile
554 ui_basic
555@@ -58,6 +69,7 @@
556
557 wl_library(logic_constants
558 SRCS
559+ roadtype.h
560 widelands.cc
561 widelands.h
562 DEPENDS
563@@ -70,18 +82,6 @@
564 filesystem_constants.cc
565 )
566
567-wl_library(logic_tribe_basic_info
568- SRCS
569- map_objects/tribes/tribe_basic_info.cc
570- map_objects/tribes/tribe_basic_info.h
571- DEPENDS
572- base_i18n
573- logic_exceptions
574- scripting_lua_table
575- scripting_lua_interface
576-
577-)
578-
579 wl_library(logic_generic_save_handler
580 SRCS
581 generic_save_handler.h
582@@ -94,38 +94,11 @@
583 logic_filesystem_constants
584 )
585
586-wl_library(logic
587+wl_library(logic_map
588 SRCS
589- ai_dna_handler.cc
590- ai_dna_handler.h
591- backtrace.cc
592- backtrace.h
593- cmd_calculate_statistics.cc
594- cmd_calculate_statistics.h
595- cmd_delete_message.cc
596- cmd_delete_message.h
597- cmd_incorporate.cc
598- cmd_incorporate.h
599- cmd_luacoroutine.cc
600- cmd_luacoroutine.h
601- cmd_luascript.cc
602- cmd_luascript.h
603- cmd_queue.cc
604- cmd_queue.h
605 cookie_priority_queue.h
606- description_maintainer.h
607- editor_game_base.cc
608- editor_game_base.h
609 field.cc
610 field.h
611- findbob.cc
612- findbob.h
613- findimmovable.cc
614- findimmovable.h
615- findnode.cc
616- findnode.h
617- game.cc
618- game.h
619 map.cc
620 map.h
621 map_revision.cc
622@@ -141,126 +114,106 @@
623 mapregion.h
624 maptriangleregion.cc
625 maptriangleregion.h
626- message.h
627- message_id.h
628- message_queue.h
629 nodecaps.h
630- objective.h
631 path.cc
632 path.h
633 pathfield.cc
634 pathfield.h
635+ DEPENDS
636+ base_exceptions
637+ base_i18n
638+ base_log
639+ base_macros
640+ base_scoped_timer
641+ build_info
642+ economy
643+ graphic_playercolor
644+ io_fileread
645+ io_filesystem
646+ logic # TODO(GunChleoc): Circular
647+ logic_constants
648+ logic_exceptions
649+ logic_filesystem_constants
650+ logic_map_objects
651+ logic_tribe_basic_info
652+ logic_widelands_geometry
653+ logic_widelands_geometry_io
654+ map_io_map_loader
655+ notifications
656+ random
657+ wui_mapview_pixelfunctions # TODO(GunChleoc): Circular dependency
658+)
659+
660+wl_library(logic_commands
661+ SRCS
662+ cmd_calculate_statistics.cc
663+ cmd_calculate_statistics.h
664+ cmd_delete_message.cc
665+ cmd_delete_message.h
666+ cmd_incorporate.cc
667+ cmd_incorporate.h
668+ cmd_luacoroutine.cc
669+ cmd_luacoroutine.h
670+ cmd_luascript.cc
671+ cmd_luascript.h
672+ cmd_queue.cc
673+ cmd_queue.h
674+ queue_cmd_factory.cc
675+ queue_cmd_factory.h
676+ queue_cmd_ids.h
677+ playercommand.cc
678+ playercommand.h
679+ DEPENDS
680+ base_exceptions
681+ base_i18n
682+ base_log
683+ base_macros
684+ economy # TODO(GunChleoc): Circular dependency
685+ graphic_text_layout
686+ io_fileread
687+ io_stream
688+ logic # TODO(GunChleoc): Circular dependency
689+ logic_exceptions
690+ logic_game_controller
691+ logic_map
692+ logic_map_objects
693+ logic_widelands_geometry_io
694+ map_io
695+ scripting_coroutine
696+ scripting_logic # TODO(GunChleoc): Circular dependency
697+ scripting_lua_table
698+)
699+
700+wl_library(logic
701+ SRCS
702+ ai_dna_handler.cc
703+ ai_dna_handler.h
704+ editor_game_base.cc
705+ editor_game_base.h
706+ game.cc
707+ game.h
708+ message.h
709+ message_id.h
710+ message_queue.h
711+ objective.h
712 player.cc
713 player.h
714 player_area.h
715- playercommand.cc
716- playercommand.h
717 playersmanager.cc
718 playersmanager.h
719- queue_cmd_factory.cc
720- queue_cmd_factory.h
721- queue_cmd_ids.h
722 replay.cc
723 replay.h
724- roadtype.h
725 save_handler.cc
726 save_handler.h
727 see_unsee_node.h
728 trade_agreement.h
729- widelands_geometry_io.cc
730- widelands_geometry_io.h
731- map_objects/bob.cc
732- map_objects/bob.h
733- map_objects/buildcost.cc
734- map_objects/buildcost.h
735- map_objects/checkstep.cc
736- map_objects/checkstep.h
737- map_objects/draw_text.h
738- map_objects/immovable.cc
739- map_objects/immovable.h
740- map_objects/immovable_program.h
741- map_objects/map_object.cc
742- map_objects/map_object.h
743- map_objects/terrain_affinity.cc
744- map_objects/terrain_affinity.h
745- map_objects/tribes/attack_target.h
746- map_objects/tribes/battle.cc
747- map_objects/tribes/battle.h
748- map_objects/tribes/bill_of_materials.h
749- map_objects/tribes/building.cc
750- map_objects/tribes/building.h
751- map_objects/tribes/carrier.cc
752- map_objects/tribes/carrier.h
753- map_objects/tribes/constructionsite.cc
754- map_objects/tribes/constructionsite.h
755- map_objects/tribes/dismantlesite.cc
756- map_objects/tribes/dismantlesite.h
757- map_objects/tribes/market.cc
758- map_objects/tribes/market.h
759- map_objects/tribes/militarysite.cc
760- map_objects/tribes/militarysite.h
761- map_objects/tribes/partially_finished_building.cc
762- map_objects/tribes/partially_finished_building.h
763- map_objects/tribes/production_program.cc
764- map_objects/tribes/production_program.h
765- map_objects/tribes/productionsite.cc
766- map_objects/tribes/productionsite.h
767- map_objects/tribes/program_result.h
768- map_objects/tribes/requirements.cc
769- map_objects/tribes/requirements.h
770- map_objects/tribes/road_textures.cc
771- map_objects/tribes/road_textures.h
772- map_objects/tribes/ship.cc
773- map_objects/tribes/ship.h
774- map_objects/tribes/soldier.cc
775- map_objects/tribes/soldier.h
776- map_objects/tribes/soldiercontrol.h
777- map_objects/tribes/training_attribute.h
778- map_objects/tribes/trainingsite.cc
779- map_objects/tribes/trainingsite.h
780- map_objects/tribes/tribe_descr.cc
781- map_objects/tribes/tribe_descr.h
782- map_objects/tribes/tribes.cc
783- map_objects/tribes/tribes.h
784- map_objects/tribes/ware_descr.cc
785- map_objects/tribes/ware_descr.h
786- map_objects/tribes/warehouse.cc
787- map_objects/tribes/warehouse.h
788- map_objects/tribes/warelist.cc
789- map_objects/tribes/warelist.h
790- map_objects/tribes/wareworker.h
791- map_objects/tribes/workarea_info.h
792- map_objects/tribes/worker.cc
793- map_objects/tribes/worker.h
794- map_objects/tribes/worker_descr.cc
795- map_objects/tribes/worker_descr.h
796- map_objects/tribes/worker_program.cc
797- map_objects/tribes/worker_program.h
798- map_objects/walkingdir.cc
799- map_objects/walkingdir.h
800- map_objects/world/critter.cc
801- map_objects/world/critter.h
802- map_objects/world/critter_program.h
803- map_objects/world/editor_category.cc
804- map_objects/world/editor_category.h
805- map_objects/world/map_gen.cc
806- map_objects/world/map_gen.h
807- map_objects/world/resource_description.cc
808- map_objects/world/resource_description.h
809- map_objects/world/terrain_description.cc
810- map_objects/world/terrain_description.h
811- map_objects/world/world.cc
812- map_objects/world/world.h
813 # TODO(sirver): Uses SDL2 only on WIN32 for a dirty hack.
814 USES_SDL2
815 DEPENDS
816- ai
817 base_exceptions
818- base_geometry
819 base_i18n
820 base_log
821 base_macros
822- base_math
823 base_md5
824 base_scoped_timer
825 base_time_string
826@@ -269,38 +222,35 @@
827 game_io
828 graphic
829 graphic_color
830- graphic_fonthandler
831- graphic_image_io
832 graphic_playercolor
833- graphic_surface
834- graphic_text_constants
835- graphic_text_layout
836- helper
837 io_fileread
838 io_filesystem
839 io_stream
840+ logic_commands
841 logic_constants
842 logic_exceptions
843 logic_filesystem_constants
844 logic_game_controller
845 logic_game_settings
846 logic_generic_save_handler
847+ logic_map
848+ logic_map_objects
849 logic_tribe_basic_info
850 logic_widelands_geometry
851 map_io
852 map_io_map_loader
853- network
854+ network # TODO(GunChleoc): Circular dependency
855 note_sound
856 notifications
857 profile
858 random
859- scripting_coroutine
860- scripting_logic
861+ scripting_logic # TODO(GunChleoc): Circular dependency
862 scripting_lua_interface
863 scripting_lua_table
864 sound
865 sound_constants
866 ui_basic
867- wui
868- wui_mapview_pixelfunctions
869+ wui # TODO(GunChleoc): Circular dependency
870 )
871+
872+add_subdirectory(map_objects)
873
874=== modified file 'src/logic/editor_game_base.cc'
875--- src/logic/editor_game_base.cc 2019-03-26 02:56:03 +0000
876+++ src/logic/editor_game_base.cc 2019-05-04 15:38:00 +0000
877@@ -32,9 +32,9 @@
878 #include "economy/road.h"
879 #include "graphic/color.h"
880 #include "logic/filesystem_constants.h"
881-#include "logic/findimmovable.h"
882 #include "logic/game.h"
883 #include "logic/game_data_error.h"
884+#include "logic/map_objects/findimmovable.h"
885 #include "logic/map_objects/map_object.h"
886 #include "logic/map_objects/tribes/battle.h"
887 #include "logic/map_objects/tribes/building.h"
888
889=== modified file 'src/logic/game_controller.h'
890--- src/logic/game_controller.h 2019-02-23 11:00:49 +0000
891+++ src/logic/game_controller.h 2019-05-04 15:38:00 +0000
892@@ -23,7 +23,6 @@
893 #include <string>
894
895 #include "logic/player_end_result.h"
896-#include "logic/widelands.h"
897
898 namespace Widelands {
899 class Game;
900
901=== modified file 'src/logic/map.cc'
902--- src/logic/map.cc 2019-04-26 05:33:44 +0000
903+++ src/logic/map.cc 2019-05-04 15:38:00 +0000
904@@ -36,9 +36,9 @@
905 #include "io/filesystem/filesystem_exceptions.h"
906 #include "io/filesystem/layered_filesystem.h"
907 #include "logic/filesystem_constants.h"
908-#include "logic/findimmovable.h"
909-#include "logic/findnode.h"
910 #include "logic/map_objects/checkstep.h"
911+#include "logic/map_objects/findimmovable.h"
912+#include "logic/map_objects/findnode.h"
913 #include "logic/map_objects/tribes/soldier.h"
914 #include "logic/map_objects/tribes/tribe_basic_info.h"
915 #include "logic/map_objects/world/terrain_description.h"
916
917=== modified file 'src/logic/map.h'
918--- src/logic/map.h 2019-04-24 07:09:29 +0000
919+++ src/logic/map.h 2019-05-04 15:38:00 +0000
920@@ -29,9 +29,8 @@
921
922 #include "base/i18n.h"
923 #include "economy/itransport_cost_calculator.h"
924-#include "logic/description_maintainer.h"
925 #include "logic/field.h"
926-#include "logic/findimmovable.h"
927+#include "logic/map_objects/findimmovable.h"
928 #include "logic/map_objects/walkingdir.h"
929 #include "logic/map_revision.h"
930 #include "logic/objective.h"
931
932=== added file 'src/logic/map_objects/CMakeLists.txt'
933--- src/logic/map_objects/CMakeLists.txt 1970-01-01 00:00:00 +0000
934+++ src/logic/map_objects/CMakeLists.txt 2019-05-04 15:38:00 +0000
935@@ -0,0 +1,152 @@
936+wl_library(logic_map_objects_description_maintainer
937+ SRCS
938+ description_maintainer.cc
939+ description_maintainer.h
940+ DEPENDS
941+ base_exceptions
942+ logic_constants
943+)
944+
945+wl_library(logic_tribe_basic_info
946+ SRCS
947+ tribes/tribe_basic_info.cc
948+ tribes/tribe_basic_info.h
949+ DEPENDS
950+ base_i18n
951+ logic_exceptions
952+ scripting_lua_table
953+ scripting_lua_interface
954+
955+)
956+
957+wl_library(logic_map_objects
958+ SRCS
959+ backtrace.cc
960+ backtrace.h
961+ bob.cc
962+ bob.h
963+ buildcost.cc
964+ buildcost.h
965+ checkstep.cc
966+ checkstep.h
967+ draw_text.h
968+ findbob.cc
969+ findbob.h
970+ findimmovable.cc
971+ findimmovable.h
972+ findnode.cc
973+ findnode.h
974+ immovable.cc
975+ immovable.h
976+ immovable_program.h
977+ map_object.cc
978+ map_object.h
979+ terrain_affinity.cc
980+ terrain_affinity.h
981+ tribes/attack_target.h
982+ tribes/battle.cc
983+ tribes/battle.h
984+ tribes/bill_of_materials.h
985+ tribes/building.cc
986+ tribes/building.h
987+ tribes/carrier.cc
988+ tribes/carrier.h
989+ tribes/constructionsite.cc
990+ tribes/constructionsite.h
991+ tribes/dismantlesite.cc
992+ tribes/dismantlesite.h
993+ tribes/market.cc
994+ tribes/market.h
995+ tribes/militarysite.cc
996+ tribes/militarysite.h
997+ tribes/partially_finished_building.cc
998+ tribes/partially_finished_building.h
999+ tribes/production_program.cc
1000+ tribes/production_program.h
1001+ tribes/productionsite.cc
1002+ tribes/productionsite.h
1003+ tribes/program_result.h
1004+ tribes/requirements.cc
1005+ tribes/requirements.h
1006+ tribes/road_textures.cc
1007+ tribes/road_textures.h
1008+ tribes/ship.cc
1009+ tribes/ship.h
1010+ tribes/soldier.cc
1011+ tribes/soldier.h
1012+ tribes/soldiercontrol.h
1013+ tribes/training_attribute.h
1014+ tribes/trainingsite.cc
1015+ tribes/trainingsite.h
1016+ tribes/tribe_descr.cc
1017+ tribes/tribe_descr.h
1018+ tribes/tribes.cc
1019+ tribes/tribes.h
1020+ tribes/ware_descr.cc
1021+ tribes/ware_descr.h
1022+ tribes/warehouse.cc
1023+ tribes/warehouse.h
1024+ tribes/warelist.cc
1025+ tribes/warelist.h
1026+ tribes/wareworker.h
1027+ tribes/workarea_info.h
1028+ tribes/worker.cc
1029+ tribes/worker.h
1030+ tribes/worker_descr.cc
1031+ tribes/worker_descr.h
1032+ tribes/worker_program.cc
1033+ tribes/worker_program.h
1034+ walkingdir.cc
1035+ walkingdir.h
1036+ world/critter.cc
1037+ world/critter.h
1038+ world/critter_program.h
1039+ world/editor_category.cc
1040+ world/editor_category.h
1041+ world/map_gen.cc
1042+ world/map_gen.h
1043+ world/resource_description.cc
1044+ world/resource_description.h
1045+ world/terrain_description.cc
1046+ world/terrain_description.h
1047+ world/world.cc
1048+ world/world.h
1049+ DEPENDS
1050+ ai
1051+ base_exceptions
1052+ base_geometry
1053+ base_i18n
1054+ base_log
1055+ base_macros
1056+ base_math
1057+ economy
1058+ graphic
1059+ graphic_color
1060+ graphic_fonthandler
1061+ graphic_image_io
1062+ graphic_surface
1063+ graphic_text_constants
1064+ graphic_text_layout
1065+ helper
1066+ io_fileread
1067+ io_filesystem
1068+ logic # TODO(GunChleoc): Circular dependency
1069+ logic_commands # TODO(GunChleoc): Circular dependency
1070+ logic_constants
1071+ logic_exceptions
1072+ logic_game_controller
1073+ logic_map # TODO(GunChleoc): Circular dependency
1074+ logic_map_objects_description_maintainer
1075+ logic_tribe_basic_info
1076+ logic_widelands_geometry
1077+ logic_widelands_geometry_io
1078+ map_io
1079+ note_sound
1080+ notifications
1081+ scripting_lua_interface
1082+ scripting_lua_table
1083+ sound_constants
1084+ sound
1085+ ui_basic
1086+ wui_mapview_pixelfunctions
1087+)
1088
1089=== renamed file 'src/logic/backtrace.cc' => 'src/logic/map_objects/backtrace.cc'
1090--- src/logic/backtrace.cc 2019-02-23 11:00:49 +0000
1091+++ src/logic/map_objects/backtrace.cc 2019-05-04 15:38:00 +0000
1092@@ -17,7 +17,7 @@
1093 *
1094 */
1095
1096-#include "logic/backtrace.h"
1097+#include "logic/map_objects/backtrace.h"
1098
1099 #ifndef _WIN32
1100 #ifndef __APPLE__
1101
1102=== renamed file 'src/logic/backtrace.h' => 'src/logic/map_objects/backtrace.h'
1103--- src/logic/backtrace.h 2019-02-23 11:00:49 +0000
1104+++ src/logic/map_objects/backtrace.h 2019-05-04 15:38:00 +0000
1105@@ -17,11 +17,11 @@
1106 *
1107 */
1108
1109-#ifndef WL_LOGIC_BACKTRACE_H
1110-#define WL_LOGIC_BACKTRACE_H
1111+#ifndef WL_LOGIC_MAP_OBJECTS_BACKTRACE_H
1112+#define WL_LOGIC_MAP_OBJECTS_BACKTRACE_H
1113
1114 #include <string>
1115
1116 std::string get_backtrace();
1117
1118-#endif // end of include guard: WL_LOGIC_BACKTRACE_H
1119+#endif // end of include guard: WL_LOGIC_MAP_OBJECTS_BACKTRACE_H
1120
1121=== modified file 'src/logic/map_objects/bob.cc'
1122--- src/logic/map_objects/bob.cc 2019-04-24 06:01:37 +0000
1123+++ src/logic/map_objects/bob.cc 2019-05-04 15:38:00 +0000
1124@@ -32,11 +32,11 @@
1125 #include "graphic/rendertarget.h"
1126 #include "io/fileread.h"
1127 #include "io/filewrite.h"
1128-#include "logic/backtrace.h"
1129-#include "logic/findbob.h"
1130 #include "logic/game.h"
1131 #include "logic/game_data_error.h"
1132+#include "logic/map_objects/backtrace.h"
1133 #include "logic/map_objects/checkstep.h"
1134+#include "logic/map_objects/findbob.h"
1135 #include "logic/map_objects/tribes/ship.h"
1136 #include "logic/map_objects/tribes/soldier.h"
1137 #include "logic/map_objects/tribes/tribe_descr.h"
1138
1139=== added file 'src/logic/map_objects/description_maintainer.cc'
1140--- src/logic/map_objects/description_maintainer.cc 1970-01-01 00:00:00 +0000
1141+++ src/logic/map_objects/description_maintainer.cc 2019-05-04 15:38:00 +0000
1142@@ -0,0 +1,1 @@
1143+// Dummy to make CMake happy
1144
1145=== renamed file 'src/logic/description_maintainer.h' => 'src/logic/map_objects/description_maintainer.h'
1146--- src/logic/description_maintainer.h 2019-02-23 11:00:49 +0000
1147+++ src/logic/map_objects/description_maintainer.h 2019-05-04 15:38:00 +0000
1148@@ -17,8 +17,8 @@
1149 *
1150 */
1151
1152-#ifndef WL_LOGIC_DESCRIPTION_MAINTAINER_H
1153-#define WL_LOGIC_DESCRIPTION_MAINTAINER_H
1154+#ifndef WL_LOGIC_MAP_OBJECTS_DESCRIPTION_MAINTAINER_H
1155+#define WL_LOGIC_MAP_OBJECTS_DESCRIPTION_MAINTAINER_H
1156
1157 #include <cassert>
1158 #include <map>
1159@@ -29,7 +29,9 @@
1160 #include "base/wexception.h"
1161 #include "logic/widelands.h"
1162
1163-// Used to have a typesafe maintainer for description classes.
1164+namespace Widelands {
1165+
1166+// Used for having a typesafe maintainer for description classes.
1167 template <typename T> struct DescriptionMaintainer {
1168 // Adds the 'entry', will assert() if it is already registered. Returns the
1169 // index of the entry. Ownership is taken.
1170@@ -77,7 +79,7 @@
1171 throw wexception("Tried to add %s twice.", item->name().c_str());
1172 }
1173 int32_t index = items_.size();
1174- assert(index < (Widelands::INVALID_INDEX - 2)); // allowing for kInvalidIndex
1175+ assert(index < (Widelands::INVALID_INDEX - 2)); // allowing for INVALID_INDEX
1176 items_.emplace_back(item);
1177 name_to_index_[item->name()] = index;
1178 return index;
1179@@ -90,4 +92,6 @@
1180 return items_[index].get();
1181 }
1182
1183-#endif // end of include guard: WL_LOGIC_DESCRIPTION_MAINTAINER_H
1184+} // namespace Widelands
1185+
1186+#endif // end of include guard: WL_LOGIC_MAP_OBJECTS_DESCRIPTION_MAINTAINER_H
1187
1188=== renamed file 'src/logic/findbob.cc' => 'src/logic/map_objects/findbob.cc'
1189--- src/logic/findbob.cc 2019-02-23 11:00:49 +0000
1190+++ src/logic/map_objects/findbob.cc 2019-05-04 15:38:00 +0000
1191@@ -17,7 +17,7 @@
1192 *
1193 */
1194
1195-#include "logic/findbob.h"
1196+#include "logic/map_objects/findbob.h"
1197
1198 #include "base/macros.h"
1199 #include "logic/map_objects/tribes/soldier.h"
1200
1201=== renamed file 'src/logic/findbob.h' => 'src/logic/map_objects/findbob.h'
1202--- src/logic/findbob.h 2019-02-23 11:00:49 +0000
1203+++ src/logic/map_objects/findbob.h 2019-05-04 15:38:00 +0000
1204@@ -17,8 +17,8 @@
1205 *
1206 */
1207
1208-#ifndef WL_LOGIC_FINDBOB_H
1209-#define WL_LOGIC_FINDBOB_H
1210+#ifndef WL_LOGIC_MAP_OBJECTS_FINDBOB_H
1211+#define WL_LOGIC_MAP_OBJECTS_FINDBOB_H
1212
1213 #include "logic/map.h"
1214
1215@@ -60,4 +60,4 @@
1216
1217 } // namespace Widelands
1218
1219-#endif // end of include guard: WL_LOGIC_FINDBOB_H
1220+#endif // end of include guard: WL_LOGIC_MAP_OBJECTS_FINDBOB_H
1221
1222=== renamed file 'src/logic/findimmovable.cc' => 'src/logic/map_objects/findimmovable.cc'
1223--- src/logic/findimmovable.cc 2019-02-23 11:00:49 +0000
1224+++ src/logic/map_objects/findimmovable.cc 2019-05-04 15:38:00 +0000
1225@@ -17,7 +17,7 @@
1226 *
1227 */
1228
1229-#include "logic/findimmovable.h"
1230+#include "logic/map_objects/findimmovable.h"
1231
1232 #include "base/macros.h"
1233 #include "economy/flag.h"
1234
1235=== renamed file 'src/logic/findimmovable.h' => 'src/logic/map_objects/findimmovable.h'
1236--- src/logic/findimmovable.h 2019-02-23 11:00:49 +0000
1237+++ src/logic/map_objects/findimmovable.h 2019-05-04 15:38:00 +0000
1238@@ -17,8 +17,8 @@
1239 *
1240 */
1241
1242-#ifndef WL_LOGIC_FINDIMMOVABLE_H
1243-#define WL_LOGIC_FINDIMMOVABLE_H
1244+#ifndef WL_LOGIC_MAP_OBJECTS_FINDIMMOVABLE_H
1245+#define WL_LOGIC_MAP_OBJECTS_FINDIMMOVABLE_H
1246
1247 #include <stdint.h>
1248
1249@@ -164,4 +164,4 @@
1250
1251 } // namespace Widelands
1252
1253-#endif // end of include guard: WL_LOGIC_FINDIMMOVABLE_H
1254+#endif // end of include guard: WL_LOGIC_MAP_OBJECTS_FINDIMMOVABLE_H
1255
1256=== renamed file 'src/logic/findnode.cc' => 'src/logic/map_objects/findnode.cc'
1257--- src/logic/findnode.cc 2019-02-23 11:00:49 +0000
1258+++ src/logic/map_objects/findnode.cc 2019-05-04 15:38:00 +0000
1259@@ -17,7 +17,7 @@
1260 *
1261 */
1262
1263-#include "logic/findnode.h"
1264+#include "logic/map_objects/findnode.h"
1265
1266 #include "base/wexception.h"
1267 #include "logic/field.h"
1268
1269=== renamed file 'src/logic/findnode.h' => 'src/logic/map_objects/findnode.h'
1270--- src/logic/findnode.h 2019-02-23 11:00:49 +0000
1271+++ src/logic/map_objects/findnode.h 2019-05-04 15:38:00 +0000
1272@@ -17,8 +17,8 @@
1273 *
1274 */
1275
1276-#ifndef WL_LOGIC_FINDNODE_H
1277-#define WL_LOGIC_FINDNODE_H
1278+#ifndef WL_LOGIC_MAP_OBJECTS_FINDNODE_H
1279+#define WL_LOGIC_MAP_OBJECTS_FINDNODE_H
1280
1281 #include <vector>
1282
1283
1284=== modified file 'src/logic/map_objects/terrain_affinity.cc'
1285--- src/logic/map_objects/terrain_affinity.cc 2019-02-23 11:00:49 +0000
1286+++ src/logic/map_objects/terrain_affinity.cc 2019-05-04 15:38:00 +0000
1287@@ -21,10 +21,10 @@
1288
1289 #include <vector>
1290
1291-#include "logic/description_maintainer.h"
1292 #include "logic/field.h"
1293 #include "logic/game_data_error.h"
1294 #include "logic/map.h"
1295+#include "logic/map_objects/description_maintainer.h"
1296 #include "logic/map_objects/world/terrain_description.h"
1297 #include "logic/widelands_geometry.h"
1298 #include "scripting/lua_table.h"
1299
1300=== modified file 'src/logic/map_objects/terrain_affinity.h'
1301--- src/logic/map_objects/terrain_affinity.h 2019-02-23 11:00:49 +0000
1302+++ src/logic/map_objects/terrain_affinity.h 2019-05-04 15:38:00 +0000
1303@@ -23,7 +23,7 @@
1304 #include <string>
1305
1306 #include "base/macros.h"
1307-#include "logic/description_maintainer.h"
1308+#include "logic/map_objects/description_maintainer.h"
1309
1310 class LuaTable;
1311
1312
1313=== modified file 'src/logic/map_objects/tribes/building.cc'
1314--- src/logic/map_objects/tribes/building.cc 2019-04-26 05:32:54 +0000
1315+++ src/logic/map_objects/tribes/building.cc 2019-05-04 15:38:00 +0000
1316@@ -56,9 +56,9 @@
1317 BuildingDescr::BuildingDescr(const std::string& init_descname,
1318 const MapObjectType init_type,
1319 const LuaTable& table,
1320- const EditorGameBase& egbase)
1321+ const Tribes& tribes)
1322 : MapObjectDescr(init_type, table.get_string("name"), init_descname, table),
1323- egbase_(egbase),
1324+ tribes_(tribes),
1325 buildable_(table.has_key("buildcost")),
1326 can_be_dismantled_(table.has_key("return_on_dismantle") ||
1327 table.has_key("return_on_dismantle_on_enhanced")),
1328@@ -115,13 +115,13 @@
1329 if (enh == name()) {
1330 throw wexception("enhancement to same type");
1331 }
1332- DescriptionIndex const en_i = egbase_.tribes().building_index(enh);
1333- if (egbase_.tribes().building_exists(en_i)) {
1334+ DescriptionIndex const en_i = tribes_.building_index(enh);
1335+ if (tribes_.building_exists(en_i)) {
1336 enhancement_ = en_i;
1337
1338 // Merge the enhancements workarea info into this building's
1339 // workarea info.
1340- const BuildingDescr* tmp_enhancement = egbase_.tribes().get_building_descr(en_i);
1341+ const BuildingDescr* tmp_enhancement = tribes_.get_building_descr(en_i);
1342 for (auto area : tmp_enhancement->workarea_info_) {
1343 std::set<std::string>& strs = workarea_info_[area.first];
1344 for (std::string str : area.second)
1345@@ -139,14 +139,14 @@
1346 // However, we support "return_on_dismantle" without "buildable", because this is used by custom
1347 // scenario buildings.
1348 if (table.has_key("return_on_dismantle")) {
1349- return_dismantle_ = Buildcost(table.get_table("return_on_dismantle"), egbase_.tribes());
1350+ return_dismantle_ = Buildcost(table.get_table("return_on_dismantle"), tribes_);
1351 }
1352 if (table.has_key("buildcost")) {
1353 if (!table.has_key("return_on_dismantle")) {
1354 throw wexception(
1355 "The building '%s' has a \"buildcost\" but no \"return_on_dismantle\"", name().c_str());
1356 }
1357- buildcost_ = Buildcost(table.get_table("buildcost"), egbase_.tribes());
1358+ buildcost_ = Buildcost(table.get_table("buildcost"), tribes_);
1359 }
1360
1361 if (table.has_key("enhancement_cost")) {
1362@@ -156,9 +156,9 @@
1363 "\"return_on_dismantle_on_enhanced\"",
1364 name().c_str());
1365 }
1366- enhance_cost_ = Buildcost(table.get_table("enhancement_cost"), egbase_.tribes());
1367+ enhance_cost_ = Buildcost(table.get_table("enhancement_cost"), tribes_);
1368 return_enhanced_ =
1369- Buildcost(table.get_table("return_on_dismantle_on_enhanced"), egbase_.tribes());
1370+ Buildcost(table.get_table("return_on_dismantle_on_enhanced"), tribes_);
1371 }
1372
1373 needs_seafaring_ = table.has_key("needs_seafaring") ? table.get_bool("needs_seafaring") : false;
1374@@ -229,7 +229,7 @@
1375 */
1376 Building& BuildingDescr::create_constructionsite() const {
1377 BuildingDescr const* const descr =
1378- egbase_.tribes().get_building_descr(egbase_.tribes().safe_building_index("constructionsite"));
1379+ tribes_.get_building_descr(tribes_.safe_building_index("constructionsite"));
1380 ConstructionSite& csite = dynamic_cast<ConstructionSite&>(descr->create_object());
1381 csite.set_building(*this);
1382
1383
1384=== modified file 'src/logic/map_objects/tribes/building.h'
1385--- src/logic/map_objects/tribes/building.h 2019-04-24 06:01:37 +0000
1386+++ src/logic/map_objects/tribes/building.h 2019-05-04 15:38:00 +0000
1387@@ -36,7 +36,6 @@
1388 #include "logic/map_objects/tribes/wareworker.h"
1389 #include "logic/map_objects/tribes/workarea_info.h"
1390 #include "logic/message.h"
1391-#include "logic/widelands.h"
1392 #include "notifications/notifications.h"
1393 #include "scripting/lua_table.h"
1394
1395@@ -66,7 +65,7 @@
1396 BuildingDescr(const std::string& init_descname,
1397 MapObjectType type,
1398 const LuaTable& t,
1399- const EditorGameBase& egbase);
1400+ const Tribes& tribes);
1401 ~BuildingDescr() override {
1402 }
1403
1404@@ -172,9 +171,9 @@
1405 protected:
1406 virtual Building& create_object() const = 0;
1407 Building& create_constructionsite() const;
1408- const EditorGameBase& egbase_;
1409
1410 private:
1411+ const Tribes& tribes_;
1412 const bool buildable_; // the player can build this himself
1413 const bool can_be_dismantled_; // the player can dismantle this building
1414 const bool destructible_; // the player can destruct this himself
1415
1416=== modified file 'src/logic/map_objects/tribes/carrier.cc'
1417--- src/logic/map_objects/tribes/carrier.cc 2019-02-23 11:00:49 +0000
1418+++ src/logic/map_objects/tribes/carrier.cc 2019-05-04 15:38:00 +0000
1419@@ -569,8 +569,8 @@
1420
1421 CarrierDescr::CarrierDescr(const std::string& init_descname,
1422 const LuaTable& table,
1423- const EditorGameBase& egbase)
1424- : WorkerDescr(init_descname, MapObjectType::CARRIER, table, egbase) {
1425+ const Tribes& tribes)
1426+ : WorkerDescr(init_descname, MapObjectType::CARRIER, table, tribes) {
1427 }
1428
1429 /**
1430
1431=== modified file 'src/logic/map_objects/tribes/carrier.h'
1432--- src/logic/map_objects/tribes/carrier.h 2019-02-23 11:00:49 +0000
1433+++ src/logic/map_objects/tribes/carrier.h 2019-05-04 15:38:00 +0000
1434@@ -29,7 +29,7 @@
1435 public:
1436 CarrierDescr(const std::string& init_descname,
1437 const LuaTable& table,
1438- const EditorGameBase& egbase);
1439+ const Tribes& tribes);
1440 ~CarrierDescr() override {
1441 }
1442
1443
1444=== modified file 'src/logic/map_objects/tribes/constructionsite.cc'
1445--- src/logic/map_objects/tribes/constructionsite.cc 2019-04-24 06:01:37 +0000
1446+++ src/logic/map_objects/tribes/constructionsite.cc 2019-05-04 15:38:00 +0000
1447@@ -81,8 +81,8 @@
1448 */
1449 ConstructionSiteDescr::ConstructionSiteDescr(const std::string& init_descname,
1450 const LuaTable& table,
1451- const EditorGameBase& egbase)
1452- : BuildingDescr(init_descname, MapObjectType::CONSTRUCTIONSITE, table, egbase),
1453+ const Tribes& tribes)
1454+ : BuildingDescr(init_descname, MapObjectType::CONSTRUCTIONSITE, table, tribes),
1455 creation_fx_(
1456 SoundHandler::register_fx(SoundType::kAmbient, "sound/create_construction_site")) {
1457 add_attribute(MapObject::CONSTRUCTIONSITE);
1458
1459=== modified file 'src/logic/map_objects/tribes/constructionsite.h'
1460--- src/logic/map_objects/tribes/constructionsite.h 2019-04-24 06:01:37 +0000
1461+++ src/logic/map_objects/tribes/constructionsite.h 2019-05-04 15:38:00 +0000
1462@@ -73,7 +73,7 @@
1463 public:
1464 ConstructionSiteDescr(const std::string& init_descname,
1465 const LuaTable& t,
1466- const EditorGameBase& egbase);
1467+ const Tribes& tribes);
1468 ~ConstructionSiteDescr() override {
1469 }
1470
1471
1472=== modified file 'src/logic/map_objects/tribes/dismantlesite.cc'
1473--- src/logic/map_objects/tribes/dismantlesite.cc 2019-04-24 06:01:37 +0000
1474+++ src/logic/map_objects/tribes/dismantlesite.cc 2019-05-04 15:38:00 +0000
1475@@ -46,8 +46,8 @@
1476
1477 DismantleSiteDescr::DismantleSiteDescr(const std::string& init_descname,
1478 const LuaTable& table,
1479- const EditorGameBase& egbase)
1480- : BuildingDescr(init_descname, MapObjectType::DISMANTLESITE, table, egbase),
1481+ const Tribes& tribes)
1482+ : BuildingDescr(init_descname, MapObjectType::DISMANTLESITE, table, tribes),
1483 creation_fx_(
1484 SoundHandler::register_fx(SoundType::kAmbient, "sound/create_construction_site")) {
1485 add_attribute(MapObject::Attribute::CONSTRUCTIONSITE); // Yep, this is correct.
1486
1487=== modified file 'src/logic/map_objects/tribes/dismantlesite.h'
1488--- src/logic/map_objects/tribes/dismantlesite.h 2019-04-24 06:01:37 +0000
1489+++ src/logic/map_objects/tribes/dismantlesite.h 2019-05-04 15:38:00 +0000
1490@@ -47,7 +47,7 @@
1491 public:
1492 DismantleSiteDescr(const std::string& init_descname,
1493 const LuaTable& t,
1494- const EditorGameBase& egbase);
1495+ const Tribes& tribes);
1496 ~DismantleSiteDescr() override {
1497 }
1498
1499
1500=== modified file 'src/logic/map_objects/tribes/market.cc'
1501--- src/logic/map_objects/tribes/market.cc 2019-02-23 11:00:49 +0000
1502+++ src/logic/map_objects/tribes/market.cc 2019-05-04 15:38:00 +0000
1503@@ -29,12 +29,12 @@
1504
1505 MarketDescr::MarketDescr(const std::string& init_descname,
1506 const LuaTable& table,
1507- const EditorGameBase& egbase)
1508- : BuildingDescr(init_descname, MapObjectType::MARKET, table, egbase) {
1509+ const Tribes& tribes)
1510+ : BuildingDescr(init_descname, MapObjectType::MARKET, table, tribes) {
1511 i18n::Textdomain td("tribes");
1512
1513- DescriptionIndex const woi = egbase.tribes().worker_index(table.get_string("carrier"));
1514- if (!egbase.tribes().worker_exists(woi)) {
1515+ DescriptionIndex const woi = tribes.worker_index(table.get_string("carrier"));
1516+ if (!tribes.worker_exists(woi)) {
1517 throw wexception("The tribe does not define the worker in 'carrier'.");
1518 }
1519 carrier_ = woi;
1520
1521=== modified file 'src/logic/map_objects/tribes/market.h'
1522--- src/logic/map_objects/tribes/market.h 2019-02-23 11:00:49 +0000
1523+++ src/logic/map_objects/tribes/market.h 2019-05-04 15:38:00 +0000
1524@@ -30,7 +30,7 @@
1525
1526 class MarketDescr : public BuildingDescr {
1527 public:
1528- MarketDescr(const std::string& init_descname, const LuaTable& t, const EditorGameBase& egbase);
1529+ MarketDescr(const std::string& init_descname, const LuaTable& t, const Tribes& tribes);
1530 ~MarketDescr() override {
1531 }
1532
1533
1534=== modified file 'src/logic/map_objects/tribes/militarysite.cc'
1535--- src/logic/map_objects/tribes/militarysite.cc 2019-02-23 11:00:49 +0000
1536+++ src/logic/map_objects/tribes/militarysite.cc 2019-05-04 15:38:00 +0000
1537@@ -32,8 +32,8 @@
1538 #include "economy/request.h"
1539 #include "graphic/text_constants.h"
1540 #include "logic/editor_game_base.h"
1541-#include "logic/findbob.h"
1542 #include "logic/game.h"
1543+#include "logic/map_objects/findbob.h"
1544 #include "logic/map_objects/tribes/battle.h"
1545 #include "logic/map_objects/tribes/soldier.h"
1546 #include "logic/map_objects/tribes/tribe_descr.h"
1547@@ -295,8 +295,8 @@
1548 */
1549 MilitarySiteDescr::MilitarySiteDescr(const std::string& init_descname,
1550 const LuaTable& table,
1551- const EditorGameBase& egbase)
1552- : BuildingDescr(init_descname, MapObjectType::MILITARYSITE, table, egbase),
1553+ const Tribes& tribes)
1554+ : BuildingDescr(init_descname, MapObjectType::MILITARYSITE, table, tribes),
1555 conquer_radius_(0),
1556 num_soldiers_(0),
1557 heal_per_second_(0) {
1558
1559=== modified file 'src/logic/map_objects/tribes/militarysite.h'
1560--- src/logic/map_objects/tribes/militarysite.h 2019-02-23 11:00:49 +0000
1561+++ src/logic/map_objects/tribes/militarysite.h 2019-05-04 15:38:00 +0000
1562@@ -44,7 +44,7 @@
1563 public:
1564 MilitarySiteDescr(const std::string& init_descname,
1565 const LuaTable& t,
1566- const EditorGameBase& egbase);
1567+ const Tribes& tribes);
1568 ~MilitarySiteDescr() override {
1569 }
1570
1571
1572=== modified file 'src/logic/map_objects/tribes/production_program.cc'
1573--- src/logic/map_objects/tribes/production_program.cc 2019-05-04 05:37:07 +0000
1574+++ src/logic/map_objects/tribes/production_program.cc 2019-05-04 15:38:00 +0000
1575@@ -34,11 +34,11 @@
1576 #include "economy/input_queue.h"
1577 #include "helper.h"
1578 #include "io/filesystem/layered_filesystem.h"
1579-#include "logic/findimmovable.h"
1580-#include "logic/findnode.h"
1581 #include "logic/game.h"
1582 #include "logic/game_data_error.h"
1583 #include "logic/map_objects/checkstep.h"
1584+#include "logic/map_objects/findimmovable.h"
1585+#include "logic/map_objects/findnode.h"
1586 #include "logic/map_objects/tribes/productionsite.h"
1587 #include "logic/map_objects/tribes/soldier.h"
1588 #include "logic/map_objects/tribes/soldiercontrol.h"
1589@@ -1630,7 +1630,7 @@
1590 ProductionProgram::ProductionProgram(const std::string& init_name,
1591 const std::string& init_descname,
1592 std::unique_ptr<LuaTable> actions_table,
1593- const EditorGameBase& egbase,
1594+ const Tribes& tribes, const World& world,
1595 ProductionSiteDescr* building)
1596 : name_(init_name), descname_(init_descname) {
1597
1598@@ -1647,7 +1647,7 @@
1599
1600 if (boost::iequals(parts[0], "return")) {
1601 actions_.push_back(std::unique_ptr<ProductionProgram::Action>(
1602- new ActReturn(arguments.get(), *building, egbase.tribes())));
1603+ new ActReturn(arguments.get(), *building, tribes)));
1604 } else if (boost::iequals(parts[0], "call")) {
1605 actions_.push_back(
1606 std::unique_ptr<ProductionProgram::Action>(new ActCall(arguments.get(), *building)));
1607@@ -1659,19 +1659,19 @@
1608 std::unique_ptr<ProductionProgram::Action>(new ActAnimate(arguments.get(), building)));
1609 } else if (boost::iequals(parts[0], "consume")) {
1610 actions_.push_back(std::unique_ptr<ProductionProgram::Action>(
1611- new ActConsume(arguments.get(), *building, egbase.tribes())));
1612+ new ActConsume(arguments.get(), *building, tribes)));
1613 } else if (boost::iequals(parts[0], "produce")) {
1614 actions_.push_back(std::unique_ptr<ProductionProgram::Action>(
1615- new ActProduce(arguments.get(), *building, egbase.tribes())));
1616+ new ActProduce(arguments.get(), *building, tribes)));
1617 } else if (boost::iequals(parts[0], "recruit")) {
1618 actions_.push_back(std::unique_ptr<ProductionProgram::Action>(
1619- new ActRecruit(arguments.get(), *building, egbase.tribes())));
1620+ new ActRecruit(arguments.get(), *building, tribes)));
1621 } else if (boost::iequals(parts[0], "callworker")) {
1622 actions_.push_back(std::unique_ptr<ProductionProgram::Action>(
1623- new ActCallWorker(arguments.get(), name(), building, egbase.tribes())));
1624+ new ActCallWorker(arguments.get(), name(), building, tribes)));
1625 } else if (boost::iequals(parts[0], "mine")) {
1626 actions_.push_back(std::unique_ptr<ProductionProgram::Action>(
1627- new ActMine(arguments.get(), egbase.world(), name(), building)));
1628+ new ActMine(arguments.get(), world, name(), building)));
1629 } else if (boost::iequals(parts[0], "checksoldier")) {
1630 actions_.push_back(
1631 std::unique_ptr<ProductionProgram::Action>(new ActCheckSoldier(arguments.get())));
1632
1633=== modified file 'src/logic/map_objects/tribes/production_program.h'
1634--- src/logic/map_objects/tribes/production_program.h 2019-03-17 11:44:04 +0000
1635+++ src/logic/map_objects/tribes/production_program.h 2019-05-04 15:38:00 +0000
1636@@ -31,12 +31,13 @@
1637
1638 #include "base/log.h"
1639 #include "base/macros.h"
1640-#include "logic/editor_game_base.h"
1641 #include "logic/map_objects/tribes/bill_of_materials.h"
1642+#include "logic/map_objects/buildcost.h"
1643 #include "logic/map_objects/tribes/program_result.h"
1644 #include "logic/map_objects/tribes/training_attribute.h"
1645-#include "logic/widelands.h"
1646+#include "logic/map_objects/tribes/wareworker.h"
1647 #include "scripting/lua_table.h"
1648+#include "sound/constants.h"
1649
1650 namespace Widelands {
1651
1652@@ -45,6 +46,7 @@
1653 class ProductionSiteDescr;
1654 class ProductionSite;
1655 class TribeDescr;
1656+class Tribes;
1657 class Worker;
1658 class World;
1659
1660@@ -538,7 +540,7 @@
1661 ProductionProgram(const std::string& init_name,
1662 const std::string& init_descname,
1663 std::unique_ptr<LuaTable> actions_table,
1664- const EditorGameBase& egbase,
1665+ const Tribes& tribes, const World& world,
1666 ProductionSiteDescr* building);
1667
1668 const std::string& name() const;
1669
1670=== modified file 'src/logic/map_objects/tribes/productionsite.cc'
1671--- src/logic/map_objects/tribes/productionsite.cc 2019-04-09 17:16:11 +0000
1672+++ src/logic/map_objects/tribes/productionsite.cc 2019-05-04 15:38:00 +0000
1673@@ -53,7 +53,7 @@
1674 // Parses the descriptions of the working positions from 'items_table' and
1675 // fills in 'working_positions'. Throws an error if the table contains invalid
1676 // values.
1677-void parse_working_positions(const EditorGameBase& egbase,
1678+void parse_working_positions(const Tribes& tribes,
1679 LuaTable* items_table,
1680 BillOfMaterials* working_positions) {
1681 for (const std::string& worker_name : items_table->keys<std::string>()) {
1682@@ -62,8 +62,8 @@
1683 if (amount < 1 || 255 < amount) {
1684 throw wexception("count is out of range 1 .. 255");
1685 }
1686- DescriptionIndex const woi = egbase.tribes().worker_index(worker_name);
1687- if (!egbase.tribes().worker_exists(woi)) {
1688+ DescriptionIndex const woi = tribes.worker_index(worker_name);
1689+ if (!tribes.worker_exists(woi)) {
1690 throw wexception("invalid");
1691 }
1692 working_positions->push_back(std::pair<DescriptionIndex, uint32_t>(woi, amount));
1693@@ -91,8 +91,9 @@
1694 const std::string& msgctxt,
1695 MapObjectType init_type,
1696 const LuaTable& table,
1697- const EditorGameBase& egbase)
1698- : BuildingDescr(init_descname, init_type, table, egbase),
1699+ const Tribes& tribes,
1700+ const World& world)
1701+ : BuildingDescr(init_descname, init_type, table, tribes),
1702 out_of_resource_productivity_threshold_(100) {
1703 if (msgctxt.empty()) {
1704 throw Widelands::GameDataError(
1705@@ -121,15 +122,15 @@
1706 if (table.has_key("outputs")) {
1707 for (const std::string& output : table.get_table("outputs")->array_entries<std::string>()) {
1708 try {
1709- DescriptionIndex idx = egbase.tribes().ware_index(output);
1710- if (egbase.tribes().ware_exists(idx)) {
1711+ DescriptionIndex idx = tribes.ware_index(output);
1712+ if (tribes.ware_exists(idx)) {
1713 if (output_ware_types_.count(idx)) {
1714 throw wexception("this ware type has already been declared as an output");
1715 }
1716 output_ware_types_.insert(idx);
1717 } else {
1718- idx = egbase.tribes().worker_index(output);
1719- if (egbase.tribes().worker_exists(idx)) {
1720+ idx = tribes.worker_index(output);
1721+ if (tribes.worker_exists(idx)) {
1722 if (output_worker_types_.count(idx)) {
1723 throw wexception("this worker type has already been declared as an output");
1724 }
1725@@ -154,8 +155,8 @@
1726 if (amount < 1 || 255 < amount) {
1727 throw wexception("amount is out of range 1 .. 255");
1728 }
1729- DescriptionIndex idx = egbase.tribes().ware_index(ware_name);
1730- if (egbase.tribes().ware_exists(idx)) {
1731+ DescriptionIndex idx = tribes.ware_index(ware_name);
1732+ if (tribes.ware_exists(idx)) {
1733 for (const auto& temp_inputs : input_wares()) {
1734 if (temp_inputs.first == idx) {
1735 throw wexception("duplicated");
1736@@ -163,8 +164,8 @@
1737 }
1738 input_wares_.push_back(WareAmount(idx, amount));
1739 } else {
1740- idx = egbase.tribes().worker_index(ware_name);
1741- if (egbase.tribes().worker_exists(idx)) {
1742+ idx = tribes.worker_index(ware_name);
1743+ if (tribes.worker_exists(idx)) {
1744 for (const auto& temp_inputs : input_workers()) {
1745 if (temp_inputs.first == idx) {
1746 throw wexception("duplicated");
1747@@ -181,7 +182,7 @@
1748 }
1749 }
1750
1751- parse_working_positions(egbase, table.get_table("working_positions").get(), &working_positions_);
1752+ parse_working_positions(tribes, table.get_table("working_positions").get(), &working_positions_);
1753
1754 // Get programs
1755 items_table = table.get_table("programs");
1756@@ -201,7 +202,7 @@
1757 program_descname = pgettext_expr(msgctxt_char, program_descname_unlocalized.c_str());
1758 }
1759 programs_[program_name] = std::unique_ptr<ProductionProgram>(new ProductionProgram(
1760- program_name, program_descname, program_table->get_table("actions"), egbase, this));
1761+ program_name, program_descname, program_table->get_table("actions"), tribes, world, this));
1762 } catch (const std::exception& e) {
1763 throw wexception("program %s: %s", program_name.c_str(), e.what());
1764 }
1765@@ -209,12 +210,12 @@
1766
1767 // Verify that any map resource collected is valid
1768 if (!hints().collects_ware_from_map().empty()) {
1769- if (!(egbase_.tribes().ware_exists(hints().collects_ware_from_map()))) {
1770+ if (!(tribes.ware_exists(hints().collects_ware_from_map()))) {
1771 throw GameDataError("ai_hints for building %s collects nonexistent ware %s from map",
1772 name().c_str(), hints().collects_ware_from_map().c_str());
1773 }
1774 const DescriptionIndex collects_index =
1775- egbase_.tribes().safe_ware_index(hints().collects_ware_from_map());
1776+ tribes.safe_ware_index(hints().collects_ware_from_map());
1777 if (!is_output_ware_type(collects_index)) {
1778 throw GameDataError("ai_hints for building %s collects ware %s from map, but it's not "
1779 "listed in the building's output",
1780@@ -226,8 +227,8 @@
1781 ProductionSiteDescr::ProductionSiteDescr(const std::string& init_descname,
1782 const std::string& msgctxt,
1783 const LuaTable& table,
1784- const EditorGameBase& egbase)
1785- : ProductionSiteDescr(init_descname, msgctxt, MapObjectType::PRODUCTIONSITE, table, egbase) {
1786+ const Tribes& tribes, const World& world)
1787+ : ProductionSiteDescr(init_descname, msgctxt, MapObjectType::PRODUCTIONSITE, table, tribes, world) {
1788 }
1789
1790 /**
1791
1792=== modified file 'src/logic/map_objects/tribes/productionsite.h'
1793--- src/logic/map_objects/tribes/productionsite.h 2019-04-11 05:45:55 +0000
1794+++ src/logic/map_objects/tribes/productionsite.h 2019-05-04 15:38:00 +0000
1795@@ -63,11 +63,12 @@
1796 const std::string& msgctxt,
1797 MapObjectType type,
1798 const LuaTable& t,
1799- const EditorGameBase& egbase);
1800+ const Tribes& tribes, const World& world);
1801 ProductionSiteDescr(const std::string& init_descname,
1802 const std::string& msgctxt,
1803 const LuaTable& t,
1804- const EditorGameBase& egbase);
1805+ const Tribes& tribes,
1806+ const World& world);
1807
1808 Building& create_object() const override;
1809
1810
1811=== modified file 'src/logic/map_objects/tribes/ship.cc'
1812--- src/logic/map_objects/tribes/ship.cc 2019-05-03 08:01:07 +0000
1813+++ src/logic/map_objects/tribes/ship.cc 2019-05-04 15:38:00 +0000
1814@@ -34,10 +34,10 @@
1815 #include "graphic/text_constants.h"
1816 #include "io/fileread.h"
1817 #include "io/filewrite.h"
1818-#include "logic/findbob.h"
1819 #include "logic/game.h"
1820 #include "logic/game_data_error.h"
1821 #include "logic/map.h"
1822+#include "logic/map_objects/findbob.h"
1823 #include "logic/map_objects/tribes/constructionsite.h"
1824 #include "logic/map_objects/tribes/tribe_descr.h"
1825 #include "logic/map_objects/tribes/warehouse.h"
1826
1827=== modified file 'src/logic/map_objects/tribes/soldier.cc'
1828--- src/logic/map_objects/tribes/soldier.cc 2019-04-24 06:01:37 +0000
1829+++ src/logic/map_objects/tribes/soldier.cc 2019-05-04 15:38:00 +0000
1830@@ -36,13 +36,13 @@
1831 #include "io/fileread.h"
1832 #include "io/filewrite.h"
1833 #include "logic/editor_game_base.h"
1834-#include "logic/findbob.h"
1835-#include "logic/findimmovable.h"
1836-#include "logic/findnode.h"
1837 #include "logic/game.h"
1838 #include "logic/game_controller.h"
1839 #include "logic/game_data_error.h"
1840 #include "logic/map_objects/checkstep.h"
1841+#include "logic/map_objects/findbob.h"
1842+#include "logic/map_objects/findimmovable.h"
1843+#include "logic/map_objects/findnode.h"
1844 #include "logic/map_objects/tribes/battle.h"
1845 #include "logic/map_objects/tribes/building.h"
1846 #include "logic/map_objects/tribes/militarysite.h"
1847@@ -63,8 +63,8 @@
1848
1849 SoldierDescr::SoldierDescr(const std::string& init_descname,
1850 const LuaTable& table,
1851- const EditorGameBase& egbase)
1852- : WorkerDescr(init_descname, MapObjectType::SOLDIER, table, egbase),
1853+ const Tribes& tribes)
1854+ : WorkerDescr(init_descname, MapObjectType::SOLDIER, table, tribes),
1855 health_(table.get_table("health")),
1856 attack_(table.get_table("attack")),
1857 defense_(table.get_table("defense")),
1858
1859=== modified file 'src/logic/map_objects/tribes/soldier.h'
1860--- src/logic/map_objects/tribes/soldier.h 2019-04-24 06:01:37 +0000
1861+++ src/logic/map_objects/tribes/soldier.h 2019-05-04 15:38:00 +0000
1862@@ -41,7 +41,7 @@
1863 public:
1864 friend class Economy;
1865
1866- SoldierDescr(const std::string& init_descname, const LuaTable& t, const EditorGameBase& egbase);
1867+ SoldierDescr(const std::string& init_descname, const LuaTable& t, const Tribes& tribes);
1868 ~SoldierDescr() override {
1869 }
1870
1871
1872=== modified file 'src/logic/map_objects/tribes/trainingsite.cc'
1873--- src/logic/map_objects/tribes/trainingsite.cc 2019-04-08 06:17:54 +0000
1874+++ src/logic/map_objects/tribes/trainingsite.cc 2019-05-04 15:38:00 +0000
1875@@ -48,8 +48,8 @@
1876 TrainingSiteDescr::TrainingSiteDescr(const std::string& init_descname,
1877 const std::string& msgctxt,
1878 const LuaTable& table,
1879- const EditorGameBase& egbase)
1880- : ProductionSiteDescr(init_descname, msgctxt, MapObjectType::TRAININGSITE, table, egbase),
1881+ const Tribes& tribes, const World& world)
1882+ : ProductionSiteDescr(init_descname, msgctxt, MapObjectType::TRAININGSITE, table, tribes, world),
1883 num_soldiers_(table.get_int("soldier_capacity")),
1884 max_stall_(table.get_int("trainer_patience")),
1885
1886
1887=== modified file 'src/logic/map_objects/tribes/trainingsite.h'
1888--- src/logic/map_objects/tribes/trainingsite.h 2019-02-23 11:00:49 +0000
1889+++ src/logic/map_objects/tribes/trainingsite.h 2019-05-04 15:38:00 +0000
1890@@ -36,7 +36,7 @@
1891 TrainingSiteDescr(const std::string& init_descname,
1892 const std::string& msgctxt,
1893 const LuaTable& table,
1894- const EditorGameBase& egbase);
1895+ const Tribes& tribes, const World& world);
1896 ~TrainingSiteDescr() override {
1897 }
1898
1899
1900=== modified file 'src/logic/map_objects/tribes/tribe_descr.cc'
1901--- src/logic/map_objects/tribes/tribe_descr.cc 2019-05-04 09:59:51 +0000
1902+++ src/logic/map_objects/tribes/tribe_descr.cc 2019-05-04 15:38:00 +0000
1903@@ -31,7 +31,6 @@
1904 #include "base/wexception.h"
1905 #include "graphic/graphic.h"
1906 #include "io/filesystem/layered_filesystem.h"
1907-#include "logic/editor_game_base.h"
1908 #include "logic/game.h"
1909 #include "logic/game_data_error.h"
1910 #include "logic/map_objects/immovable.h"
1911
1912=== modified file 'src/logic/map_objects/tribes/tribe_descr.h'
1913--- src/logic/map_objects/tribes/tribe_descr.h 2019-02-23 11:00:49 +0000
1914+++ src/logic/map_objects/tribes/tribe_descr.h 2019-05-04 15:38:00 +0000
1915@@ -26,8 +26,6 @@
1916
1917 #include "base/macros.h"
1918 #include "graphic/animation.h"
1919-#include "logic/description_maintainer.h"
1920-#include "logic/editor_game_base.h"
1921 #include "logic/map_objects/immovable.h"
1922 #include "logic/map_objects/tribes/building.h"
1923 #include "logic/map_objects/tribes/road_textures.h"
1924@@ -36,10 +34,10 @@
1925 #include "logic/map_objects/tribes/tribes.h"
1926 #include "logic/map_objects/tribes/ware_descr.h"
1927 #include "logic/map_objects/tribes/worker.h"
1928+#include "logic/widelands.h"
1929
1930 namespace Widelands {
1931
1932-class EditorGameBase;
1933 class ResourceDescription;
1934 class WareDescr;
1935 class Warehouse;
1936
1937=== modified file 'src/logic/map_objects/tribes/tribes.cc'
1938--- src/logic/map_objects/tribes/tribes.cc 2019-02-23 11:00:49 +0000
1939+++ src/logic/map_objects/tribes/tribes.cc 2019-05-04 15:38:00 +0000
1940@@ -37,55 +37,55 @@
1941 tribes_(new DescriptionMaintainer<TribeDescr>()) {
1942 }
1943
1944-void Tribes::add_constructionsite_type(const LuaTable& table, const EditorGameBase& egbase) {
1945+void Tribes::add_constructionsite_type(const LuaTable& table) {
1946 i18n::Textdomain td("tribes");
1947 buildings_->add(new ConstructionSiteDescr(
1948 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
1949- table, egbase));
1950+ table, *this));
1951 }
1952
1953-void Tribes::add_dismantlesite_type(const LuaTable& table, const EditorGameBase& egbase) {
1954+void Tribes::add_dismantlesite_type(const LuaTable& table) {
1955 i18n::Textdomain td("tribes");
1956 buildings_->add(new DismantleSiteDescr(
1957 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
1958- table, egbase));
1959+ table, *this));
1960 }
1961
1962-void Tribes::add_militarysite_type(const LuaTable& table, const EditorGameBase& egbase) {
1963+void Tribes::add_militarysite_type(const LuaTable& table) {
1964 i18n::Textdomain td("tribes");
1965 buildings_->add(new MilitarySiteDescr(
1966 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
1967- table, egbase));
1968+ table, *this));
1969 }
1970
1971-void Tribes::add_productionsite_type(const LuaTable& table, const EditorGameBase& egbase) {
1972+void Tribes::add_productionsite_type(const LuaTable& table, const World& world) {
1973 i18n::Textdomain td("tribes");
1974 const std::string msgctxt = table.get_string("msgctxt");
1975 buildings_->add(
1976 new ProductionSiteDescr(pgettext_expr(msgctxt.c_str(), table.get_string("descname").c_str()),
1977- msgctxt, table, egbase));
1978+ msgctxt, table, *this, world));
1979 }
1980
1981-void Tribes::add_trainingsite_type(const LuaTable& table, const EditorGameBase& egbase) {
1982+void Tribes::add_trainingsite_type(const LuaTable& table, const World& world) {
1983 i18n::Textdomain td("tribes");
1984 const std::string msgctxt = table.get_string("msgctxt");
1985 buildings_->add(
1986 new TrainingSiteDescr(pgettext_expr(msgctxt.c_str(), table.get_string("descname").c_str()),
1987- msgctxt, table, egbase));
1988+ msgctxt, table, *this, world));
1989 }
1990
1991-void Tribes::add_warehouse_type(const LuaTable& table, const EditorGameBase& egbase) {
1992+void Tribes::add_warehouse_type(const LuaTable& table) {
1993 i18n::Textdomain td("tribes");
1994 buildings_->add(new WarehouseDescr(
1995 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
1996- table, egbase));
1997+ table, *this));
1998 }
1999
2000-void Tribes::add_market_type(const LuaTable& table, const EditorGameBase& egbase) {
2001+void Tribes::add_market_type(const LuaTable& table) {
2002 i18n::Textdomain td("tribes");
2003 buildings_->add(new MarketDescr(
2004 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
2005- table, egbase));
2006+ table, *this));
2007 }
2008
2009 void Tribes::add_immovable_type(const LuaTable& table) {
2010@@ -107,31 +107,31 @@
2011 table));
2012 }
2013
2014-void Tribes::add_carrier_type(const LuaTable& table, const EditorGameBase& egbase) {
2015+void Tribes::add_carrier_type(const LuaTable& table) {
2016 i18n::Textdomain td("tribes");
2017 workers_->add(new CarrierDescr(
2018 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
2019- table, egbase));
2020+ table, *this));
2021 }
2022
2023-void Tribes::add_soldier_type(const LuaTable& table, const EditorGameBase& egbase) {
2024+void Tribes::add_soldier_type(const LuaTable& table) {
2025 i18n::Textdomain td("tribes");
2026 workers_->add(new SoldierDescr(
2027 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
2028- table, egbase));
2029+ table, *this));
2030 }
2031
2032-void Tribes::add_worker_type(const LuaTable& table, const EditorGameBase& egbase) {
2033+void Tribes::add_worker_type(const LuaTable& table) {
2034 i18n::Textdomain td("tribes");
2035 workers_->add(new WorkerDescr(
2036 pgettext_expr(table.get_string("msgctxt").c_str(), table.get_string("descname").c_str()),
2037- table, egbase));
2038+ table, *this));
2039 }
2040
2041-void Tribes::add_tribe(const LuaTable& table, const EditorGameBase& egbase) {
2042+void Tribes::add_tribe(const LuaTable& table) {
2043 const std::string name = table.get_string("name");
2044 if (Widelands::tribe_exists(name)) {
2045- tribes_->add(new TribeDescr(table, Widelands::get_tribeinfo(name), egbase.tribes()));
2046+ tribes_->add(new TribeDescr(table, Widelands::get_tribeinfo(name), *this));
2047 } else {
2048 throw GameDataError("The tribe '%s'' has no preload file.", name.c_str());
2049 }
2050
2051=== modified file 'src/logic/map_objects/tribes/tribes.h'
2052--- src/logic/map_objects/tribes/tribes.h 2019-02-23 11:00:49 +0000
2053+++ src/logic/map_objects/tribes/tribes.h 2019-05-04 15:38:00 +0000
2054@@ -24,7 +24,7 @@
2055
2056 #include "base/macros.h"
2057 #include "graphic/texture.h"
2058-#include "logic/description_maintainer.h"
2059+#include "logic/map_objects/description_maintainer.h"
2060 #include "logic/map_objects/immovable.h"
2061 #include "logic/map_objects/tribes/carrier.h"
2062 #include "logic/map_objects/tribes/constructionsite.h"
2063@@ -53,25 +53,25 @@
2064 }
2065
2066 /// Adds this building type to the tribe description.
2067- void add_constructionsite_type(const LuaTable& table, const EditorGameBase& egbase);
2068-
2069- /// Adds this building type to the tribe description.
2070- void add_dismantlesite_type(const LuaTable& table, const EditorGameBase& egbase);
2071-
2072- /// Adds this building type to the tribe description.
2073- void add_militarysite_type(const LuaTable& table, const EditorGameBase& egbase);
2074-
2075- /// Adds this building type to the tribe description.
2076- void add_productionsite_type(const LuaTable& table, const EditorGameBase& egbase);
2077-
2078- /// Adds this building type to the tribe description.
2079- void add_trainingsite_type(const LuaTable& table, const EditorGameBase& egbase);
2080-
2081- /// Adds this building type to the tribe description.
2082- void add_warehouse_type(const LuaTable& table, const EditorGameBase& egbase);
2083-
2084- /// Adds this building type to the tribe description.
2085- void add_market_type(const LuaTable& table, const EditorGameBase& egbase);
2086+ void add_constructionsite_type(const LuaTable& table);
2087+
2088+ /// Adds this building type to the tribe description.
2089+ void add_dismantlesite_type(const LuaTable& table);
2090+
2091+ /// Adds this building type to the tribe description.
2092+ void add_militarysite_type(const LuaTable& table);
2093+
2094+ /// Adds this building type to the tribe description.
2095+ void add_productionsite_type(const LuaTable& table, const World& world);
2096+
2097+ /// Adds this building type to the tribe description.
2098+ void add_trainingsite_type(const LuaTable& table, const World& world);
2099+
2100+ /// Adds this building type to the tribe description.
2101+ void add_warehouse_type(const LuaTable& table);
2102+
2103+ /// Adds this building type to the tribe description.
2104+ void add_market_type(const LuaTable& table);
2105
2106 /// Adds this immovable type to the tribe description.
2107 void add_immovable_type(const LuaTable& table);
2108@@ -83,16 +83,16 @@
2109 void add_ware_type(const LuaTable& table);
2110
2111 /// Adds this worker type to the tribe description.
2112- void add_carrier_type(const LuaTable& table, const EditorGameBase& egbase);
2113-
2114- /// Adds this worker type to the tribe description.
2115- void add_soldier_type(const LuaTable& table, const EditorGameBase& egbase);
2116-
2117- /// Adds this worker type to the tribe description.
2118- void add_worker_type(const LuaTable& table, const EditorGameBase& egbase);
2119+ void add_carrier_type(const LuaTable& table);
2120+
2121+ /// Adds this worker type to the tribe description.
2122+ void add_soldier_type(const LuaTable& table);
2123+
2124+ /// Adds this worker type to the tribe description.
2125+ void add_worker_type(const LuaTable& table);
2126
2127 /// Adds a specific tribe's configuration.
2128- void add_tribe(const LuaTable& table, const EditorGameBase& egbase);
2129+ void add_tribe(const LuaTable& table);
2130
2131 void add_custom_building(const LuaTable& table);
2132
2133
2134=== modified file 'src/logic/map_objects/tribes/warehouse.cc'
2135--- src/logic/map_objects/tribes/warehouse.cc 2019-02-23 11:00:49 +0000
2136+++ src/logic/map_objects/tribes/warehouse.cc 2019-05-04 15:38:00 +0000
2137@@ -37,9 +37,9 @@
2138 #include "economy/warehousesupply.h"
2139 #include "economy/wares_queue.h"
2140 #include "logic/editor_game_base.h"
2141-#include "logic/findbob.h"
2142-#include "logic/findnode.h"
2143 #include "logic/game.h"
2144+#include "logic/map_objects/findbob.h"
2145+#include "logic/map_objects/findnode.h"
2146 #include "logic/map_objects/tribes/battle.h"
2147 #include "logic/map_objects/tribes/carrier.h"
2148 #include "logic/map_objects/tribes/requirements.h"
2149@@ -292,8 +292,8 @@
2150 */
2151 WarehouseDescr::WarehouseDescr(const std::string& init_descname,
2152 const LuaTable& table,
2153- const EditorGameBase& egbase)
2154- : BuildingDescr(init_descname, MapObjectType::WAREHOUSE, table, egbase),
2155+ const Tribes& tribes)
2156+ : BuildingDescr(init_descname, MapObjectType::WAREHOUSE, table, tribes),
2157 conquers_(0),
2158 heal_per_second_(0) {
2159 heal_per_second_ = table.get_int("heal_per_second");
2160
2161=== modified file 'src/logic/map_objects/tribes/warehouse.h'
2162--- src/logic/map_objects/tribes/warehouse.h 2019-02-23 11:00:49 +0000
2163+++ src/logic/map_objects/tribes/warehouse.h 2019-05-04 15:38:00 +0000
2164@@ -50,7 +50,7 @@
2165 public:
2166 WarehouseDescr(const std::string& init_descname,
2167 const LuaTable& t,
2168- const EditorGameBase& egbase);
2169+ const Tribes& tribes);
2170 ~WarehouseDescr() override {
2171 }
2172
2173
2174=== modified file 'src/logic/map_objects/tribes/worker.cc'
2175--- src/logic/map_objects/tribes/worker.cc 2019-05-04 09:59:51 +0000
2176+++ src/logic/map_objects/tribes/worker.cc 2019-05-04 15:38:00 +0000
2177@@ -39,13 +39,13 @@
2178 #include "io/fileread.h"
2179 #include "io/filewrite.h"
2180 #include "logic/cmd_incorporate.h"
2181-#include "logic/findbob.h"
2182-#include "logic/findimmovable.h"
2183-#include "logic/findnode.h"
2184 #include "logic/game.h"
2185 #include "logic/game_controller.h"
2186 #include "logic/game_data_error.h"
2187 #include "logic/map_objects/checkstep.h"
2188+#include "logic/map_objects/findbob.h"
2189+#include "logic/map_objects/findimmovable.h"
2190+#include "logic/map_objects/findnode.h"
2191 #include "logic/map_objects/terrain_affinity.h"
2192 #include "logic/map_objects/tribes/carrier.h"
2193 #include "logic/map_objects/tribes/dismantlesite.h"
2194
2195=== modified file 'src/logic/map_objects/tribes/worker_descr.cc'
2196--- src/logic/map_objects/tribes/worker_descr.cc 2019-02-23 11:00:49 +0000
2197+++ src/logic/map_objects/tribes/worker_descr.cc 2019-05-04 15:38:00 +0000
2198@@ -37,7 +37,7 @@
2199 WorkerDescr::WorkerDescr(const std::string& init_descname,
2200 MapObjectType init_type,
2201 const LuaTable& table,
2202- const EditorGameBase& egbase)
2203+ const Tribes& tribes)
2204 : BobDescr(init_descname, init_type, MapObjectDescr::OwnerType::kTribe, table),
2205 ware_hotspot_(table.has_key("ware_hotspot") ?
2206 table.get_vector<std::string, int>("ware_hotspot") :
2207@@ -50,10 +50,10 @@
2208 // other key must be there too. So, we cross the checks to trigger an exception if this is
2209 // violated.
2210 becomes_(table.has_key("experience") ?
2211- egbase.tribes().safe_worker_index(table.get_string("becomes")) :
2212+ tribes.safe_worker_index(table.get_string("becomes")) :
2213 INVALID_INDEX),
2214 needed_experience_(table.has_key("becomes") ? table.get_int("experience") : INVALID_INDEX),
2215- egbase_(egbase) {
2216+ tribes_(tribes) {
2217 if (helptext_script().empty()) {
2218 throw GameDataError("Worker %s has no helptext script", name().c_str());
2219 }
2220@@ -64,7 +64,6 @@
2221 std::unique_ptr<LuaTable> items_table;
2222
2223 if (table.has_key("buildcost")) {
2224- const Tribes& tribes = egbase_.tribes();
2225 items_table = table.get_table("buildcost");
2226 for (const std::string& key : items_table->keys<std::string>()) {
2227 try {
2228@@ -113,7 +112,7 @@
2229 throw wexception("this program has already been declared");
2230
2231 programs_[program_name] = std::unique_ptr<WorkerProgram>(
2232- new WorkerProgram(program_name, *this, egbase_.tribes()));
2233+ new WorkerProgram(program_name, *this, tribes_));
2234 programs_[program_name]->parse(*programs_table->get_table(program_name));
2235 } catch (const std::exception& e) {
2236 throw wexception("program %s: %s", program_name.c_str(), e.what());
2237@@ -124,8 +123,8 @@
2238
2239 WorkerDescr::WorkerDescr(const std::string& init_descname,
2240 const LuaTable& table,
2241- const EditorGameBase& egbase)
2242- : WorkerDescr(init_descname, MapObjectType::WORKER, table, egbase) {
2243+ const Tribes& tribes)
2244+ : WorkerDescr(init_descname, MapObjectType::WORKER, table, tribes) {
2245 }
2246
2247 WorkerDescr::~WorkerDescr() {
2248@@ -173,19 +172,19 @@
2249 * check if worker can be substitute for a requested worker type
2250 */
2251 bool WorkerDescr::can_act_as(DescriptionIndex const index) const {
2252- assert(egbase_.tribes().worker_exists(index));
2253+ assert(tribes_.worker_exists(index));
2254 if (index == worker_index()) {
2255 return true;
2256 }
2257
2258 // if requested worker type can be promoted, compare with that type
2259- const WorkerDescr& descr = *egbase_.tribes().get_worker_descr(index);
2260+ const WorkerDescr& descr = *tribes_.get_worker_descr(index);
2261 DescriptionIndex const becomes_index = descr.becomes();
2262 return becomes_index != INVALID_INDEX ? can_act_as(becomes_index) : false;
2263 }
2264
2265 DescriptionIndex WorkerDescr::worker_index() const {
2266- return egbase_.tribes().worker_index(name());
2267+ return tribes_.worker_index(name());
2268 }
2269
2270 void WorkerDescr::add_employer(const DescriptionIndex& building_index) {
2271
2272=== modified file 'src/logic/map_objects/tribes/worker_descr.h'
2273--- src/logic/map_objects/tribes/worker_descr.h 2019-02-23 11:00:49 +0000
2274+++ src/logic/map_objects/tribes/worker_descr.h 2019-05-04 15:38:00 +0000
2275@@ -48,8 +48,8 @@
2276 WorkerDescr(const std::string& init_descname,
2277 MapObjectType type,
2278 const LuaTable& table,
2279- const EditorGameBase& egbase);
2280- WorkerDescr(const std::string& init_descname, const LuaTable& t, const EditorGameBase& egbase);
2281+ const Tribes& tribes);
2282+ WorkerDescr(const std::string& init_descname, const LuaTable& t, const Tribes& tribes);
2283 ~WorkerDescr() override;
2284
2285 Bob& create_object() const override;
2286@@ -144,8 +144,8 @@
2287 /// Buildings where this worker can work
2288 std::set<DescriptionIndex> employers_;
2289
2290- const EditorGameBase& egbase_;
2291-
2292+private:
2293+ const Tribes& tribes_;
2294 DISALLOW_COPY_AND_ASSIGN(WorkerDescr);
2295 };
2296 } // namespace Widelands
2297
2298=== modified file 'src/logic/map_objects/tribes/worker_program.cc'
2299--- src/logic/map_objects/tribes/worker_program.cc 2019-04-24 06:43:22 +0000
2300+++ src/logic/map_objects/tribes/worker_program.cc 2019-05-04 15:38:00 +0000
2301@@ -24,8 +24,8 @@
2302
2303 #include "base/log.h"
2304 #include "helper.h"
2305-#include "logic/findnode.h"
2306 #include "logic/game_data_error.h"
2307+#include "logic/map_objects/findnode.h"
2308 #include "sound/sound_handler.h"
2309
2310 namespace Widelands {
2311
2312=== modified file 'src/logic/map_objects/world/world.h'
2313--- src/logic/map_objects/world/world.h 2019-02-23 11:00:49 +0000
2314+++ src/logic/map_objects/world/world.h 2019-05-04 15:38:00 +0000
2315@@ -23,8 +23,7 @@
2316 #include <memory>
2317
2318 #include "base/macros.h"
2319-#include "logic/description_maintainer.h"
2320-#include "logic/widelands.h"
2321+#include "logic/map_objects/description_maintainer.h"
2322
2323 class LuaInterface;
2324 class LuaTable;
2325@@ -33,7 +32,6 @@
2326
2327 struct CritterDescr;
2328 class EditorCategory;
2329-class EditorGameBase;
2330 class ImmovableDescr;
2331 class ResourceDescription;
2332 class TerrainDescription;
2333
2334=== modified file 'src/logic/player.cc'
2335--- src/logic/player.cc 2019-04-27 11:21:21 +0000
2336+++ src/logic/player.cc 2019-05-04 15:38:00 +0000
2337@@ -39,10 +39,10 @@
2338 #include "io/filewrite.h"
2339 #include "logic/cmd_delete_message.h"
2340 #include "logic/cmd_luacoroutine.h"
2341-#include "logic/findimmovable.h"
2342 #include "logic/game.h"
2343 #include "logic/game_data_error.h"
2344 #include "logic/map_objects/checkstep.h"
2345+#include "logic/map_objects/findimmovable.h"
2346 #include "logic/map_objects/tribes/building.h"
2347 #include "logic/map_objects/tribes/constructionsite.h"
2348 #include "logic/map_objects/tribes/militarysite.h"
2349
2350=== modified file 'src/logic/player_area.h'
2351--- src/logic/player_area.h 2019-02-23 11:00:49 +0000
2352+++ src/logic/player_area.h 2019-05-04 15:38:00 +0000
2353@@ -20,7 +20,6 @@
2354 #ifndef WL_LOGIC_PLAYER_AREA_H
2355 #define WL_LOGIC_PLAYER_AREA_H
2356
2357-#include "logic/widelands.h"
2358 #include "logic/widelands_geometry.h"
2359
2360 namespace Widelands {
2361
2362=== modified file 'src/logic/widelands.h'
2363--- src/logic/widelands.h 2019-02-23 11:00:49 +0000
2364+++ src/logic/widelands.h 2019-05-04 15:38:00 +0000
2365@@ -63,7 +63,7 @@
2366 */
2367 using DescriptionIndex = uint8_t;
2368
2369-constexpr uint8_t INVALID_INDEX = std::numeric_limits<uint8_t>::max();
2370+constexpr DescriptionIndex INVALID_INDEX = std::numeric_limits<uint8_t>::max();
2371 constexpr DescriptionIndex kInvalidWare = INVALID_INDEX - 1;
2372 constexpr DescriptionIndex kNoResource = INVALID_INDEX - 1;
2373
2374
2375=== modified file 'src/map_io/CMakeLists.txt'
2376--- src/map_io/CMakeLists.txt 2019-03-09 10:01:09 +0000
2377+++ src/map_io/CMakeLists.txt 2019-05-04 15:38:00 +0000
2378@@ -15,6 +15,8 @@
2379 io_filesystem
2380 logic
2381 logic_filesystem_constants
2382+ logic_map
2383+ logic_map_objects
2384 map_io
2385 scripting_lua_interface
2386 )
2387@@ -107,7 +109,10 @@
2388 logic
2389 logic_constants
2390 logic_exceptions
2391+ logic_map
2392+ logic_map_objects
2393 logic_widelands_geometry
2394+ logic_widelands_geometry_io
2395 profile
2396 scripting_logic
2397 )
2398
2399=== modified file 'src/map_io/map_elemental_packet.cc'
2400--- src/map_io/map_elemental_packet.cc 2019-02-23 11:00:49 +0000
2401+++ src/map_io/map_elemental_packet.cc 2019-05-04 15:38:00 +0000
2402@@ -25,7 +25,6 @@
2403 #include "logic/editor_game_base.h"
2404 #include "logic/game_data_error.h"
2405 #include "logic/map.h"
2406-#include "logic/widelands.h"
2407 #include "profile/profile.h"
2408
2409 namespace Widelands {
2410
2411=== modified file 'src/map_io/map_object_loader.h'
2412--- src/map_io/map_object_loader.h 2019-02-23 11:00:49 +0000
2413+++ src/map_io/map_object_loader.h 2019-05-04 15:38:00 +0000
2414@@ -28,7 +28,6 @@
2415 #include "base/macros.h"
2416 #include "logic/game_data_error.h"
2417 #include "logic/map_objects/map_object.h"
2418-#include "logic/widelands.h"
2419
2420 namespace Widelands {
2421 class Bob;
2422
2423=== modified file 'src/network/CMakeLists.txt'
2424--- src/network/CMakeLists.txt 2017-12-18 10:42:40 +0000
2425+++ src/network/CMakeLists.txt 2019-05-04 15:38:00 +0000
2426@@ -49,7 +49,7 @@
2427 io_filesystem
2428 io_stream
2429 logic
2430- logic_constants
2431+ logic_commands
2432 logic_filesystem_constants
2433 logic_game_controller
2434 logic_game_settings
2435
2436=== modified file 'src/network/gamehost.h'
2437--- src/network/gamehost.h 2019-04-29 16:22:08 +0000
2438+++ src/network/gamehost.h 2019-05-04 15:38:00 +0000
2439@@ -25,7 +25,6 @@
2440 #include "logic/game_controller.h"
2441 #include "logic/game_settings.h"
2442 #include "logic/player_end_result.h"
2443-#include "logic/widelands.h"
2444 #include "network/nethost_interface.h"
2445 #include "network/network.h"
2446 #include "ui_basic/unique_window.h"
2447
2448=== modified file 'src/network/network_player_settings_backend.h'
2449--- src/network/network_player_settings_backend.h 2019-02-23 11:00:49 +0000
2450+++ src/network/network_player_settings_backend.h 2019-05-04 15:38:00 +0000
2451@@ -21,7 +21,6 @@
2452 #define WL_NETWORK_NETWORK_PLAYER_SETTINGS_BACKEND_H
2453
2454 #include "logic/game_settings.h"
2455-#include "logic/widelands.h"
2456
2457 struct NetworkPlayerSettingsBackend {
2458
2459
2460=== modified file 'src/scripting/CMakeLists.txt'
2461--- src/scripting/CMakeLists.txt 2018-09-29 13:37:59 +0000
2462+++ src/scripting/CMakeLists.txt 2019-05-04 15:38:00 +0000
2463@@ -109,10 +109,13 @@
2464 io_fileread
2465 io_filesystem
2466 logic
2467+ logic_commands
2468 logic_constants
2469 logic_filesystem_constants
2470 logic_game_controller
2471 logic_game_settings
2472+ logic_map
2473+ logic_map_objects
2474 logic_tribe_basic_info
2475 logic_widelands_geometry
2476 map_io
2477
2478=== modified file 'src/scripting/lua_map.cc'
2479--- src/scripting/lua_map.cc 2019-05-04 09:59:51 +0000
2480+++ src/scripting/lua_map.cc 2019-05-04 15:38:00 +0000
2481@@ -27,8 +27,8 @@
2482 #include "base/macros.h"
2483 #include "base/wexception.h"
2484 #include "economy/input_queue.h"
2485-#include "logic/findimmovable.h"
2486 #include "logic/map_objects/checkstep.h"
2487+#include "logic/map_objects/findimmovable.h"
2488 #include "logic/map_objects/immovable.h"
2489 #include "logic/map_objects/terrain_affinity.h"
2490 #include "logic/map_objects/tribes/carrier.h"
2491
2492=== modified file 'src/scripting/lua_root.cc'
2493--- src/scripting/lua_root.cc 2019-02-23 11:00:49 +0000
2494+++ src/scripting/lua_root.cc 2019-05-04 15:38:00 +0000
2495@@ -24,9 +24,9 @@
2496 #include <boost/format.hpp>
2497
2498 #include "logic/cmd_luacoroutine.h"
2499-#include "logic/findimmovable.h"
2500 #include "logic/game.h"
2501 #include "logic/game_controller.h"
2502+#include "logic/map_objects/findimmovable.h"
2503 #include "logic/map_objects/immovable.h"
2504 #include "logic/map_objects/tribes/tribe_descr.h"
2505 #include "logic/map_objects/tribes/tribes.h"
2506@@ -586,8 +586,7 @@
2507
2508 try {
2509 LuaTable table(L); // Will pop the table eventually.
2510- EditorGameBase& egbase = get_egbase(L);
2511- egbase.mutable_tribes()->add_constructionsite_type(table, egbase);
2512+ get_egbase(L).mutable_tribes()->add_constructionsite_type(table);
2513 } catch (std::exception& e) {
2514 report_error(L, "%s", e.what());
2515 }
2516@@ -610,8 +609,7 @@
2517
2518 try {
2519 LuaTable table(L); // Will pop the table eventually.
2520- EditorGameBase& egbase = get_egbase(L);
2521- egbase.mutable_tribes()->add_dismantlesite_type(table, egbase);
2522+ get_egbase(L).mutable_tribes()->add_dismantlesite_type(table);
2523 } catch (std::exception& e) {
2524 report_error(L, "%s", e.what());
2525 }
2526@@ -634,8 +632,7 @@
2527
2528 try {
2529 LuaTable table(L); // Will pop the table eventually.
2530- EditorGameBase& egbase = get_egbase(L);
2531- egbase.mutable_tribes()->add_militarysite_type(table, egbase);
2532+ get_egbase(L).mutable_tribes()->add_militarysite_type(table);
2533 } catch (std::exception& e) {
2534 report_error(L, "%s", e.what());
2535 }
2536@@ -659,7 +656,7 @@
2537 try {
2538 LuaTable table(L); // Will pop the table eventually.
2539 EditorGameBase& egbase = get_egbase(L);
2540- egbase.mutable_tribes()->add_productionsite_type(table, egbase);
2541+ egbase.mutable_tribes()->add_productionsite_type(table, egbase.world());
2542 } catch (std::exception& e) {
2543 report_error(L, "%s", e.what());
2544 }
2545@@ -683,7 +680,7 @@
2546 try {
2547 LuaTable table(L); // Will pop the table eventually.
2548 EditorGameBase& egbase = get_egbase(L);
2549- egbase.mutable_tribes()->add_trainingsite_type(table, egbase);
2550+ egbase.mutable_tribes()->add_trainingsite_type(table, egbase.world());
2551 } catch (std::exception& e) {
2552 report_error(L, "%s", e.what());
2553 }
2554@@ -706,8 +703,7 @@
2555
2556 try {
2557 LuaTable table(L); // Will pop the table eventually.
2558- EditorGameBase& egbase = get_egbase(L);
2559- egbase.mutable_tribes()->add_warehouse_type(table, egbase);
2560+ get_egbase(L).mutable_tribes()->add_warehouse_type(table);
2561 } catch (std::exception& e) {
2562 report_error(L, "%s", e.what());
2563 }
2564@@ -731,8 +727,7 @@
2565
2566 try {
2567 LuaTable table(L); // Will pop the table eventually.
2568- EditorGameBase& egbase = get_egbase(L);
2569- egbase.mutable_tribes()->add_market_type(table, egbase);
2570+ get_egbase(L).mutable_tribes()->add_market_type(table);
2571 } catch (std::exception& e) {
2572 report_error(L, "%s", e.what());
2573 }
2574@@ -823,8 +818,7 @@
2575
2576 try {
2577 LuaTable table(L); // Will pop the table eventually.
2578- EditorGameBase& egbase = get_egbase(L);
2579- egbase.mutable_tribes()->add_carrier_type(table, egbase);
2580+ get_egbase(L).mutable_tribes()->add_carrier_type(table);
2581 } catch (std::exception& e) {
2582 report_error(L, "%s", e.what());
2583 }
2584@@ -846,8 +840,7 @@
2585
2586 try {
2587 LuaTable table(L); // Will pop the table eventually.
2588- EditorGameBase& egbase = get_egbase(L);
2589- egbase.mutable_tribes()->add_soldier_type(table, egbase);
2590+ get_egbase(L).mutable_tribes()->add_soldier_type(table);
2591 } catch (std::exception& e) {
2592 report_error(L, "%s", e.what());
2593 }
2594@@ -869,8 +862,7 @@
2595
2596 try {
2597 LuaTable table(L); // Will pop the table eventually.
2598- EditorGameBase& egbase = get_egbase(L);
2599- egbase.mutable_tribes()->add_worker_type(table, egbase);
2600+ get_egbase(L).mutable_tribes()->add_worker_type(table);
2601 } catch (std::exception& e) {
2602 report_error(L, "%s", e.what());
2603 }
2604@@ -893,8 +885,7 @@
2605
2606 try {
2607 LuaTable table(L); // Will pop the table eventually.
2608- EditorGameBase& egbase = get_egbase(L);
2609- egbase.mutable_tribes()->add_tribe(table, egbase);
2610+ get_egbase(L).mutable_tribes()->add_tribe(table);
2611 } catch (std::exception& e) {
2612 report_error(L, "%s", e.what());
2613 }
2614
2615=== modified file 'src/ui_fsmenu/CMakeLists.txt'
2616--- src/ui_fsmenu/CMakeLists.txt 2019-04-24 06:01:37 +0000
2617+++ src/ui_fsmenu/CMakeLists.txt 2019-05-04 15:38:00 +0000
2618@@ -109,6 +109,8 @@
2619 logic
2620 logic_game_controller
2621 logic_game_settings
2622+ logic_map
2623+ logic_map_objects
2624 logic_tribe_basic_info
2625 map_io_map_loader
2626 profile
2627
2628=== modified file 'src/website/CMakeLists.txt'
2629--- src/website/CMakeLists.txt 2019-03-16 10:50:12 +0000
2630+++ src/website/CMakeLists.txt 2019-05-04 15:38:00 +0000
2631@@ -26,6 +26,7 @@
2632 io_filesystem
2633 json
2634 logic
2635+ logic_map
2636 map_io_map_loader
2637 website_common
2638 )
2639@@ -42,6 +43,7 @@
2640 io_filesystem
2641 json
2642 logic
2643+ logic_map_objects
2644 logic_tribe_basic_info
2645 website_common
2646 )
2647
2648=== modified file 'src/wui/CMakeLists.txt'
2649--- src/wui/CMakeLists.txt 2019-04-24 06:01:37 +0000
2650+++ src/wui/CMakeLists.txt 2019-05-04 15:38:00 +0000
2651@@ -43,6 +43,8 @@
2652 economy
2653 graphic
2654 logic
2655+ logic_commands
2656+ logic_map_objects
2657 notifications
2658 ui_basic
2659 wui_waresdisplay
2660@@ -56,7 +58,7 @@
2661 mapviewpixelfunctions.h
2662 DEPENDS
2663 base_geometry
2664- logic
2665+ logic_map
2666 logic_widelands_geometry
2667 )
2668
2669@@ -90,6 +92,7 @@
2670 graphic_text_constants
2671 io_filesystem
2672 logic
2673+ logic_constants
2674 logic_filesystem_constants
2675 logic_game_controller
2676 logic_game_settings
2677@@ -116,9 +119,9 @@
2678 graphic_text_constants
2679 graphic_text_layout
2680 io_filesystem
2681- logic
2682 logic_game_controller
2683 logic_game_settings
2684+ logic_map
2685 map_io_map_loader
2686 ui_basic
2687 wui_common_suggested_teams
2688@@ -144,7 +147,7 @@
2689 graphic
2690 graphic_fields_to_draw
2691 graphic_game_renderer
2692- logic
2693+ logic_map
2694 logic_widelands_geometry
2695 profile
2696 ui_basic
2697@@ -163,6 +166,7 @@
2698 graphic_fonthandler
2699 graphic_text_layout
2700 logic
2701+ logic_map_objects
2702 ui_basic
2703 )
2704
2705@@ -294,10 +298,13 @@
2706 io_filesystem
2707 logic
2708 logic_constants
2709+ logic_commands
2710 logic_filesystem_constants
2711 logic_game_controller
2712 logic_game_settings
2713 logic_generic_save_handler
2714+ logic_map
2715+ logic_map_objects
2716 logic_tribe_basic_info
2717 logic_widelands_geometry
2718 network
2719
2720=== modified file 'src/wui/building_statistics_menu.h'
2721--- src/wui/building_statistics_menu.h 2019-02-23 11:00:49 +0000
2722+++ src/wui/building_statistics_menu.h 2019-05-04 15:38:00 +0000
2723@@ -24,7 +24,6 @@
2724
2725 #include "graphic/color.h"
2726 #include "logic/map_objects/tribes/building.h"
2727-#include "logic/widelands.h"
2728 #include "ui_basic/box.h"
2729 #include "ui_basic/button.h"
2730 #include "ui_basic/editbox.h"
2731
2732=== modified file 'src/wui/debugconsole.cc'
2733--- src/wui/debugconsole.cc 2019-02-23 11:00:49 +0000
2734+++ src/wui/debugconsole.cc 2019-05-04 15:38:00 +0000
2735@@ -25,7 +25,6 @@
2736
2737 #include "base/log.h"
2738 #include "chat/chat.h"
2739-#include "logic/widelands.h"
2740
2741 namespace DebugConsole {
2742
2743
2744=== modified file 'src/wui/gamedetails.h'
2745--- src/wui/gamedetails.h 2019-02-23 11:00:49 +0000
2746+++ src/wui/gamedetails.h 2019-05-04 15:38:00 +0000
2747@@ -24,6 +24,7 @@
2748
2749 #include "graphic/image.h"
2750 #include "logic/game_controller.h"
2751+#include "logic/widelands.h"
2752 #include "ui_basic/box.h"
2753 #include "ui_basic/icon.h"
2754 #include "ui_basic/multilinetextarea.h"
2755
2756=== modified file 'src/wui/interactive_gamebase.cc'
2757--- src/wui/interactive_gamebase.cc 2019-03-01 16:24:48 +0000
2758+++ src/wui/interactive_gamebase.cc 2019-05-04 15:38:00 +0000
2759@@ -28,10 +28,10 @@
2760 #include "graphic/rendertarget.h"
2761 #include "graphic/text_constants.h"
2762 #include "graphic/text_layout.h"
2763-#include "logic/findbob.h"
2764 #include "logic/game.h"
2765 #include "logic/game_controller.h"
2766 #include "logic/map.h"
2767+#include "logic/map_objects/findbob.h"
2768 #include "logic/map_objects/tribes/ship.h"
2769 #include "logic/player.h"
2770 #include "network/gamehost.h"
2771
2772=== modified file 'src/wui/multiplayersetupgroup.cc'
2773--- src/wui/multiplayersetupgroup.cc 2019-02-23 11:00:49 +0000
2774+++ src/wui/multiplayersetupgroup.cc 2019-05-04 15:38:00 +0000
2775@@ -37,7 +37,6 @@
2776 #include "logic/game_settings.h"
2777 #include "logic/map_objects/tribes/tribe_basic_info.h"
2778 #include "logic/player.h"
2779-#include "logic/widelands.h"
2780 #include "ui_basic/button.h"
2781 #include "ui_basic/dropdown.h"
2782 #include "ui_basic/mouse_constants.h"

Subscribers

People subscribed via source and target branches

to status/vote changes: