← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular into lp:widelands.

Commit message:
New wl_libraries logic_exceptions and logic_objectives. logic_map no longer depends on logic.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/split_up_liblogic_3_some_circular/+merge/366960

Get rid of a circular dependency
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/split_up_liblogic_3_some_circular into lp:widelands.
=== modified file 'src/logic/CMakeLists.txt'
--- src/logic/CMakeLists.txt	2019-05-04 15:37:33 +0000
+++ src/logic/CMakeLists.txt	2019-05-05 19:18:19 +0000
@@ -82,6 +82,15 @@
     filesystem_constants.cc
 )
 
+wl_library(logic_objectives
+  SRCS
+    objective.cc
+    objective.h
+  DEPENDS
+    base_i18n
+)
+
+
 wl_library(logic_generic_save_handler
   SRCS
     generic_save_handler.h
@@ -130,11 +139,11 @@
     graphic_playercolor
     io_fileread
     io_filesystem
-    logic # TODO(GunChleoc): Circular
     logic_constants
     logic_exceptions
     logic_filesystem_constants
     logic_map_objects
+    logic_objectives
     logic_tribe_basic_info
     logic_widelands_geometry
     logic_widelands_geometry_io
@@ -195,7 +204,6 @@
     message.h
     message_id.h
     message_queue.h
-    objective.h
     player.cc
     player.h
     player_area.h
@@ -239,7 +247,6 @@
     logic_widelands_geometry
     map_io
     map_io_map_loader
-    network # TODO(GunChleoc): Circular dependency
     note_sound
     notifications
     profile

=== modified file 'src/logic/game.cc'
--- src/logic/game.cc	2019-05-04 10:47:44 +0000
+++ src/logic/game.cc	2019-05-05 19:18:19 +0000
@@ -61,7 +61,6 @@
 #include "logic/replay.h"
 #include "logic/single_player_game_controller.h"
 #include "map_io/widelands_map_loader.h"
-#include "network/network.h"
 #include "scripting/logic.h"
 #include "scripting/lua_table.h"
 #include "sound/sound_handler.h"

=== modified file 'src/logic/map.cc'
--- src/logic/map.cc	2019-05-04 10:47:44 +0000
+++ src/logic/map.cc	2019-05-05 19:18:19 +0000
@@ -45,9 +45,9 @@
 #include "logic/map_objects/world/world.h"
 #include "logic/mapfringeregion.h"
 #include "logic/maphollowregion.h"
+#include "logic/mapregion.h"
 #include "logic/objective.h"
 #include "logic/pathfield.h"
-#include "logic/player.h"
 #include "map_io/s2map.h"
 #include "map_io/widelands_map_loader.h"
 #include "notifications/notifications.h"

=== added file 'src/logic/objective.cc'
--- src/logic/objective.cc	1970-01-01 00:00:00 +0000
+++ src/logic/objective.cc	2019-05-05 19:18:19 +0000
@@ -0,0 +1,1 @@
+// Dummy to make CMake happy

=== modified file 'src/map_io/CMakeLists.txt'
--- src/map_io/CMakeLists.txt	2019-05-04 15:37:33 +0000
+++ src/map_io/CMakeLists.txt	2019-05-05 19:18:19 +0000
@@ -111,6 +111,7 @@
     logic_exceptions
     logic_map
     logic_map_objects
+    logic_objectives
     logic_widelands_geometry
     logic_widelands_geometry_io
     profile

=== modified file 'src/scripting/CMakeLists.txt'
--- src/scripting/CMakeLists.txt	2019-04-26 05:52:49 +0000
+++ src/scripting/CMakeLists.txt	2019-05-05 19:18:19 +0000
@@ -116,6 +116,7 @@
     logic_game_settings
     logic_map
     logic_map_objects
+    logic_objectives
     logic_tribe_basic_info
     logic_widelands_geometry
     map_io

=== modified file 'src/wui/CMakeLists.txt'
--- src/wui/CMakeLists.txt	2019-05-04 15:37:33 +0000
+++ src/wui/CMakeLists.txt	2019-05-05 19:18:19 +0000
@@ -305,6 +305,7 @@
     logic_generic_save_handler
     logic_map
     logic_map_objects
+    logic_objectives
     logic_tribe_basic_info
     logic_widelands_geometry
     network


Follow ups