diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 936ff15..6fd2d53 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -206,7 +206,7 @@ set_property(TARGET ${TARGET_TEST_NAME} PROPERTY INCLUDE_DIRECTORIES "${LIB_INCLUDE_PATH}" ) target_compile_definitions(${TARGET_TEST_NAME} PRIVATE - DOTA_FACTORY_CONFIG_DIR="${CMAKE_SOURCE_DIR}/bin/config" + DOTA_FACTORY_CONFIG_DIR="${CMAKE_SOURCE_DIR}/src/test/config" ) target_link_libraries(${TARGET_TEST_NAME} ${TARGET_LIB_NAME}) diff --git a/src/test/config/buildings.toml b/src/test/config/buildings.toml new file mode 100644 index 0000000..3826aab --- /dev/null +++ b/src/test/config/buildings.toml @@ -0,0 +1,75 @@ +[[building]] +id = "belt" +cost = 2 +player_placeable = true +construction_time_seconds = 1 +surface_mask = ["A>"] + +[[building]] +id = "splitter" +cost = 3 +player_placeable = true +construction_time_seconds = 1 +surface_mask = [""] + +[[building]] +id = "miner" +cost = 15 +player_placeable = true +construction_time_seconds = 10 +surface_mask = [ + "AA", + "A>", +] + +[[building]] +id = "smelter" +cost = 20 +player_placeable = true +construction_time_seconds = 15 +surface_mask = [ + "AA ", + "AA>", +] + +[[building]] +id = "assembler" +cost = 35 +player_placeable = true +construction_time_seconds = 20 +surface_mask = [ + "AAA ", + "AAA>", + "AAA ", +] + +[[building]] +id = "reprocessing_plant" +cost = 40 +player_placeable = true +construction_time_seconds = 25 +surface_mask = [ + "AAA ", + "AAA>", + "AAA ", +] + +[[building]] +id = "shipyard" +cost = 60 +player_placeable = true +construction_time_seconds = 30 +surface_mask = [ + "AAAS>", + "AAAS ", +] + +[[building]] +id = "salvage_bay" +cost = 25 +player_placeable = true +construction_time_seconds = 15 +surface_mask = [ + "SAA", + "SAA>", +] diff --git a/src/test/config/recipes.toml b/src/test/config/recipes.toml new file mode 100644 index 0000000..efd734a --- /dev/null +++ b/src/test/config/recipes.toml @@ -0,0 +1,62 @@ +[[recipe]] +id = "mine_iron_ore" +building = "miner" +inputs = [] +outputs = [{item = "iron_ore", amount = 1}] +duration_seconds = 1.0 + +[[recipe]] +id = "mine_copper_ore" +building = "miner" +inputs = [] +outputs = [{item = "copper_ore", amount = 1}] +duration_seconds = 1.5 + +[[recipe]] +id = "iron_ingot" +building = "smelter" +inputs = [{item = "iron_ore", amount = 2}] +outputs = [{item = "iron_ingot", amount = 1}] +duration_seconds = 2.0 + +[[recipe]] +id = "copper_ingot" +building = "smelter" +inputs = [{item = "copper_ore", amount = 2}] +outputs = [{item = "copper_ingot", amount = 1}] +duration_seconds = 2.5 + +[[recipe]] +id = "circuit_board" +building = "assembler" +inputs = [{item = "iron_ingot", amount = 3}, {item = "copper_ingot", amount = 2}] +outputs = [{item = "circuit_board", amount = 1}] +duration_seconds = 5.0 + +[[recipe]] +id = "building_blocks" +building = "assembler" +inputs = [{item = "iron_ingot", amount = 4}] +outputs = [{item = "building_block", amount = 10}] +duration_seconds = 4.0 + +[[recipe]] +id = "reprocessing_cycle" +building = "reprocessing_plant" +inputs = [{item = "scrap", amount = 5}] +duration_seconds = 3.0 + + [[recipe.outputs]] + item = "iron_ingot" + amount = 2 + probability = 0.6 + + [[recipe.outputs]] + item = "circuit_board" + amount = 1 + probability = 0.3 + + [[recipe.outputs]] + item = "advanced_alloy" + amount = 1 + probability = 0.1 diff --git a/src/test/config/ships.toml b/src/test/config/ships.toml new file mode 100644 index 0000000..8299067 --- /dev/null +++ b/src/test/config/ships.toml @@ -0,0 +1,104 @@ +[[ship]] +id = "interceptor" +available_from_start = true + +[ship.blueprint] +materials = [{item = "iron_ingot", amount = 3}, {item = "circuit_board", amount = 1}] +player_production_level = 3 +production_time_seconds = 10 + +[ship.threat] +cost_formula = "5 + 1*x" + +[ship.health] +hp_formula = "40 + 5*x" + +[ship.movement] +speed_formula = "200 + 5*x" + +[ship.combat] +damage_formula = "10 + 2*x" +attack_range_formula = "150" +attack_rate_formula = "2.0" + +[ship.loot] +scrap_drop = 2 + + +[[ship]] +id = "destroyer" +available_from_start = true + +[ship.blueprint] +materials = [{item = "iron_ingot", amount = 5}, {item = "circuit_board", amount = 2}] +player_production_level = 5 +production_time_seconds = 20 + +[ship.threat] +cost_formula = "10 + 2*x" + +[ship.health] +hp_formula = "120 + 15*x" + +[ship.movement] +speed_formula = "120" + +[ship.combat] +damage_formula = "12 + 2*x" +attack_range_formula = "250" +attack_rate_formula = "1.0" + +[ship.loot] +scrap_drop = 4 + + +[[ship]] +id = "salvage_ship" +available_from_start = true + +[ship.blueprint] +materials = [{item = "iron_ingot", amount = 4}] +player_production_level = 3 +production_time_seconds = 10 + +[ship.threat] +cost_formula = "0" + +[ship.health] +hp_formula = "40 + 4*x" + +[ship.movement] +speed_formula = "110" + +[ship.salvage] +collection_range = 50 +cargo_capacity = 10 + +[ship.loot] +scrap_drop = 2 + + +[[ship]] +id = "repair_ship" +available_from_start = false + +[ship.blueprint] +materials = [{item = "iron_ingot", amount = 4}, {item = "circuit_board", amount = 2}] +player_production_level = 3 +production_time_seconds = 15 + +[ship.threat] +cost_formula = "0" + +[ship.health] +hp_formula = "60 + 5*x" + +[ship.movement] +speed_formula = "130" + +[ship.repair] +repair_rate_formula = "5 + x" +repair_range_formula = "80" + +[ship.loot] +scrap_drop = 2 diff --git a/src/test/config/stations.toml b/src/test/config/stations.toml new file mode 100644 index 0000000..926d848 --- /dev/null +++ b/src/test/config/stations.toml @@ -0,0 +1,30 @@ +[hq] +surface_mask = [ + "AAA", + "AAA", + "AAA", +] +hp_formula = "1000" + +[player_station] +surface_mask = [ + "SS", + "SS", +] +level = 5 +hp_formula = "300 + 40*x" +damage_formula = "5 + 4*x" +range_formula = "300 + 20*x" +fire_rate_formula = "0.5 + 0.2*x" +scrap_drop_formula = "x" + +[enemy_station] +surface_mask = [ + "SS", + "SS", +] +hp_formula = "300 + 150*x" +damage_formula = "20 + 10*x" +range_formula = "350 + 20*x" +fire_rate_formula = "1.0 + 0.2*x" +scrap_drop_formula = "10 + 5*x" diff --git a/src/test/config/world.toml b/src/test/config/world.toml new file mode 100644 index 0000000..cca5c77 --- /dev/null +++ b/src/test/config/world.toml @@ -0,0 +1,27 @@ +[world] +height_tiles = 60 +refund_percentage = 75 +starting_building_blocks = 100 +scrap_despawn_seconds = 30 +belt_speed_tiles_per_second = 2 + +[regions] +asteroid_width = 40 +player_buffer_width = 10 +contest_zone_width = 30 +enemy_buffer_width = 15 + +[expansion] +columns_per_expansion = 10 +cost_building_blocks = 200 + +[push] +push_expand_columns = 20 +scaling_factor = 1.2 + +[waves] +threat_rate_formula = "1*x - 30" +ship_level_formula = "1 + x / 120" +gap_min_seconds = 15 +gap_max_seconds = 45 +spawn_duration_seconds = 10